khoih-prog / WebSockets2_Generic

A WebSocket Server and Client library for Arduino, based on RFC6455, for writing modern Websockets applications. Now support ESP8266, ESP32 (including ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00 / ENC28J60 / LAN8742A / LAN8720, ESP8266 / ESP32-AT modules/shields, as well as SINRIC / Alexa / Google Home
GNU General Public License v3.0
81 stars 30 forks source link

Compiler warnings #24

Closed davekc closed 3 years ago

davekc commented 3 years ago

Hello, I get many compiler warnings using Teensy 4.1 and native ethernet. Even if everything works perfectly, it pollutes the compiler output and it is not really helpfull. Anything to do about it?

``[...]\Arduino\libraries\WebSockets2_Generic\src/Tiny_Websockets_Generic/message.hpp:58:6: warning: #warning WEBSOCKETS_USE_ETHERNET and USE_NATIVE_ETHERNET in client.hpp [-Wcpp]

warning WEBSOCKETS_USE_ETHERNET and USE_NATIVE_ETHERNET in client.hpp

  ^

In file included from [...]\Arduino\libraries\WebSockets2_Generic\src/Tiny_Websockets_Generic/message.hpp:59:0, from [...]\Arduino\libraries\WebSockets2_Generic\src/WebSockets2_Generic.h:48, from [...]\Arduino\web_server\web_server.ino:61: [...]\Arduino\libraries\WebSockets2_Generic\src/Tiny_Websockets_Generic/internals/ws_common_NativeEthernet.hpp:59:8: warning: #warning Using NativeEthernet for Teensy 4.1 in ws_common_NativeEthernet.hpp [-Wcpp]

warning Using NativeEthernet for Teensy 4.1 in ws_common_NativeEthernet.hpp

    ^

In file included from [...]\Arduino\libraries\WebSockets2_Generic\src/WebSockets2_Generic.h:49:0, from [...]\Arduino\web_server\web_server.ino:61: [...]\Arduino\libraries\WebSockets2_Generic\src/Tiny_Websockets_Generic/client.hpp:64:6: warning: #warning WEBSOCKETS_USE_ETHERNET and USE_NATIVE_ETHERNET in client.hpp [-Wcpp]

warning WEBSOCKETS_USE_ETHERNET and USE_NATIVE_ETHERNET in client.hpp

  ^

In file included from [...]\Arduino\libraries\WebSockets2_Generic\src/WebSockets2_Generic.h:50:0, from [...]\Arduino\web_server\web_server.ino:61: [...]\Arduino\libraries\WebSockets2_Generic\src/Tiny_Websockets_Generic/server.hpp:59:6: warning: #warning WEBSOCKETS_USE_ETHERNET and USE_NATIVE_ETHERNET in server.hpp [-Wcpp]

warning WEBSOCKETS_USE_ETHERNET and USE_NATIVE_ETHERNET in server.hpp

  ^``

Thanks a lot for your work!

khoih-prog commented 3 years ago

Thanks for your interest in the library, hoping it's working well for you.

Those are informational warnings which are intentionally included to let users know what's happening with the configurations.

I have to use them in the library as there are too many different settings (boards, Ethernet / WiFi shields, etc), without information, it's difficult or impossible to know what wrong with the settings, etc.

If you're sophisticated user, you can know where the warnings are and just simply comment out those warning lines.