Click here to Skip to main content
15,065,783 members

Survey Results

How do you deal with compiler warnings?

Survey period: 17 Jun 2019 to 24 Jun 2019

If the compiler knows how to fix my syntax error why doesn't it simply fix it itself?

Use standard compiler settings and set the warning level to the highest level and fix all warnings and errors26229.27
Customise analysers to suit my team’s requirements and fix all warnings and errors18020.11
Fix all errors but generally ignore warnings31234.86
Turn off all errors and warnings that I can182.01
Depends on the codebase and my level of enthusiasm12013.41
I don't work with a compiler that generates warnings or errors182.01

GeneralRe: Fix warnings Pin
CHill6019-Jun-19 3:07
mveCHill6019-Jun-19 3:07 
GeneralRe: Fix warnings Pin
Elrond20-Jun-19 0:50
MemberElrond20-Jun-19 0:50 
GeneralI’m shocked Pin
#realJSOP16-Jun-19 20:15
mva#realJSOP16-Jun-19 20:15 
GeneralRe: I’m shocked Pin
M.Vo.16-Jun-19 20:35
MemberM.Vo.16-Jun-19 20:35 
GeneralRe: I’m shocked Pin
Eek Ten Bears16-Jun-19 21:23
MemberEek Ten Bears16-Jun-19 21:23 
GeneralRe: I’m shocked Pin
den2k8816-Jun-19 21:26
professionalden2k8816-Jun-19 21:26 
GeneralRe: I’m shocked Pin
M.Vo.16-Jun-19 21:31
MemberM.Vo.16-Jun-19 21:31 
GeneralRe: I’m shocked Pin
Eek Ten Bears17-Jun-19 20:36
MemberEek Ten Bears17-Jun-19 20:36 
Depends what you are working on but that wasn't an answer in the survey Wink | ;)

Leaving aside the quirks of C++ compilers (which I try never to touch) you should assess every warning and either fix it or handle it. Handling it doesn't mean ignoring it, it means handling it properly. This is however a general rule and if your code works with 70000 warnings it might be more sensible leaving them in so you are reminded to revisit them on a wet day without much else on and find out why.
GeneralRe: I’m shocked Pin
M.Vo.17-Jun-19 20:46
MemberM.Vo.17-Jun-19 20:46 
GeneralRe: I’m shocked Pin
John R. Shaw17-Jun-19 22:43
MemberJohn R. Shaw17-Jun-19 22:43 
GeneralRe: I’m shocked Pin
den2k8816-Jun-19 21:27
professionalden2k8816-Jun-19 21:27 
GeneralRe: I’m shocked Pin
Nemanja Trifunovic17-Jun-19 1:51
MemberNemanja Trifunovic17-Jun-19 1:51 
GeneralRe: I’m shocked Pin
Gary Wheeler18-Jun-19 1:49
MemberGary Wheeler18-Jun-19 1:49 
GeneralRe: I’m shocked Pin
Marc Clifton19-Jun-19 2:27
mvaMarc Clifton19-Jun-19 2:27 
GeneralRe: I’m shocked Pin
Mike Diack21-Jun-19 4:29
MemberMike Diack21-Jun-19 4:29 
GeneralRe: I’m shocked Pin
#realJSOP21-Jun-19 7:04
mva#realJSOP21-Jun-19 7:04 
GeneralOther: "Treat warnings as errors" Pin
Mike Barthold16-Jun-19 20:10
professionalMike Barthold16-Jun-19 20:10 
GeneralFix your warnings Pin
Mark Storen16-Jun-19 18:25
MemberMark Storen16-Jun-19 18:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.