Problem with ArduinoIDE 2.0.0 on Windows11
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
Ahh, good find. I will add to my to-do list. Have been away so playing a bit of catch up. Thanks for taking the time share the feedback.
On Mon, 19 Feb 2024, 8:51 am pallik49, @.***> wrote:
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
— Reply to this email directly, view it on GitHub https://github.com/rwmingis/InterruptButton/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW24E325B3PJLEA42QJKBDYUJZWJAVCNFSM6AAAAABDOO6MK2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2DCMRQGEYTAOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>