Skip to content

Libraries - fix some warnings with gcc ≥12 #9244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2025

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented May 20, 2025

ESP8266WebServer - unused static function / function inside of namespace { ... } would always trigger '-Wunused-function'

 ../../libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h:14:15: warning: ‘String esp8266webserver::calcETag(fs::FS&, const String&)’ defined but not used [-Wunused-function]
   14 | static String calcETag(FS &fs, const String &path) {
      |               ^~~~~~~~

ESP8266WiFiMesh - class constructors used instead of aggregates. gcc10.3 allows this for some reason, but not later versions

error: designated initializers cannot be used with a non-aggregate type '...'

LEAmDNS - consistent const <-> non-const accessors for findIP4Address() and answerAtIndex()

error: infinite recursion detected [-Werror=infinite-recursion]

mcspr added 3 commits May 20, 2025 19:20
currently, only w/ mock build because it is using gcc>=12

> ../../libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h:14:15: warning: ‘String esp8266webserver::calcETag(fs::FS&, const String&)’ defined but not used [-Wunused-function]
>   14 | static String calcETag(FS &fs, const String &path) {
>      |               ^~~~~~~~
> error: designated initializers cannot be used with a non-aggregate type '...'

gcc10.3 allowed this construct for some reason
> error: infinite recursion detected [-Werror=infinite-recursion]
@mcspr mcspr merged commit 2c72e6f into esp8266:master May 20, 2025
28 checks passed
@mcspr mcspr deleted the lib/erroneous-code branch May 20, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant