From f6da0ddd4d4212667ff822576f7cc4e592b63a33 Mon Sep 17 00:00:00 2001 From: Ian Elliott Date: Fri, 13 Feb 2015 14:04:01 -0700 Subject: [PATCH] Enable additional Linux warnings, for loader/layers/demos. The intention is for Linux developers to catch more problems (real or annoyance) before porting to Windows. The new warnings are: -Wpointer-arith -Wsign-compare These are not used for the Intel sample driver (mostly because the Intel compiler from Mesa3D generates lots of these warnings, which code we don't want to modify), nor for the tests. Not sure how this affects Glave on Linux. --- CMakeLists.txt | 2 +- layers/CMakeLists.txt | 4 ++-- loader/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01097fd..92ed4aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ include_directories("${PROJECT_SOURCE_DIR}/include") include(FindPkgConfig) if (CMAKE_COMPILER_IS_GNUCC) - set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers") + set(COMMON_COMPILE_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers") set(COMMON_COMPILE_FLAGS "${COMMON_COMPILE_FLAGS} -fno-strict-aliasing -fno-builtin-memcmp") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ${COMMON_COMPILE_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILE_FLAGS}") diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 90a205a..817d2c3 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -46,8 +46,8 @@ if (WIN32) endif() if (NOT WIN32) set (CMAKE_CXX_FLAGS "-std=c++11") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES") - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES -Wpointer-arith") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -Wpointer-arith") endif() add_custom_command(OUTPUT xgl_dispatch_table_helper.h diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index a4eba04..41fd989 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -25,7 +25,7 @@ if (WIN32) target_link_libraries(XGL) endif() if (NOT WIN32) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -Wpointer-arith") add_library(XGL SHARED loader.c dispatch.c table_ops.h) set_target_properties(XGL PROPERTIES SOVERSION 0) -- 2.7.4