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.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01097fd..92ed4aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@
 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/icd/intel/CMakeLists.txt b/icd/intel/CMakeLists.txt
index 1548e1d..3bb1638 100644
--- a/icd/intel/CMakeLists.txt
+++ b/icd/intel/CMakeLists.txt
@@ -1,8 +1,9 @@
 # Create the i965 XGL DRI library
 
-add_subdirectory(compiler)
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -Wno-sign-compare")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare")
 
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES")
+add_subdirectory(compiler)
 
 find_package(DRM REQUIRED COMPONENTS libdrm libdrm_intel)
 
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 @@
 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 @@
     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)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 648c351..23dfc42 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -12,7 +12,7 @@
     message(FATAL_ERROR "Missing ImageMagick library: sudo apt-get install libmagickwand-dev")
 endif()
 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES -Wno-sign-compare")
 
 SET(COMMON_CPP
     xglrenderframework.cpp