lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #47591] Warning when using lwIP in C++


From: Freddie Chopin
Subject: [lwip-devel] [bug #47591] Warning when using lwIP in C++
Date: Fri, 01 Apr 2016 08:06:41 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?47591>

                 Summary: Warning when using lwIP in C++
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: freddie_chopin
            Submitted on: Fri 01 Apr 2016 08:06:40 GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Compiler Warning
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: git head

    _______________________________________________________

Details:

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?




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?47591>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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