Detailed instructions for Windows:
Go to C:\Users\myName\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.5 (or whatever version is current)
Make a copy of platform.txt and rename it to platform.local.txt.
Inside platform.local.txt, change the Compiler Warning levels from:
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall -Werror=all
compiler.warning_flags.all=-Wall -Werror=all -Wextra
To:
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
This works when you set the Arduino Compiler warnings to 'More’ or 'All'. Tested on both 1.8.16 and 2.03 Arduino IDE.
Vern