From 0ac6430d3a8d4c778cf5ff5e340d82a7f356652c Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Mon, 10 Aug 2015 22:26:28 -0700 Subject: ci: reenable mistakenly removed CFLAGS -Wstrict-prototypes -Wno-unused-function have some use, leave them in. --- CMakeLists.txt | 4 ++-- configure.ac | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a683fb5..69d7906 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,9 +37,9 @@ set(VERSION ${_API_VERSION_MAJOR}.${_API_VERSION_MINOR}.${_API_VERSION_PATCH}) if (MSVC) set(CMAKE_C_FLAGS "/W4 /nologo ${CMAKE_C_FLAGS}") elseif (CMAKE_C_COMPILER_ID MATCHES ".*Clang") - set(CMAKE_C_FLAGS "-Wall -Wextra -fno-common -fvisibility=hidden ${CMAKE_C_FLAGS}") + set(CMAKE_C_FLAGS "-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -fno-common -fvisibility=hidden ${CMAKE_C_FLAGS}") elseif (CMAKE_COMPILER_IS_GNUCC) - set(RMQ_C_FLAGS "-Wall -Wextra -fno-common") + set(RMQ_C_FLAGS "-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -fno-common") execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) if (GCC_VERSION VERSION_GREATER 4.0 OR GCC_VERSION VERSION_EQUAL 4.0) set(RMQ_C_FLAGS "${RMQ_C_FLAGS} -fvisibility=hidden") diff --git a/configure.ac b/configure.ac index 03b6fcd..4f70781 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,8 @@ AC_C_INLINE # Set compiler flags AX_TRY_CFLAGS([-Wall], [AX_CFLAGS([-Wall])]) AX_TRY_CFLAGS([-Wextra], [AX_CFLAGS([-Wextra])]) +AX_TRY_CFLAGS([-Wstrict-prototypes], [AX_CFLAGS([-Wstrict-prototypes])]) +AX_TRY_CFLAGS([-Wno-unused-function], [AX_CFLAGS([-Wno-unused-function])]) AX_TRY_CFLAGS([-fno-common], [AX_CFLAGS([-fno-common])]) AX_TRY_CFLAGS([-fvisibility=hidden], [AX_CFLAGS([-fvisibility=hidden])]) AX_TRY_LDFLAGS([-no-undefined], [NO_UNDEFINED=-no-undefined]) -- cgit v1.2.1