Skip to content

Commit

Permalink
zephyr: CMakeLists: disable packed-related warnings
Browse files Browse the repository at this point in the history
This commit disables the potential missalignment warnings
caused by code using address of packed structure member.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
  • Loading branch information
LaurentiuM1234 committed Nov 24, 2023
1 parent 6c6a186 commit 38b4799
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,8 @@ if (NOT CONFIG_COMPILER_INLINE_FUNCTION_OPTION)
target_compile_options(SOF INTERFACE -fno-inline-functions)
endif()

target_compile_options(SOF INTERFACE -Wno-address-of-packed-member)

# SOF needs `typeof`, `__VA_ARGS__` and maybe other GNU C99
# extensions. TODO other flags required ?
target_compile_options(SOF INTERFACE $<$<COMPILE_LANGUAGE:C,ASM>: -std=gnu99>)
Expand Down

0 comments on commit 38b4799

Please sign in to comment.