You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of bothering with coverity/sonarcloud, we should consider enabling more compiler warnings for better quality code. Currently we only use "-Wall", which enables the conservative warnings.
Try out these:
"-Wshadow" for shadowed variables (we have lots of these)
"-Wformat=2" for better printf() etc. format checks
"-Wuninitialized" for checking if something has been left uninitialized
"-Wfloat-equal" since we shouldn't really be doing equality checks on floats anyways
"-Wcast-qual" for lost qualifiers, etc. missing const.
"-Wpointer-arith" this seems to be recommended, as it helps making sure code works on other compilers than gcc too
"-Wwrite-strings" for string copy mistakes
I haven't tried any of the above yet, and some (all?) might be too zealous. These should be tested one at a time and see how much we would have to rewrite (and if they are worth it).
Any other flags ?
The text was updated successfully, but these errors were encountered:
Instead of bothering with coverity/sonarcloud, we should consider enabling more compiler warnings for better quality code. Currently we only use "-Wall", which enables the conservative warnings.
Try out these:
I haven't tried any of the above yet, and some (all?) might be too zealous. These should be tested one at a time and see how much we would have to rewrite (and if they are worth it).
Any other flags ?
The text was updated successfully, but these errors were encountered: