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
This commit is contained in:
hathach
2022-06-28 16:27:44 +07:00
parent 83602ea123
commit 898b52be45
4 changed files with 37 additions and 32 deletions

View File

@@ -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()