NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/42654: Coverity Scan Issues on ls.c

>Number:         42654
>Category:       bin
>Synopsis:       Coverity Scan Issues on ls.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 20 20:40:00 +0000 2010
>Originator:     Joel Sherrill
>Release:        NA
RTEMS (http:://
The RTEMS Project is using some code pulled in from NetBSD.  We are also part 
of the Coverity Scan project for free software projects.  We have two Coverity 
"results" on ls.c CVS id 1.58 which are reported as dead code. I compared that 
version against the head (20 Jan 2010) and these issues do not look fixed. 
Looking at the code, I am completely unsure of the intent but both look like 

I can provide full versions of the Coverity Scan logs via email and am happy to 
rerun if provided fixes.  We just need someone more familiar with the code to 
help fix these two.  T

Please. :)
This is a fragment of one of the reports.  Sorry if the cut and paste does not 
look nice.

Event dead_error_condition: On this path, the condition "flags != 0" could not 
be true
Event const: After this line, the value of "flags" is equal to 0
Event new_values: Conditional "flags != 0"
Also see events: [dead_error_begin][const][const][assignment][new_values]

630                                      if (f_flags && flags) {

Event dead_error_begin: Cannot reach dead code beginning here
Also see events: [dead_error_condition][const][const][assignment][new_values]

631                                             np->flags = &np->data[ulen + 
glen + 2];
632                                             (void)strcpy(np->flags, flags);


Home | Main Index | Thread Index | Old Index