NetBSD-Bugs archive

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

bin/51191: src/usr.bin/make/suff.c:1619]: (style) Redundant condition



>Number:         51191
>Category:       bin
>Synopsis:       src/usr.bin/make/suff.c:1619]: (style) Redundant condition
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 30 06:40:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160529
>Organization:
>Environment:
>Description:
src/usr.bin/make/suff.c:1619]: (style) Redundant condition: If 'EXPR == '\\'', the comparison 'EXPR != 0' is always true.

Source code is

        } else if (*cp == '\\' && *cp != '\0') {

Suggest new code

        } else if (*cp == '\\') {

Also, in the same file:

[src/usr.bin/make/suff.c:812]: (style) Same expression in both branches of ternary operator.
[src/usr.bin/make/suff.c:2601]: (style) Same expression in both branches of ternary operator.
[src/usr.bin/make/suff.c:2643]: (style) Same expression in both branches of ternary operator.
[src/usr.bin/make/suff.c:2656]: (style) Same expression in both branches of ternary operator.

and

[src/usr.bin/make/suff.c:1218]: (warning) %x in format string (no. 1) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1218]: (warning) %x in format string (no. 2) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1218]: (warning) %x in format string (no. 3) requires '
unsigned int' but the argument type is 'struct List *'.
[src/usr.bin/make/suff.c:1236]: (warning) %x in format string (no. 1) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1236]: (warning) %x in format string (no. 2) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1236]: (warning) %x in format string (no. 3) requires '
unsigned int' but the argument type is 'struct List *'.
[src/usr.bin/make/suff.c:1315]: (warning) %x in format string (no. 1) requires '
unsigned int' but the argument type is 'struct List *'.
[src/usr.bin/make/suff.c:1315]: (warning) %x in format string (no. 2) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1326]: (warning) %x in format string (no. 1) requires '
unsigned int' but the argument type is 'struct List *'.
[src/usr.bin/make/suff.c:1326]: (warning) %x in format string (no. 2) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1375]: (warning) %x in format string (no. 1) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1375]: (warning) %x in format string (no. 2) requires '
unsigned int' but the argument type is 'struct List *'.
[src/usr.bin/make/suff.c:1384]: (warning) %x in format string (no. 1) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1384]: (warning) %x in format string (no. 2) requires '
unsigned int' but the argument type is 'struct List *'.
[src/usr.bin/make/suff.c:1500]: (warning) %x in format string (no. 1) requires '
unsigned int' but the argument type is 'struct _Src *'.
[src/usr.bin/make/suff.c:1500]: (warning) %x in format string (no. 2) requires '
unsigned int' but the argument type is 'struct _Src *'.



>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index