Click on image to see enlargment
A news organization had hired a programmer of questionable competence to produce reports on the campaign for the Republican nomination. The program somehow failed to print the name of "Ron Paul". Can you spot the problem?
bug414.cpp lint Output
--- Module: bug414.cpp (C++) _ int indent = 100 / (strlen(name) - 8) / 2; bug414.cpp(15) : Info 834: Operator '/' followed by operator '/' is confusing. Use parentheses. During Specific Walk: File bug414.cpp line 10: print(!=0) #3 bug414.cpp(15) : Warning 414: Possible division by 0 [Reference: file bug414.cpp: lines 10, 15]
Reference Manual Explanation
414 Possible division by 0 -- The second argument to either the division operator (/) or the modulus operator (%) may be zero. Information is taken from earlier statements including assignments, initialization and tests.
Previous Bug - Bug #559 - January 2012