monstrenyatko / ArduinoMqtt

MQTT client for Arduino
MIT License
72 stars 13 forks source link

Not a real issue - uninitialized variable #31

Closed gimbus109 closed 1 month ago

gimbus109 commented 1 year ago

Hello, as stated in the title - it's not an issue, but is a bit annoying: the library compiles smoothly under Arduino Ide, but under Visual Studio with VisualMicro extension got an error in publish method. The source of that error is in uninitialized variable packet id. It's then set if QoS > 0, if QoS=0 remains uninitialized. Assigning any value to it doesn't disturb anything - pocketid is used (in the next step in the library) only if QoS>0, but mitigates annoying compiler errors. And -last but not least - thank You for that library, I've been testing it for some time with SIM868 GSM module and it works great.

gimbus109

monstrenyatko commented 1 month ago

@gimbus109 , thank you for highlighting the problem.