If your sketch compilation fails and the output contains the message cc1plus: some warnings being treated as errors, it may be caused by the Compiler warnings setting in Arduino IDE.
When the Compiler warnings option is set to More or All, the compiler is instructed to treat standard code warnings as fatal errors, halting the compilation process.
To fix this, reset the compiler warnings level to the default setting:
- Open the Arduino IDE.
- Open the Preferences window by selecting File > Preferences (Windows/Linux) or Arduino IDE > Settings (macOS).
- Locate the Compiler warnings dropdown menu.
- Change the setting to Default.
- Click OK to save the changes.
- Verify or upload your sketch again.