Re: 2.6.23-rc2-mm2

Gabriel C <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.kernel
Message-ID <[email protected]>
David Brownell wrote:
> 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?
> 

Yes it does.


> ---
>  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; \
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.