Adafruit_MQTT_Library icon indicating copy to clipboard operation
Adafruit_MQTT_Library copied to clipboard

Adafruit_MQTT.cpp:264:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Open flavio-fernandes opened this issue 5 years ago • 1 comments

  • Arduino board:

ESP8266

platform = espressif8266
board = esp12e
framework = arduino
  • Arduino IDE version (found in Arduino -> About Arduino menu):
PlatformIO, version 4.3.4
Using Adafruit MQTT Library version 1.3.0
  • List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too):

Using platform.io, compile project that uses Adafruit_MQTT_Library

...
Compiling .pio/build/esp12e/lib2f0/ESP8266WiFi/BearSSLHelpers.cpp.o
/Users/ff/.platformio/lib/Adafruit MQTT Library/Adafruit_MQTT.cpp: In member function 'uint16_t Adafruit_MQTT::readFullPacket(uint8_t*, uint16_t, uint16_t)':
/Users/ff/.platformio/lib/Adafruit MQTT Library/Adafruit_MQTT.cpp:264:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (value > (maxsize - (pbuff - buffer) - 1)) {
                                              ^
Archiving .pio/build/esp12e/lib16c/libAdafruit Unified Sensor.a
...

Reference project where I see this: https://github.com/flavio-fernandes/iotMqttAttic

flavio-fernandes avatar Sep 12 '20 12:09 flavio-fernandes

Same problem here. Created a pull request.

mpoettgen avatar Feb 15 '21 22:02 mpoettgen