esp_system: fix and reenable no-format warning

This commit is contained in:
Zim Kalinowski
2023-03-10 12:40:42 +01:00
parent 7c5d65b82b
commit fb7aafd348
5 changed files with 8 additions and 10 deletions

View File

@@ -129,5 +129,3 @@ if(NOT BOOTLOADER_BUILD)
idf_component_optional_requires(PRIVATE esp_psram) idf_component_optional_requires(PRIVATE esp_psram)
endif() endif()
endif() endif()
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -45,7 +45,7 @@ extern void esp_dbg_stubs_ll_init(void *stub_table_addr);
// TODO: all called funcs should be in IRAM to work with disabled flash cache // TODO: all called funcs should be in IRAM to work with disabled flash cache
static void * esp_dbg_stubs_data_alloc(uint32_t size) static void * esp_dbg_stubs_data_alloc(uint32_t size)
{ {
ESP_LOGV(TAG, "%s %d", __func__, size); ESP_LOGV(TAG, "%s %"PRIu32, __func__, size);
void *p = malloc(size); void *p = malloc(size);
ESP_LOGV(TAG, "%s EXIT %p", __func__, p); ESP_LOGV(TAG, "%s EXIT %p", __func__, p);
return p; return p;

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -29,5 +29,5 @@ void esp_dbg_stubs_ll_init(void *stub_table_addr)
// notify host about control block address // notify host about control block address
int res = esp_dbg_stubs_advertise_table(stub_table_addr); int res = esp_dbg_stubs_advertise_table(stub_table_addr);
assert(res == 0 && "Failed to send debug stubs table address to host!"); assert(res == 0 && "Failed to send debug stubs table address to host!");
ESP_LOGV(TAG, "%s stubs %x", __func__, stub_table_addr); ESP_LOGV(TAG, "%s stubs %p", __func__, stub_table_addr);
} }

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -19,5 +19,5 @@ const static char *TAG = "esp_dbg_stubs";
void esp_dbg_stubs_ll_init(void *stub_table) void esp_dbg_stubs_ll_init(void *stub_table)
{ {
eri_write(ESP_DBG_STUBS_TRAX_REG, (uint32_t)stub_table); eri_write(ESP_DBG_STUBS_TRAX_REG, (uint32_t)stub_table);
ESP_LOGV(TAG, "%s stubs %x", __func__, eri_read(ESP_DBG_STUBS_TRAX_REG)); ESP_LOGV(TAG, "%s stubs %"PRIx32, __func__, eri_read(ESP_DBG_STUBS_TRAX_REG));
} }

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -57,7 +57,7 @@ esp_err_t esp_xt_wdt_init(const esp_xt_wdt_config_t *cfg)
if (cfg->auto_backup_clk_enable) { if (cfg->auto_backup_clk_enable) {
/* Estimate frequency of internal RTC oscillator */ /* Estimate frequency of internal RTC oscillator */
uint32_t rtc_clk_frequency_khz = rtc_clk_freq_cal(rtc_clk_cal(RTC_CAL_INTERNAL_OSC, RTC_CLK_CAL_CYCLES)) / 1000; uint32_t rtc_clk_frequency_khz = rtc_clk_freq_cal(rtc_clk_cal(RTC_CAL_INTERNAL_OSC, RTC_CLK_CAL_CYCLES)) / 1000;
ESP_LOGD(TAG, "Calibrating backup clock from rtc clock with frequency %d", rtc_clk_frequency_khz); ESP_LOGD(TAG, "Calibrating backup clock from rtc clock with frequency %"PRIu32, rtc_clk_frequency_khz);
xt_wdt_hal_enable_backup_clk(&s_hal_ctx, rtc_clk_frequency_khz); xt_wdt_hal_enable_backup_clk(&s_hal_ctx, rtc_clk_frequency_khz);
} }