patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9289, sockets: lwip_recv_tcp_from: Fix...

 
 

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

patch #9289: sockets: lwip_recv_tcp_from: Fix build warning

Submitter:  Axel Lin <axellin>
Submitted:  Wed 22 Mar 2017 03:12:12 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Wed 21 Jun 2017 07:52:04 PM UTC, comment #5: 

FYI: I'm in the progress of making the whole stack work with -Waddress...

Simon Goldschmidt <goldsimon>
Group administrator
Wed 21 Jun 2017 11:31:12 AM UTC, comment #4: 

I've just fixed that one place. And it wasn't the only one ;-)

Simon Goldschmidt <goldsimon>
Group administrator
Wed 21 Jun 2017 10:56:41 AM UTC, comment #3: 

Hi Dirk,
I know the unix build adds -Wno-address so it does not hit this warning. But some users use lwip on some vender's port can hit such warning and it's pretty annoying with such warning. I tried build by removing -Wno-address in unix port and only hit one place in lwip needs fix.

Maybe you will consider to apply it.
I update the patch for current git tree.

(file #40965)

Axel Lin <axellin>
Group Member
Thu 23 Mar 2017 04:00:18 PM UTC, comment #2: 

I got the build warning on a vender's sdk, not the unix build.
I don't see many warnings so far, only this one.

Axel Lin <axellin>
Group Member
Wed 22 Mar 2017 05:26:46 PM UTC, comment #1: 

AFAIK a lot of code does not compile in lwIP with -Waddress. In the last device I engineered, I had to turn this warning off. Also, the unix build adds -Wno-address to the compiler command line because of that.
It would be nice to get lwIP compile with that, but as far as I remember some of the warnings even depend on lwIP options, so fixing them will require #ifdefs. But I'm not sure about it, it was more than 1 year ago when I last tried to compile with -Waddress.

Dirk Ziegelmeier <dziegel>
Group administrator
Wed 22 Mar 2017 03:12:12 PM UTC, original submission:  

The address of 'tmpaddr' will never be NULL, thus use ip_addr_debug_print_val.

This fixes below build warning:
src/api/sockets.c: In function 'lwip_recv_tcp_from':
src/include/lwip/ip4_addr.h:164:40: warning: the comparison will always evaluate as 'true' for the address of 'tmpaddr' will never be NULL [-Waddress]
                       (u16_t)((ipaddr) != NULL ? ip4_addr1_16(ipaddr) : 0),

Axel Lin <axellin>
Group Member

 

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

 

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 dziegel (Posted a comment)
  • -email is unavailable- added by axellin (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
    2017-06-21 axellin Attached File- Added 0001-sockets-lwip_recv_tcp_from-Fix-build-warning-v2.patch, #40965
    2017-03-22 dziegel StatusNone Wont Do
        Open/ClosedOpen Closed
    2017-03-22 axellin Attached File- Added 0001-sockets-lwip_recv_tcp_from-Fix-build-warning.patch, #40064

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code