NetBSD-Bugs archive

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

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



The following reply was made to PR bin/51191; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51191: src/usr.bin/make/suff.c:1619]: (style) Redundant
 condition
Date: Thu, 30 Jun 2016 05:34:05 +0000

 On Mon, May 30, 2016 at 06:40:00AM +0000, dcb314%hotmail.com@localhost wrote:
  > Source code is
  > 
  >         } else if (*cp == '\\' && *cp != '\0') {
  > 
  > Suggest new code
  > 
  >         } else if (*cp == '\\') {
 
 I think it's supposed to be
 
    if (*cp == '\\' && *(cp+1) != '\0')
 
  > 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.
 
 This seems to be a cheesy variant of (void)dummy to ignore an unused
 parameter.
 
  > 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 *'.
  > [...]
 
 more wrong than that with DEBUG_SRC :-) fixed now.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index