Suppress false GCC 11 warning on TinyUSB (#819)

This commit is contained in:
Graham Sanderson 2022-05-11 14:49:57 -05:00 committed by GitHub
parent 60a6fea534
commit 5a927792ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,5 +45,13 @@ if (EXISTS ${PICO_TINYUSB_PATH}/${TINYUSB_TEST_PATH})
pico_add_impl_library(tinyusb_board) pico_add_impl_library(tinyusb_board)
target_link_libraries(tinyusb_board INTERFACE tinyusb_bsp) 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() pico_promote_common_scope_vars()
endif() endif()