arduino-libraries / WiFi

WiFi Library for Arduino
http://arduino.cc/
115 stars 58 forks source link

`-Wsign-compare` compiler warnings #74

Open zfields opened 4 months ago

zfields commented 4 months ago
~/Development/Arduino/hardware/test/mbed_opta/libraries/SocketWrapper/src/MbedUdp.cpp:77:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < size; i++) {
                   ~~^~~~~~
~/Development/Arduino/hardware/test/mbed_opta/libraries/SocketWrapper/src/MbedUdp.cpp: In member function 'virtual size_t arduino::MbedUDP::write(const uint8_t*, size_t)':
~/Development/Arduino/hardware/test/mbed_opta/libraries/SocketWrapper/src/MbedUdp.cpp:97:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i<size; i++) {
                   ~^~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-deprecated-copy'
~/Development/Arduino/hardware/test/mbed_opta/libraries/SocketWrapper/src/MbedClient.cpp: In member function 'size_t arduino::MbedClient::write(const uint8_t*, size_t)':
~/Development/Arduino/hardware/test/mbed_opta/libraries/SocketWrapper/src/MbedClient.cpp:221:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   } while ((ret != size && ret == NSAPI_ERROR_WOULD_BLOCK) && connected());
             ~~~~^~~~~~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-deprecated-copy'
~/Development/Arduino/hardware/test/mbed_opta/libraries/SocketWrapper/src/SocketHelpers.cpp: In member function 'int arduino::MbedSocketClass::download(const char*, bool, mbed::Callback<void(const char*, long unsigned int)>)':
~/Development/Arduino/hardware/test/mbed_opta/libraries/SocketWrapper/src/SocketHelpers.cpp:192:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i=0; i<header_fields.size(); i++) {
                ~^~~~~~~~~~~~~~~~~~~~~
zfields commented 4 months ago

arduino-cli compile --verbose --warnings=all --build-property "build.extra_flags=-Wno-unused-variable -Wno-implicit-fallthrough -Wno-psabi -Wno-deprecated-copy -Wno-missing-field-initializers -Wno-vla -Wno-delete-non-virtual-dtor -Og -g" --fqbn arduino:mbed_opta:opta <dev folder>