MCUdude / MiniCore

Arduino hardware package for ATmega8, ATmega48, ATmega88, ATmega168, ATmega328 and ATmega328PB
Other
1k stars 245 forks source link

Warnings with TimerInterrupt library #295

Closed usr97629238 closed 1 month ago

usr97629238 commented 8 months ago

Warnings while compiling with this library https://github.com/khoih-prog/TimerInterrupt that aren't happening with the stock 328P core:

C:\...\packages\MiniCore\hardware\avr\3.0.1\cores\MCUdude_corefiles/Arduino.h: In instantiation of 'decltype (((b < a) ? b :  a)) min(const T&, const L&) [with T = long int; L = long unsigned int; decltype (((b < a) ? b :  a)) = long unsigned int]':
C:\...\libraries\TimerInterrupt\src/TimerInterrupt.hpp:401:70:   required from here
C:\...\packages\MiniCore\hardware\avr\3.0.1\cores\MCUdude_corefiles/Arduino.h:315:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   return (b < a) ? b : a;
          ~~~^~~~
MCUdude commented 1 month ago

Nothing to worry about. MiniCore uses a slighty different min implementation. But the warning is current, you're comparing a signed and an unsigned variable.