Skip to content
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

expected ';' before '}' token in AsyncFsWebServer.cpp #54

Open
forty76 opened this issue Dec 13, 2024 · 5 comments
Open

expected ';' before '}' token in AsyncFsWebServer.cpp #54

forty76 opened this issue Dec 13, 2024 · 5 comments

Comments

@forty76
Copy link

forty76 commented Dec 13, 2024

expected ';' before '}' token in file AsyncFsWebServer.cpp
ln 203, col 19
Compiled with platformio in VSC

function is
void AsyncFsWebServer::setTaskWdt(uint32_t timeout) {
#if defined(ESP32)
#if ESP_ARDUINO_VERSION_MAJOR > 2
esp_task_wdt_config_t twdt_config = {
.timeout_ms = timeout,
.idle_core_mask = (1 << portNUM_PROCESSORS) - 1, // Bitmask of all cores
.trigger_panic = false,
};
ESP_ERROR_CHECK(esp_task_wdt_reconfigure(&twdt_config));
#else
ESP_ERROR_CHECK(esp_task_wdt_init(timeout/1000, 0));
#endif
(void*)timeout <------ expected ; ?
#endif
}

@cotestatnt
Copy link
Owner

Thanks for reporting. I just fixed the bug.
In fact a ; is missing. I didn't notice it until now because I use version 3.x of the ESP32 core for Arduino while PlatformIO is still at version 2.x

By the way that line is useless, it's only there to avoid annoying warnings of unused variable.

@forty76
Copy link
Author

forty76 commented Dec 13, 2024

Thanks for fixed and your grate job.

Now I have 2 similar problem
AsyncEspFsWebserver/src/AsyncFsWebServer.cpp
invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] --> ln 160, col 28
client->printf("{"Websocket connected": true, "clients": %"PRIu32"}", client->id());

invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix] --> ln 170, clo 31
Serial.printf(**"**ws[%s][%"PRIu32"] %s-message[%llu]: ", server->url(), client->id(), (info->opcode == WS_TEXT)?"text":"binary", info->len);

@forty76
Copy link
Author

forty76 commented Dec 13, 2024

Can you suggest me a basic example for ESP32 ?
In this moment I have try compile your library example in Arduino IDE v2 ver 2.3.4 with ESP8266 and ESP32 board. I have some compile error

@cotestatnt
Copy link
Owner

cotestatnt commented Dec 21, 2024

What version of the core are you using? I'm on the 3.0.7 version now.
The errors you mentioned in your previous post appeared as warnings for me (and have been fixed now).
Unfortunately, in some core releases, there is a setting that treats warnings as errors.

@cotestatnt
Copy link
Owner

With the latest available version, 3.1.0, it seems that some definitions related to FreeRTOS have changed.
In particular, there is the variable extern void *pxCurrentTCB; used in the AsyncWebLock class, which has now been renamed to pxCurrentTCBs. In the latest available commit, I’ve added handling for this change.

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

No branches or pull requests

2 participants