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

前端 未结 18 2322
夕颜
夕颜 2020-12-24 00:08

I\'ve worked on many projects where I\'ve been given code by others to update. More often than not I compile it and get about 1,000+ compiler warnings. When I see compiler w

18条回答
  •  盖世英雄少女心
    2020-12-24 00:52

    One of the characteristics of a really good programmer is that bad code gives them a queasy stomach.

    I strive to have all of my code not only compiler clean, but also be clean inside my IDE set to a fairly picky level. I'll sometimes need to suppress a warning instance if I know better than the tool, but at least that also serves as documentation.

提交回复
热议问题