public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42669]  New: libcpp: five redundant tests
@ 2010-01-09  8:50 dcb314 at hotmail dot com
  2010-01-09  9:59 ` [Bug preprocessor/42669] " paolo dot carlini at oracle dot com
  0 siblings, 1 reply; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2010-01-09  8:50 UTC (permalink / raw)
  To: gcc-bugs

I just ran the most excellent sourceforge tool "cppcheck" over the source
code of the GNU C compiler version 4.5 snapshot 20100107 and cppcheck said
lots of things. An extract is below.

[./libcpp/init.c:260]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/files.c:999]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/pch.c:725]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/pch.c:727]: (style) Redundant condition. It is safe to deallocate a
NULL pointer
[./libcpp/pch.c:729]: (style) Redundant condition. It is safe to deallocate a
NULL pointer

I've manually checked all of these and I agree with cppcheck -
the redundant conditions may be safely deleted.


-- 
           Summary: libcpp: five redundant tests
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42669


^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <bug-42669-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2013-05-13  6:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-09  8:50 [Bug c++/42669] New: libcpp: five redundant tests dcb314 at hotmail dot com
2010-01-09  9:59 ` [Bug preprocessor/42669] " paolo dot carlini at oracle dot com
     [not found] <bug-42669-4@http.gcc.gnu.org/bugzilla/>
2013-05-13  6:43 ` skannan at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).