fbiego / ESP32Time

An Arduino library for setting and retrieving internal RTC time on ESP32 boards
MIT License
222 stars 37 forks source link

Missing initializer for member "overflow" #27

Closed Nanowires closed 1 year ago

Nanowires commented 1 year ago

Hi,

I'm using the IDE sloeber and get the compiler warning: Member 'overflow' was not initialized in this constructor

Also when I'm using the library, the overflow is always true (remark: uninitialized variables are random, bool is using an uint8_t I guess, so 254 of 255 cases).

Fix would be to explicitly initialize the value of overflow in the constructor.

In your defence, it semms like the Arduino IDE compiler will automatically initialize primitive types, but it's not specified behaviour and should be avoided ;-)

Thanks

fbiego commented 1 year ago

Can you create a pr with the changes?

Nanowires commented 1 year ago

Please see #28

Nanowires commented 1 year ago

This was fast and easy 😲 👍