Click on image to see enlargment
For this New Year's Eve, Bartender Bill is automating his drink preparations, making sure, among other things, that the drinks are prepared with the usual conventions of good taste. However the program keeps reporting that the compatibility test is 'broken'. What's going wrong?
bug774.cpp lint Output
--- Module: bug774.cpp (C++) _ m != tonic) ) return false; bug774.cpp(10) : Info 774: Boolean within 'right side of && within if' always evaluates to True [Reference: file bug774.cpp: lines 9, 10]
Reference Manual Explanation
774 Boolean within 'String' always evaluates to [True/False] -- The indicated clause (String is one of if, while or for (2nd expression)) has an argument that appears to always evaluate to either 'True' or 'False' (as indicated in the message). Information is gleaned from a variety of sources including prior assignment statements and initializers. Compare this with message 506 which is based on testing constants or combinations of constants. Also compare with the Elective Note 944 which can sometimes provide more detailed information.
If you have comments or questions about this bug, please post them to our Discussion Forum
Previous Bug - Bug #687 - December 2009