From 5a927792ef0d425da92391f8333cf4776aa8ed62 Mon Sep 17 00:00:00 2001 From: Graham Sanderson Date: Wed, 11 May 2022 14:49:57 -0500 Subject: [PATCH] Suppress false GCC 11 warning on TinyUSB (#819) --- src/rp2_common/tinyusb/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rp2_common/tinyusb/CMakeLists.txt b/src/rp2_common/tinyusb/CMakeLists.txt index 80a6e78..ea919cd 100644 --- a/src/rp2_common/tinyusb/CMakeLists.txt +++ b/src/rp2_common/tinyusb/CMakeLists.txt @@ -45,5 +45,13 @@ if (EXISTS ${PICO_TINYUSB_PATH}/${TINYUSB_TEST_PATH}) pico_add_impl_library(tinyusb_board) target_link_libraries(tinyusb_board INTERFACE tinyusb_bsp) + # Override suppress_tinyusb_warnings to add suppression of (falsely) reported GCC 11.2 warnings + function(suppress_tinyusb_warnings) + _suppress_tinyusb_warnings() + set_source_files_properties( + ${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/rp2040_usb.c + PROPERTIES + COMPILE_FLAGS "-Wno-stringop-overflow -Wno-array-bounds") + endfunction() pico_promote_common_scope_vars() endif()