buglwIP - A Lightweight TCP/IP stack - Bugs: bug #47591, Warning when using lwIP in C++

 
 

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

bug #47591: Warning when using lwIP in C++

Submitter:  Freddie Chopin <freddie_chopin>
Submitted:  Fri 01 Apr 2016 08:06:40 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Compiler Warning Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Fri 01 Apr 2016 08:27:05 AM UTC, comment #2: 

Thanks! I didn't notice that you've implemented the change already (;

Freddie Chopin <freddie_chopin>
Fri 01 Apr 2016 08:12:51 AM UTC, comment #1: 

Thanks for reporting

Dirk Ziegelmeier <dziegel>
Group administrator
Fri 01 Apr 2016 08:06:40 AM UTC, original submission:  

If the file src/include/lwip/priv/tcpip_priv.h is included in C++
source file - for example indirectly via src/include/lwip/netifapi.h -
the compiler gives a following warning (when using -Wall -Wextra):

In file included from ../external/lwIP/src/include/lwip/netifapi.h:38:0,
                 from modbusTcpPollingThread.cpp:16:
../external/lwIP/src/include/lwip/priv/tcpip_priv.h:116:71: warning: 'err_t tcpip_api_call(tcpip_api_call_fn, tcpip_api_call*)' hides constructor for 'struct tcpip_api_call' [-Wshadow]
 err_t tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call *call);
                                                                       ^

There are many possible approaches to solving this:
1. Rename the function or struct to not have the same name
2. Add suffix to the struct name "tcpip_api_call_s"
3. Use anonymous struct via typedef "tcpip_api_call_t"
4. ...

Is any of these solutions preferable? Should I send a patch, or maybe
you prefer to do the change yourself?

Freddie Chopin <freddie_chopin>

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dziegel (Posted a comment)
  • -email is unavailable- added by freddie_chopin (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-01 dziegel StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code