bugmake - Bugs: bug #39158, Cppcheck report


bug #39158: Cppcheck report

Submitted by:  None
Submitted on:  Tue 04 Jun 2013 06:28:55 AM UTC  
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Open/Closed:  Closed
Component Version:  None Operating System:  Any
Fixed Release:  4.0 Triage Status:  Verified

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 05 Jun 2013 06:33:21 PM UTC, comment #2:

These may interest you in particular:
[signame.c:247]: (warning) Logical disjunction always evaluates to true: sig > 0 || sig < 32.
247 if (sig > 0 || sig < NSIG)
248 return (char *) sys_siglist[sig];

Indeed, I think it should be:
247 if (sig > 0 && sig < NSIG)
248 return (char *) sys_siglist[sig];

[remake.c:1402] -> [remake.c:1402]: (style) Same expression on both sides of '&&'.
1402 if (mtime != NONEXISTENT_MTIME && file->command_state == cs_not_started
1403 && file->command_state == cs_not_started
1404 && !file->tried_implicit && file->intermediate)

There's one "file->command_state == cs_not_started" which could be removed but should it be replaced by something else?


Tue 04 Jun 2013 11:29:06 AM UTC, comment #1:

Thanks I'll look through it. Note that GNU make, as a fundamental component of a compiler bootstrapping process, cannot assume newer compilers like C99 etc. We just recently started requiring a C89 compiler. Still it looks like there may be some useful things there.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Tue 04 Jun 2013 06:28:55 AM UTC, original submission:


I git updated cppcheck and make then runned cppcheck on sources.
Of course, there are false positives but the report may help.




(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #28250:  cppcheck_reports.txt added by None (13KiB - text/plain - cppcheck report)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-21 psmith StatusNone => Fixed
        Assigned toNone => psmith
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.0
        Triage StatusNone => Verified
    2013-06-04 None Attached File- => Added cppcheck_reports.txt, #28250

    Back to the top

    Powered by Savane 3.3