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 - NormalItem Group: Bug
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: NoneOperating System: Any
Fixed Release: 4.0Triage Status: Verified

Add a New Comment (Rich MarkupRich 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?

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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to 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
    Sun 21 Jul 2013 09:52:35 PM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
      Triage StatusNone=>Verified
    Tue 04 Jun 2013 06:28:55 AM UTCNoneAttached File-=>Added cppcheck_reports.txt, #28250

    Back to the top


    Powered by Savane 3.1-cleanup