From 121f7c94752e0ef5a4a3983e553ffc6408c34cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 10 Aug 2015 17:28:58 +0200 Subject: [PATCH] Disable -Wunused-result in programs and tests --- programs/CMakeLists.txt | 4 ++++ tests/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 4cdae7821..0bbc29405 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -1,3 +1,7 @@ +if(CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result") +endif(CMAKE_COMPILER_IS_GNUCC) + add_subdirectory(aes) add_subdirectory(hash) add_subdirectory(pkey) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 62a24685d..3b3ad3650 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,7 +29,7 @@ function(add_test_suite suite_name) add_test(${data_name}-suite test_suite_${data_name}) endfunction(add_test_suite) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function -Wno-unused-result") add_test_suite(aes aes.ecb) add_test_suite(aes aes.cbc)