add std=c99 flag for warning free OS X
remove unused variables