From 6cc5ba98ed9527a7afd453375dfddd71367f315c Mon Sep 17 00:00:00 2001 From: Paul Olaru Date: Tue, 9 Nov 2021 15:49:54 +0200 Subject: [PATCH] tools: ctl: CMakeLists: Add -Wall and -Werror flags These flags are required to prevent unwanted bugs in the ctl tool. They have been used to detect an undefined behaviour instance which occurred due to lack of a return value in a non-void function. Signed-off-by: Paul Olaru --- tools/ctl/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/ctl/CMakeLists.txt b/tools/ctl/CMakeLists.txt index 6cf6fea59..70735f88d 100644 --- a/tools/ctl/CMakeLists.txt +++ b/tools/ctl/CMakeLists.txt @@ -8,6 +8,10 @@ target_link_libraries(sof-ctl PRIVATE "-lasound" ) +target_compile_options(sof-ctl PRIVATE + -Wall -Werror +) + target_include_directories(sof-ctl PRIVATE "${SOF_ROOT_SOURCE_DIRECTORY}/src/include" "${SOF_ROOT_SOURCE_DIRECTORY}"