Set compiler flags and fix warnings
Fix c99 warning