Closed
Labels
Description
Platform
ESP32
IDE / Tooling
pioarduino
What happened?
Compiling the library esp32async/ESPAsyncWebServer @ 3.12.1 with the build_flags -Wshadow results in lots of warnings that requires attention, specially the declaration of 'i' shadows a previous local.
WebRequest.cpp
- declaration of 'AsyncClient* c' shadows a parameter [-Wshadow] [Ln 47, Col 30]
- declaration of 'AsyncClient* c' shadows a parameter [-Wshadow] [Ln 55, Col 30]
- declaration of 'AsyncClient* c' shadows a parameter [-Wshadow] [Ln 63, Col 30]
- declaration of 'AsyncClient* c' shadows a parameter [-Wshadow] [Ln 70, Col 30]
- declaration of 'AsyncClient* c' shadows a parameter [-Wshadow] [Ln 78, Col 30]
- declaration of 'AsyncClient* c' shadows a parameter [-Wshadow] [Ln 86, Col 30]
- declaration of 'i' shadows a previous local [-Wshadow] [Ln 191, Col 18]
- declaration of 'i' shadows a previous local [-Wshadow] [Ln 204, Col 20]
- declaration of 'i' shadows a previous local [-Wshadow] [Ln 221, Col 18]
Stack Trace
Does not apply
Minimal Reproductible Example (MRE)
Compile the library esp32async/ESPAsyncWebServer @ 3.12.1 with the build flag -Wshadow.
I confirm that:
- I have read the documentation.
- I have searched for similar discussions.
- I have searched for similar issues.
- I have looked at the examples.
- I have upgraded to the lasted version of ESPAsyncWebServer (and AsyncTCP for ESP32).
Activity
mathieucarbou commentedon Sep 16, 2026
@wrgallo : how this is an issue ?
mathieucarbou commentedon Sep 16, 2026
For these, if you look carefully at the code you'll see that these are false warnings. There is no shadowing in reality because the lambdas are not capturing anything.