Multiple warnings in new SVN Code and fmod_errors

All the header files of the new events lib in OF (libs/openFrameworks/events/*.h) lack a newline at the end of file. This a enforced by the standard, so the GCC keeps complaining. Other compilers just ignore the standard. It’s easy to fix, just add a new empty line at the end of the files.

On the other hand is there a way to get rid of all the warnings in libs/fmodex/inc/fmod_errors.h about an obsolete char conversions? This really dumps a lot of garbage warnings because there are about 100 lines.

When using GCC, you can set the following compile option:

  
  
-Wno-write-strings  
  

This will get rid off all the

…/…/…/libs/fmodex/inc/fmod_errors.h|25|warning: deprecated conversion from string constant to ‘char*’

In codeblocks this can be added in Project->Build options->Compilier Settings->Other options. Set this for the whole project.

Also, this one is good too:

-Wno-deprecated-declarations

This will get rid of a lot of the video player deprecated warnings…

Pretty boring, but may be useful for some people:

-fdiagnostics-show-option, GCC will tell you how to disable a warning

The name of the warning option will then be displayed after a warning, e.g.

…/…/…/addons/ofxVectorMath/src/ofxVec2f.h|111|warning: second operand of conditional has no effect [-Wunused-value]|

In this instance to turn the warning off you would write -Wno-unused-value.
Of course, turning off warnings may be harzardous…

Thank you grimus really helpful :slight_smile: