time() returns a time_t instead of clock_t
remove unused variables; use clang to analyze code and remove warnings