From f5a19bfe31075d6f5ff9044077df11b660bc169c Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 19 Apr 2015 08:39:58 +0000 Subject: [PATCH] [CMAKE] We have a zero-warnings policy in trunk, accordingly: - Disable overflow warnings in mciwave - Remove all -Wno-error directives - Remove all allow_warnings invocations - Make allow_warnings defunct, it needs to be reworked, e.g. according to CORE-6959. svn path=/trunk/; revision=67291 --- reactos/cmake/gcc.cmake | 6 ++---- reactos/dll/3rdparty/libtiff/CMakeLists.txt | 1 - reactos/dll/opengl/mesa/main/CMakeLists.txt | 1 - reactos/dll/opengl/mesa/swrast/CMakeLists.txt | 1 - reactos/dll/win32/mciwave/CMakeLists.txt | 2 +- reactos/drivers/storage/class/disk_new/CMakeLists.txt | 4 ++-- reactos/drivers/storage/classpnp/CMakeLists.txt | 5 ----- reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt | 5 ++--- rostests/winetests/ntdll/CMakeLists.txt | 1 - 9 files changed, 7 insertions(+), 19 deletions(-) diff --git a/reactos/cmake/gcc.cmake b/reactos/cmake/gcc.cmake index 25c451ccd29..2ef02a0abae 100644 --- a/reactos/cmake/gcc.cmake +++ b/reactos/cmake/gcc.cmake @@ -116,11 +116,8 @@ add_compile_flags("-Wno-char-subscripts -Wno-multichar -Wno-unused-value") if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") add_compile_flags("-Wno-maybe-uninitialized") - add_compile_flags("-Wno-error=unused-but-set-variable") endif() -add_compile_flags("-Wno-error=type-limits") - if(ARCH STREQUAL "amd64") add_compile_flags("-Wno-format") elseif(ARCH STREQUAL "arm") @@ -427,7 +424,8 @@ function(CreateBootSectorTarget _target_name _asm_file _binary_file _base_addres endfunction() function(allow_warnings __module) - add_target_compile_flags(${__module} "-Wno-error") + # We don't allow warnings in trunk, this needs to be reworked. See CORE-6959. + #add_target_compile_flags(${__module} "-Wno-error") endfunction() macro(add_asm_files _target) diff --git a/reactos/dll/3rdparty/libtiff/CMakeLists.txt b/reactos/dll/3rdparty/libtiff/CMakeLists.txt index 03736259bf6..507aa5330e4 100644 --- a/reactos/dll/3rdparty/libtiff/CMakeLists.txt +++ b/reactos/dll/3rdparty/libtiff/CMakeLists.txt @@ -59,7 +59,6 @@ add_pch(libtiff precomp.h SOURCE) add_cd_file(TARGET libtiff DESTINATION reactos/system32 FOR all) if(NOT MSVC) - allow_warnings(libtiff) if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") add_target_compile_flags(libtiff "-Wno-unused-but-set-variable") endif() diff --git a/reactos/dll/opengl/mesa/main/CMakeLists.txt b/reactos/dll/opengl/mesa/main/CMakeLists.txt index c42d9ccdeec..b4e4a965e8a 100644 --- a/reactos/dll/opengl/mesa/main/CMakeLists.txt +++ b/reactos/dll/opengl/mesa/main/CMakeLists.txt @@ -73,6 +73,5 @@ add_library(mesa_main STATIC ${SOURCE}) add_pch(mesa_main precomp.h SOURCE) if(NOT MSVC) - allow_warnings(mesa_main) add_target_compile_flags(mesa_main "-Wno-type-limits") endif() diff --git a/reactos/dll/opengl/mesa/swrast/CMakeLists.txt b/reactos/dll/opengl/mesa/swrast/CMakeLists.txt index 18302ce94f6..4c048428934 100644 --- a/reactos/dll/opengl/mesa/swrast/CMakeLists.txt +++ b/reactos/dll/opengl/mesa/swrast/CMakeLists.txt @@ -32,5 +32,4 @@ add_pch(mesa_swrast precomp.h SOURCE) if(NOT MSVC) add_target_compile_flags(mesa_swrast "-Wno-unused-variable") - allow_warnings(mesa_swrast) endif() diff --git a/reactos/dll/win32/mciwave/CMakeLists.txt b/reactos/dll/win32/mciwave/CMakeLists.txt index c11ee1db9a5..715ae8b7245 100644 --- a/reactos/dll/win32/mciwave/CMakeLists.txt +++ b/reactos/dll/win32/mciwave/CMakeLists.txt @@ -17,5 +17,5 @@ add_importlibs(mciwave user32 winmm msvcrt kernel32 ntdll) add_cd_file(TARGET mciwave DESTINATION reactos/system32 FOR all) if(NOT MSVC) - add_target_compile_flags(mciwave "-Wno-error=overflow") + add_target_compile_flags(mciwave "-Wno-overflow") endif() diff --git a/reactos/drivers/storage/class/disk_new/CMakeLists.txt b/reactos/drivers/storage/class/disk_new/CMakeLists.txt index c210c5c754e..d2065f07b36 100644 --- a/reactos/drivers/storage/class/disk_new/CMakeLists.txt +++ b/reactos/drivers/storage/class/disk_new/CMakeLists.txt @@ -16,8 +16,8 @@ target_link_libraries(disk_new libcntpr wdmguid) if((ARCH STREQUAL "i386") AND (NOT MSVC)) # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #add_target_compile_flags(disk_new "-Wno-error -Wno-format -Wno-pointer-sign") - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error -Wno-format -Wno-pointer-sign") + #add_target_compile_flags(disk_new "-Wno-format -Wno-pointer-sign") + set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-format -Wno-pointer-sign") endif() set_module_type(disk_new kernelmodedriver) diff --git a/reactos/drivers/storage/classpnp/CMakeLists.txt b/reactos/drivers/storage/classpnp/CMakeLists.txt index 47846cf03b2..a5df7f68c74 100644 --- a/reactos/drivers/storage/classpnp/CMakeLists.txt +++ b/reactos/drivers/storage/classpnp/CMakeLists.txt @@ -33,11 +33,6 @@ add_library(classpnp SHARED class.rc ${CMAKE_CURRENT_BINARY_DIR}/classpnp.def) -if((ARCH STREQUAL "i386") AND (NOT MSVC)) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=switch") -endif() - add_pch(classpnp classp.h SOURCE) target_link_libraries(classpnp ${PSEH_LIB} libcntpr) set_module_type(classpnp kernelmodedriver) diff --git a/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt b/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt index 550716b77e8..0476aea4e7f 100644 --- a/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt +++ b/reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt @@ -26,9 +26,8 @@ add_importlibs(cmipci portcls hal ntoskrnl) if(NOT MSVC) # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #add_target_compile_flags(portcls "-Wno-write-strings -Wno-switch") - #allow_warnings(portcls) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-write-strings -Wno-switch -Wno-error") + #add_target_compile_flags(cmipci "-Wno-write-strings -Wno-switch") + set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-write-strings -Wno-switch") endif() add_pch(cmipci precomp.h SOURCE) diff --git a/rostests/winetests/ntdll/CMakeLists.txt b/rostests/winetests/ntdll/CMakeLists.txt index ec035542444..815f3d0010c 100644 --- a/rostests/winetests/ntdll/CMakeLists.txt +++ b/rostests/winetests/ntdll/CMakeLists.txt @@ -34,6 +34,5 @@ add_importlibs(ntdll_winetest user32 msvcrt kernel32 ntdll) add_cd_file(TARGET ntdll_winetest DESTINATION reactos/bin FOR all) if(NOT MSVC) - allow_warnings(ntdll_winetest) add_target_compile_flags(ntdll_winetest "-Wno-format") endif() -- 2.17.1