Skip to content

ESPAsyncWebServer.h:1107:49: error: passing 'const AsyncServer' as 'this' argument discards qualifiers [-fpermissive] #157

@rob040

Description

@rob040

Platform

ESP32

IDE / Tooling

Arduino (IDE/CLI)

What happened?

Compilation error on this library internal member function:

e:\develop\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h: In member function 'tcp_state AsyncWebServer::state() const':
e:\develop\Arduino\libraries\ESP_Async_WebServer\src/ESPAsyncWebServer.h:1107:49: error: passing 'const AsyncServer' as 'this' argument discards qualifiers [-fpermissive]
1107 | return static_cast<tcp_state>(_server.status());
| ~~~~~~~~~~~~~~^~

Using latest version of ESPAsyncWebServer v3.7.6
Using latest version of AsyncTCP v3.3.6
Using latest Arduino IDE version v2.3.6
Using ArduinoESP32 Arduino Release v3.2.0 based on ESP-IDF v5.4.1

Stack Trace

See compiler output above

Minimal Reproductible Example (MRE)

From Arduino library AsyncEspFsWebserver v2.0.2 (latest) by Tolentino Cotesta, compile example customOptions, without any modifications

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions