From c8585267ab804b50b28473c0285d8538aa3bd5b2 Mon Sep 17 00:00:00 2001 From: Tomas Rezucha Date: Tue, 9 Aug 2022 11:58:59 +0200 Subject: [PATCH] usb: Remove -Wno-format compile option --- components/usb/CMakeLists.txt | 4 ---- components/usb/test/CMakeLists.txt | 1 - components/usb/test/common/test_usb_mock_classes.c | 8 ++++---- components/usb/usbh.c | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/components/usb/CMakeLists.txt b/components/usb/CMakeLists.txt index d458fb0130..35f5d24277 100644 --- a/components/usb/CMakeLists.txt +++ b/components/usb/CMakeLists.txt @@ -23,7 +23,3 @@ idf_component_register(SRCS ${srcs} PRIV_INCLUDE_DIRS ${priv_include} PRIV_REQUIRES ${priv_require} ) - -if(CONFIG_USB_OTG_SUPPORTED) - target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") -endif() diff --git a/components/usb/test/CMakeLists.txt b/components/usb/test/CMakeLists.txt index 71754ca539..7857c7ee66 100644 --- a/components/usb/test/CMakeLists.txt +++ b/components/usb/test/CMakeLists.txt @@ -10,4 +10,3 @@ idf_component_register( PRIV_INCLUDE_DIRS "../private_include" "common" "hcd" "usb_host" PRIV_REQUIRES cmock usb test_utils ) -target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") diff --git a/components/usb/test/common/test_usb_mock_classes.c b/components/usb/test/common/test_usb_mock_classes.c index 7a626cfbcd..1a049fd447 100644 --- a/components/usb/test/common/test_usb_mock_classes.c +++ b/components/usb/test/common/test_usb_mock_classes.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #include #include #include "usb/usb_types_ch9.h" @@ -83,15 +83,15 @@ bool mock_msc_scsi_check_csw(mock_msc_bulk_csw_t *csw, uint32_t tag_expect) bool no_issues = true; if (csw->dCSWSignature != 0x53425355) { no_issues = false; - printf("Warning: csw signature corrupt (0x%X)\n", csw->dCSWSignature); + printf("Warning: csw signature corrupt (0x%"PRIX32")\n", csw->dCSWSignature); } if (csw->dCSWTag != tag_expect) { no_issues = false; - printf("Warning: csw tag unexpected! Expected %d got %d\n", tag_expect, csw->dCSWTag); + printf("Warning: csw tag unexpected! Expected %"PRIu32" got %"PRIu32"\n", tag_expect, csw->dCSWTag); } if (csw->dCSWDataResidue) { no_issues = false; - printf("Warning: csw indicates data residue of %d bytes!\n", csw->dCSWDataResidue); + printf("Warning: csw indicates data residue of %"PRIu32" bytes!\n", csw->dCSWDataResidue); } if (csw->bCSWStatus) { no_issues = false; diff --git a/components/usb/usbh.c b/components/usb/usbh.c index 858ce3d0c9..6426e16c8f 100644 --- a/components/usb/usbh.c +++ b/components/usb/usbh.c @@ -407,7 +407,7 @@ esp_err_t usbh_process(void) Exit critical section to handle device action flags in their listed order --------------------------------------------------------------------- */ USBH_EXIT_CRITICAL(); - ESP_LOGD(USBH_TAG, "Processing actions 0x%x", action_flags); + ESP_LOGD(USBH_TAG, "Processing actions 0x%"PRIx32"", action_flags); //Sanity check. If the device is being freed, there must not be any other action flags set assert(!(action_flags & DEV_FLAG_ACTION_FREE) || action_flags == DEV_FLAG_ACTION_FREE);