Open SteveRMann opened 3 years ago
unsigned int rc is a 32 bit value, changing it to uint16_t may have unforeseen consequences, better to change expectedLength to be unsigned as it's unlikely to ever be negative
The suggested simple fix by @m1cje to declare unsigned int expectedLength
in
is obviously valid as:
All of llen
, tlen
and plength
are uint8/16_t
or unsigned int
either. Hence expectedLength
cannot become negative at all.
Thanks for providing and maintaining this library in the first place!
I know it's "just a warning", but it is so easy to fix.
Complete warning:
Solution: In PubSubClient.cpp, at line 481, change unsigned int rc to uint16_t rc