Skip to content

Commit 5a92779

Browse files
authored
Suppress false GCC 11 warning on TinyUSB (#819)
1 parent 60a6fea commit 5a92779

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/rp2_common/tinyusb/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,13 @@ if (EXISTS ${PICO_TINYUSB_PATH}/${TINYUSB_TEST_PATH})
4545
pico_add_impl_library(tinyusb_board)
4646
target_link_libraries(tinyusb_board INTERFACE tinyusb_bsp)
4747

48+
# Override suppress_tinyusb_warnings to add suppression of (falsely) reported GCC 11.2 warnings
49+
function(suppress_tinyusb_warnings)
50+
_suppress_tinyusb_warnings()
51+
set_source_files_properties(
52+
${PICO_TINYUSB_PATH}/src/portable/raspberrypi/rp2040/rp2040_usb.c
53+
PROPERTIES
54+
COMPILE_FLAGS "-Wno-stringop-overflow -Wno-array-bounds")
55+
endfunction()
4856
pico_promote_common_scope_vars()
4957
endif()

0 commit comments

Comments
 (0)