- Notifications
You must be signed in to change notification settings - Fork 7
Description
I get warnings( errors) from the compiler from tag totalPolls and can not download to the ESP32-WROOM-DA Module
In Win10 this is just Warnings. If I use Arduino program 1.8.19 (not IDE) with Win11 then I can download the file.
I used the example InterruptButtonExample.ino. The problem seems to were Win11 with ArduinoIDE.
cc1plus.exe: some warnings being treated as errors in Win11
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp: In static member function 'static void InterruptButton::readButton(void*)':
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp:130:12: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
130 | btn->m_totalPolls++; // Count the number of total reads
| ~~~~~^~~~~~~~~~~~
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp:131:66: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
131 | if(gpio_get_level(btn->m_pin) == btn->m_pressedState) btn->m_validPolls++; // Count the number of valid 'PRESSED' reads
| ~~~~~^~~~~~~~~~~~
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp:164:12: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
164 | btn->m_totalPolls++;
| ~~~~~^~~~~~~~~~~~
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp:166:14: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
166 | btn->m_validPolls++;
| ~~~~~^~~~~~~~~~~~
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp:173:16: warning: '--' expression of 'volatile'-qualified type is deprecated [-Wvolatile]
173 | btn->m_validPolls--;
| ~~~~~^~~~~~~~~~~~
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp: At global scope:
e:_Arduino_2024\Heima\libraries\InterruptButton\InterruptButton.cpp:17:20: error: 'TAG' defined but not used [-Werror=unused-variable]
17 | static const char* TAG = "IBTN"; // IDF log tag
| ^~~
cc1plus.exe: some warnings being treated as errors