Skip to content

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

Open
@flavio-fernandes

Description

@flavio-fernandes
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions