lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200708111358.30667.david-b@pacbell.net>
Date:	Sat, 11 Aug 2007 13:58:30 -0700
From:	David Brownell <david-b@...bell.net>
To:	linux-usb-devel@...ts.sourceforge.net
Cc:	Gabriel C <nix.or.die@...glemail.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org
Subject: Re: [linux-usb-devel] 2.6.23-rc2-mm2

On Friday 10 August 2007, Gabriel C wrote:
> Getting that with gcc 4.2.1 :
>
> drivers/usb/host/ohci-dbg.c: In function 'show_registers':
> drivers/usb/host/ohci-dbg.c:620: warning: the address of 'next' will always evaluate as 'true'
> drivers/usb/host/ohci-dbg.c:639: warning: the address of 'next' will always evaluate as 'true'

Seems like a pretty annoying warning to have added ... the relevant
test *expects* to have two constant branches, where the compiler
optimizes one out of existence.

Does this patch get rid of it?

---
 drivers/usb/host/ohci-dbg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- g26.orig/drivers/usb/host/ohci-dbg.c	2007-08-11 13:51:42.000000000 -0700
+++ g26/drivers/usb/host/ohci-dbg.c	2007-08-11 13:52:07.000000000 -0700
@@ -74,7 +74,7 @@ urb_print (struct urb * urb, char * str,
 
 #define ohci_dbg_sw(ohci, next, size, format, arg...) \
 	do { \
-	if (next) { \
+	if (next != NULL) { \
 		unsigned s_len; \
 		s_len = scnprintf (*next, *size, format, ## arg ); \
 		*size -= s_len; *next += s_len; \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ