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

前端 未结 18 2306
夕颜
夕颜 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:59

    Warnings are and should be treated as bugs. If you can't code well enough to get rid of your warnings then you probably shouldn't be coding. In my group we made the decision to force all warnings to errors. It ends this discussion altogether and really, IMHO, improves code quality.

提交回复
热议问题