I'm taught to generally compile with gcc -Wall
. Sometimes the warnings point me to logic errors in my code and I can find and correct them quickly (e.g. if I declared a variable that has not been used because I confused/mistyped variable names). But if I compile code from other sources, which seems to run fine for me, I frequently get warnings about deprecated or nonstandard language elements etc.
Do I have to worry about it? Should I update or correct these sources? From this reasoning, wouldn't it be safer to have printing all compile warnings as default and a compiler flags like -Wnone
instead?