net/ipv4/inetpeer.c stack warnings

5 messages, 3 authors, 2007-07-21 · open the first message on its own page

net/ipv4/inetpeer.c stack warnings

From: Gabriel C <hidden>
Date: 2007-07-19 12:31:29

Hello ,

I noticed on current git this warning in net/ipv4/inetpeer.c

...

  CC      net/ipv4/inetpeer.o
net/ipv4/inetpeer.c: In function 'unlink_from_pool':
net/ipv4/inetpeer.c:297: warning: the address of 'stack' will always
evaluate as 'true'
net/ipv4/inetpeer.c:297: warning: the address of 'stack' will always
evaluate as 'true'
net/ipv4/inetpeer.c: In function 'inet_getpeer':
net/ipv4/inetpeer.c:409: warning: the address of 'stack' will always
evaluate as 'true'
net/ipv4/inetpeer.c:409: warning: the address of 'stack' will always
evaluate as 'true'


...

Regards,

Gabriel C

Re: net/ipv4/inetpeer.c stack warnings

From: Patrick McHardy <hidden>
Date: 2007-07-19 12:52:44

Gabriel C wrote:
Hello ,

I noticed on current git this warning in net/ipv4/inetpeer.c
Yeah, I have no idea why the gcc people thought that this was
something worth warning about. Especially since explicitly
checking for != NULL silences the warning again.

Re: net/ipv4/inetpeer.c stack warnings

From: Gabriel C <hidden>
Date: 2007-07-19 13:12:21

Patrick McHardy wrote:
Gabriel C wrote:
  
quoted
Hello ,

I noticed on current git this warning in net/ipv4/inetpeer.c
    
Yeah, I have no idea why the gcc people thought that this was
something worth warning about. Especially since explicitly
checking for != NULL silences the warning again.


  
Thx , the patch fixes that for me.

Gabriel

Re: net/ipv4/inetpeer.c stack warnings

From: David Miller <davem@davemloft.net>
Date: 2007-07-19 21:16:23

From: Gabriel C <redacted>
Date: Thu, 19 Jul 2007 14:29:53 +0200
Hello ,

I noticed on current git this warning in net/ipv4/inetpeer.c

...

  CC      net/ipv4/inetpeer.o
net/ipv4/inetpeer.c: In function 'unlink_from_pool':
net/ipv4/inetpeer.c:297: warning: the address of 'stack' will always
evaluate as 'true'
net/ipv4/inetpeer.c:297: warning: the address of 'stack' will always
evaluate as 'true'
net/ipv4/inetpeer.c: In function 'inet_getpeer':
net/ipv4/inetpeer.c:409: warning: the address of 'stack' will always
evaluate as 'true'
net/ipv4/inetpeer.c:409: warning: the address of 'stack' will always
evaluate as 'true'
The compiler should not warn about that at all, the lookup()
macro is called with "stack" set to NULL.

Re: net/ipv4/inetpeer.c stack warnings

From: David Miller <davem@davemloft.net>
Date: 2007-07-21 02:39:38

From: Patrick McHardy <redacted>
Date: Thu, 19 Jul 2007 14:48:59 +0200
Gabriel C wrote:
quoted
Hello ,

I noticed on current git this warning in net/ipv4/inetpeer.c
Yeah, I have no idea why the gcc people thought that this was
something worth warning about. Especially since explicitly
checking for != NULL silences the warning again.
Sigh, applied :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help