knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.78k stars 1.46k forks source link

compare between unsigned integer and integer in PubSubClient.cpp #1008

Open spellbinder103 opened 1 year ago

spellbinder103 commented 1 year ago

when i compile INO file with Arduino IDE i saw some non-critical warning message, after i investigate i found some curious in PubSubClient.cpp file.

at line 481, unsigned int rc = 0; at line 487, int expectedLength; and... at line 523, return (rc == expectedLength);

compiler warning message is: comparison of integer expressions of different signedness: 'unsigned int' and 'int'

expectedLength shall change from int to unsigned int?