external/CMakeLists.txt: remove duplicate flags
What changed, and why it matters
This commit is a routine build cleanup. It removes a duplicate set of compiler warning-suppression flags from one part of the build file and adds one warning flag (-Wno-cast-align) to another part so the firmware still compiles cleanly. It does not change any runtime code, cryptographic logic, or user-facing behavior.
No security action needed. Treat as normal build maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies external/CMakeLists.txt. It deletes a redundant target_compile_options() block on asf4-drivers-min and merges the needed -Wno-cast-align flag into the existing target_compile_options() for asf4-drivers. The flags only suppress compiler warnings; they do not alter generated code semantics or fix a vulnerability.
Changed components
external/CMakeLists.txtInspect captured patch +1 / −3
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index be7370a..74648e2 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -81,8 +81,6 @@ if(CMAKE_CROSSCOMPILING)
target_link_libraries(asf4-drivers-min samd51a-ds)
set_property(TARGET asf4-drivers-min PROPERTY INTERFACE_LINK_LIBRARIES "")
- target_compile_options(asf4-drivers-min PRIVATE -Wno-cast-qual
- -Wno-unused-parameter -Wno-missing-prototypes -Wno-missing-declarations -Wno-cast-align)
target_include_directories(asf4-drivers-min SYSTEM
PUBLIC
@@ -119,7 +117,7 @@ if(CMAKE_CROSSCOMPILING)
asf4-drivers/diskio/sdmmc_diskio.c
)
- target_compile_options(asf4-drivers PRIVATE -Wno-cast-qual -Wno-unused-parameter -Wno-switch-default -Wno-bad-function-cast -Wno-implicit-fallthrough)
+ target_compile_options(asf4-drivers PRIVATE -Wno-cast-qual -Wno-unused-parameter -Wno-switch-default -Wno-bad-function-cast -Wno-implicit-fallthrough -Wno-cast-align)
target_link_libraries(asf4-drivers
PRIVATE
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.