Compiler flag -Wundef + fix incorrect macro

This commit is contained in:
Max Bruckner 2017-02-03 12:13:17 +01:00
parent 981f59b163
commit fe18403935
3 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT
option(ENABLE_CUSTOM_COMPILER_FLAGS "Enables custom compiler flags for Clang and GCC" ON) option(ENABLE_CUSTOM_COMPILER_FLAGS "Enables custom compiler flags for Clang and GCC" ON)
if (ENABLE_CUSTOM_COMPILER_FLAGS) if (ENABLE_CUSTOM_COMPILER_FLAGS)
if(("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")) if(("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang"))
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c89 -pedantic -Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wc++-compat") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c89 -pedantic -Wall -Wextra -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wc++-compat -Wundef")
endif() endif()
endif() endif()

View File

@ -23,7 +23,7 @@ INSTALL_LIBRARY_PATH = $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
INSTALL ?= cp -a INSTALL ?= cp -a
R_CFLAGS = -fPIC -std=c89 -pedantic -Wall -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wc++-compat $(CFLAGS) R_CFLAGS = -fPIC -std=c89 -pedantic -Wall -Werror -Wstrict-prototypes -Wwrite-strings -Wshadow -Winit-self -Wcast-align -Wformat=2 -Wmissing-prototypes -Wstrict-overflow=2 -Wcast-qual -Wc++-compat -Wundef $(CFLAGS)
uname := $(shell sh -c 'uname -s 2>/dev/null || echo false') uname := $(shell sh -c 'uname -s 2>/dev/null || echo false')

View File

@ -245,7 +245,7 @@ static int pow2gt (int x)
#if INTEGER_SIZE & 0x1100 /* at least 32 bit */ #if INTEGER_SIZE & 0x1100 /* at least 32 bit */
x |= x >> 16; x |= x >> 16;
#endif #endif
#if INT_SIZE & 0x1000 /* 64 bit */ #if INTEGER_SIZE & 0x1000 /* 64 bit */
x |= x >> 32; x |= x >> 32;
#endif #endif