diff --git a/drivers/filesystems/ext2/CMakeLists.txt b/drivers/filesystems/ext2/CMakeLists.txt index 7f9eb56bcf6..bdf5bcb9014 100644 --- a/drivers/filesystems/ext2/CMakeLists.txt +++ b/drivers/filesystems/ext2/CMakeLists.txt @@ -100,7 +100,9 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") -Wno-pointer-sign -Wno-unused-function -Wno-unused-variable -Wno-missing-braces -Wno-unused-but-set-variable) endif() -if(CMAKE_C_COMPILER_ID STREQUAL "Clang") +if(CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_options(ext2fs PRIVATE -Wno-address-of-packed-member) +elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang") target_compile_options(ext2fs PRIVATE -Wno-parentheses-equality -Wno-incompatible-pointer-types-discards-qualifiers