patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8356, Silence some GCC warnings

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8356: Silence some GCC warnings

Submitter:  Fatih Aşıcı <fatih>
Submitted:  Wed 26 Feb 2014 08:40:29 AM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Wed 26 Feb 2014 08:55:25 PM UTC, comment #1: 

regarding etharp.c:
Nice one! Thanks for the fast input, that one really slipped through when fixing bug #34682!

regarding sockets.c:
I know such kind of warnings are not nice to see and I'd love to get rid of them, but I really don't have a decent solution for this. How else would you use a generic function-like-define that take a pointer or a variable?

Please reopen if you have a solution for the sockets.c warnings!

Thanks for reporting!

Simon Goldschmidt <goldsimon>
Group administrator
Wed 26 Feb 2014 08:40:29 AM UTC, original submission:  

Fixes the following warnings that appear when debug is enabled:

../../../../../lwip/src/api/sockets.c: In function ‘lwip_accept’:
../../../../../lwip/src/api/sockets.c:459:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:459:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:459:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:459:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c: In function ‘lwip_bind’:
../../../../../lwip/src/api/sockets.c:494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘local_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘local_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘local_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘local_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c: In function ‘lwip_connect’:
../../../../../lwip/src/api/sockets.c:568:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘remote_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:568:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘remote_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:568:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘remote_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:568:5: warning: the comparison will always evaluate as ‘true’ for the address of ‘remote_addr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c: In function ‘lwip_getaddrname’:
../../../../../lwip/src/api/sockets.c:1494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:1494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:1494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]
../../../../../lwip/src/api/sockets.c:1494:3: warning: the comparison will always evaluate as ‘true’ for the address of ‘naddr’ will never be NULL [-Waddress]

/../../../lwip/src -c ../../../../../lwip/src/netif/etharp.c
../../../../../lwip/src/netif/etharp.c: In function ‘etharp_tmr’:
../../../../../lwip/src/netif/etharp.c:221:7: warning: comparison is always false due to limited range of data type [-Wtype-limits]
../../../../../lwip/src/netif/etharp.c: In function ‘etharp_output_to_arp_index’:
../../../../../lwip/src/netif/etharp.c:867:7: warning: comparison is always false due to limited range of data type [-Wtype-limits]

Fatih Aşıcı <fatih>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by fatih (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-26 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2014-02-26 fatih Attached File- Added 0001-Silence-GCC-warnings.patch, #30704

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code