bugmake - Bugs: bug #39158, Cppcheck report

 
 

bug #39158: Cppcheck report

Submitter:  None
Submitted:  Tue 04 Jun 2013 06:28:55 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  None Operating System:  Any
Fixed Release:  4.0 Triage Status:  Verified
* Mandatory Fields

Add a New Comment Rich Markup
   

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?

Julien

Anonymous
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>
Group administrator
Tue 04 Jun 2013 06:28:55 AM UTC, original submission:  

Hello,

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

Julien

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    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.13-d3ae.
    Corresponding source code