Closed
Description
In file included from /usr/share/arduino-1.8.13/libraries/Ethernet/src/Dns.cpp:8:0:
/usr/share/arduino-1.8.13/libraries/Ethernet/src/Dns.cpp: In member function 'uint16_t DNSClient::BuildRequest(const char*)':
/usr/share/arduino-1.8.13/libraries/Ethernet/src/utility/w5100.h:457:25: warning: result of '(256 << 8)' requires 18 bits to represent, but 'int' only has 16 bits [-Wshift-overflow=]
#define htons(x) ( (((x)<<8)&0xFF00) | (((x)>>8)&0xFF) )
+++ Set a pragma to locally turn of that warning if you know about the overflow and it's OK. +++
Your library shall compile without warnings.
Regards,
Harald.