lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Warning when using lwIP in C++


From: Sg
Subject: Re: [lwip-devel] Warning when using lwIP in C++
Date: Thu, 31 Mar 2016 13:02:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 AquaMail/1.6.0.10 (build: 24000016)

Hi FCh,

could you please file a bug so that this does not get forgotten? I've no idea which solution Dirk prefers ;-)

Simon


Gesendet mit AquaMail für Android
http://www.aqua-mail.com


Am 31. März 2016 12:51:20 nachm. schrieb Freddie Chopin <address@hidden>:

Hello!

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?

Regards,
FCh

_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]