fix(websocket): Cleaned up printf/format warnings (-Wno-format)

This commit is contained in:
David Cermak
2023-05-17 07:35:21 +02:00
parent c974c14220
commit e085826dbb
4 changed files with 2 additions and 4 deletions

View File

@ -10,4 +10,3 @@ idf_component_register(SRCS "esp_websocket_client.c"
INCLUDE_DIRS "include" INCLUDE_DIRS "include"
REQUIRES lwip esp-tls tcp_transport http_parser REQUIRES lwip esp-tls tcp_transport http_parser
PRIV_REQUIRES esp_timer esp_event) PRIV_REQUIRES esp_timer esp_event)
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

View File

@ -1107,7 +1107,7 @@ int esp_websocket_client_send_with_opcode(esp_websocket_client_handle_t client,
} }
if (xSemaphoreTakeRecursive(client->lock, timeout) != pdPASS) { if (xSemaphoreTakeRecursive(client->lock, timeout) != pdPASS) {
ESP_LOGE(TAG, "Could not lock ws-client within %d timeout", timeout); ESP_LOGE(TAG, "Could not lock ws-client within %" PRIu32 " timeout", timeout);
return ESP_FAIL; return ESP_FAIL;
} }

View File

@ -1,3 +1,2 @@
idf_component_register(SRCS "websocket_example.c" idf_component_register(SRCS "websocket_example.c"
INCLUDE_DIRS ".") INCLUDE_DIRS ".")
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

View File

@ -170,7 +170,7 @@ static void websocket_app_start(void)
void app_main(void) void app_main(void)
{ {
ESP_LOGI(TAG, "[APP] Startup.."); ESP_LOGI(TAG, "[APP] Startup..");
ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size()); ESP_LOGI(TAG, "[APP] Free memory: %" PRIu32 " bytes", esp_get_free_heap_size());
ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version()); ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version());
esp_log_level_set("*", ESP_LOG_INFO); esp_log_level_set("*", ESP_LOG_INFO);
esp_log_level_set("websocket_client", ESP_LOG_DEBUG); esp_log_level_set("websocket_client", ESP_LOG_DEBUG);