[CMAKE]
authorThomas Faber <thomas.faber@reactos.org>
Sun, 19 Apr 2015 08:39:58 +0000 (08:39 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 19 Apr 2015 08:39:58 +0000 (08:39 +0000)
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
reactos/dll/3rdparty/libtiff/CMakeLists.txt
reactos/dll/opengl/mesa/main/CMakeLists.txt
reactos/dll/opengl/mesa/swrast/CMakeLists.txt
reactos/dll/win32/mciwave/CMakeLists.txt
reactos/drivers/storage/class/disk_new/CMakeLists.txt
reactos/drivers/storage/classpnp/CMakeLists.txt
reactos/drivers/wdm/audio/drivers/CMIDriver/CMakeLists.txt
rostests/winetests/ntdll/CMakeLists.txt

index 25c451c..2ef02a0 100644 (file)
@@ -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)
index 0373625..507aa53 100644 (file)
@@ -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()
index c42d9cc..b4e4a96 100644 (file)
@@ -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()
index 18302ce..4c04842 100644 (file)
@@ -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()
index c11ee1d..715ae8b 100644 (file)
@@ -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()
index c210c5c..d2065f0 100644 (file)
@@ -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)
index 47846cf..a5df7f6 100644 (file)
@@ -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)
index 550716b..0476aea 100644 (file)
@@ -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)
index ec03554..815f3d0 100644 (file)
@@ -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()