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++

Submitted by:  Freddie Chopin <freddie_chopin>
Submitted on:  Fri 01 Apr 2016 08:06:40 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Compiler WarningStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned 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>
Project Member
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dziegel (Posted a comment)
  • -unavailable- added by freddie_chopin (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 01 Apr 2016 08:12:51 AM UTCdziegelStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1