From 898b52be45f476d7062d50fed722d92f0dccf4ae Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 28 Jun 2022 16:27:44 +0700 Subject: update rp2040 warnings - remove "-Wno-stringop-overflow -Wno-array-bounds" - skip -Wconversion for gcc 9 and prior - suppress_tinyusb_warnings only when building with gcc 9 and below --- examples/example.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples/example.cmake') diff --git a/examples/example.cmake b/examples/example.cmake index 6bb82a56d..3e395d53f 100644 --- a/examples/example.cmake +++ b/examples/example.cmake @@ -21,5 +21,11 @@ target_compile_options(${PROJECT} PUBLIC -Wuninitialized -Wunused -Wredundant-decls + ) + +# GCC version 9 or prior has a bug with incorrect Wconversion warnings +if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0) + target_compile_options(${PROJECT} PUBLIC -Wconversion ) +endif() -- cgit v1.3.1