khoih-prog / megaAVR_TimerInterrupt

This library enables you to use Interrupt from Hardware Timers on an ATmega4809-based board, such as Arduino UNO WiFi Rev2, AVR_NANO_EVERY, etc. It now supports 16 ISR-based timers, while consuming only 1 hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks.
MIT License
5 stars 1 forks source link

Warning on _prescalerIndex not initialized #3

Closed pischky closed 2 years ago

pischky commented 2 years ago

eclipse (sloeber 4.4.0) shows two warnings:

Member '_prescalerIndex' was not initialized in this constructor 

megaAVR_TimerInterrupt.hpp

line 126    

Code Analysis Problem

Same in line 136

Version used 1.6.0 on Arduino Nano Every. Platform version 1.8.7.

Looks to me that _prescalerIndex is defined but never used. So I assume that this is no real problem.

khoih-prog commented 2 years ago

Thanks, will remove that unused variable in next release to suppress the warnings.

khoih-prog commented 2 years ago

Hi @pischky

Done in megaAVR_TimerInterrupt releases v1.6.1.

Thanks,


Release v1.6.1

  1. Suppress warnings when _TIMERINTERRUPT_LOGLEVEL_ < 2
  2. Remove unused _prescalerIndex