Disable -Wunused-result in programs and tests
diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt
index 4cdae78..0bbc294 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 62a2468..3b3ad36 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -29,7 +29,7 @@
     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)