[Bug c++/48816] New: possible pointless code in file cxx-pretty-print.c, line 2136
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Apr 29 09:29:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48816
Summary: possible pointless code in file cxx-pretty-print.c,
line 2136
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dcb314@hotmail.com
I just ran the static analysis tool, cppcheck, over
the source code of the latest 4.7 snapshot, 20110423,
and it said
[cxx-pretty-print.c:2136]: (style) Variable 'i' is assigned a value that is
never used
I've checked the code and I agree with cppcheck.
Suggest remove pointless variable.
I am not sure why the existing functionality for set-but-not-used variables
in gcc didn't catch this one. Maybe this existing functionality might
benefit from enhancement.
More information about the Gcc-bugs
mailing list