C / C++ compiler warnings: do you clean up all your code to remove them or leave them in? C / C++ compiler warnings: do you clean up all your code to remove them or leave them in? c c

C / C++ compiler warnings: do you clean up all your code to remove them or leave them in?


I would clean up any warning. Even the ones that you know are harmless (if such a thing exists) will give a bad impression of you to whoever will compile the code.

It one of the "smelly" signs I would look for if I had to work on someone else code.

If not real errors or potential future issues, it would be a sign of sloppiness


Clean 'em up, even if they don't indicate a real problem. Otherwise, if a warning that does indicate a real problem shows up, you won't see it through all the noise.


At my work, the compiler setting to treat warnings as errors is turned on. So, no warnings, or it won't compile :)