https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f7dc14cca5208a75be5164fcad2906f206fe8c6d
commit f7dc14cca5208a75be5164fcad2906f206fe8c6d Author: Victor Perevertkin <vic...@perevertkin.ru> AuthorDate: Sat Aug 17 22:56:40 2019 +0300 Commit: Victor Perevertkin <vic...@perevertkin.ru> CommitDate: Tue Aug 20 15:05:47 2019 +0200 [WINETESTS] Supress GCC8 warnings --- modules/rostests/winetests/advpack/CMakeLists.txt | 4 ++++ modules/rostests/winetests/fusion/CMakeLists.txt | 4 ++++ modules/rostests/winetests/msi/CMakeLists.txt | 4 ++++ modules/rostests/winetests/msvcrt/CMakeLists.txt | 4 ++++ modules/rostests/winetests/msvcrt/heap.c | 12 +++++++++--- modules/rostests/winetests/services/CMakeLists.txt | 4 ++++ modules/rostests/winetests/setupapi/CMakeLists.txt | 4 ++++ modules/rostests/winetests/shell32/CMakeLists.txt | 4 ++++ modules/rostests/winetests/user32/CMakeLists.txt | 4 +++- modules/rostests/winetests/version/CMakeLists.txt | 4 ++++ modules/rostests/winetests/windowscodecs/CMakeLists.txt | 5 +++++ modules/rostests/winetests/winhttp/notification.c | 6 +++++- 12 files changed, 54 insertions(+), 5 deletions(-) diff --git a/modules/rostests/winetests/advpack/CMakeLists.txt b/modules/rostests/winetests/advpack/CMakeLists.txt index c6d489e0c8b..337bee72c24 100644 --- a/modules/rostests/winetests/advpack/CMakeLists.txt +++ b/modules/rostests/winetests/advpack/CMakeLists.txt @@ -1,6 +1,10 @@ add_definitions(-DUSE_WINE_TODOS) +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") +endif() + list(APPEND SOURCE advpack.c files.c diff --git a/modules/rostests/winetests/fusion/CMakeLists.txt b/modules/rostests/winetests/fusion/CMakeLists.txt index 0c908735377..fe6bc62c80a 100644 --- a/modules/rostests/winetests/fusion/CMakeLists.txt +++ b/modules/rostests/winetests/fusion/CMakeLists.txt @@ -1,6 +1,10 @@ add_definitions(-DUSE_WINE_TODOS) +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") +endif() + list(APPEND SOURCE asmcache.c asmenum.c diff --git a/modules/rostests/winetests/msi/CMakeLists.txt b/modules/rostests/winetests/msi/CMakeLists.txt index 07729567c43..351bda2869f 100644 --- a/modules/rostests/winetests/msi/CMakeLists.txt +++ b/modules/rostests/winetests/msi/CMakeLists.txt @@ -8,6 +8,10 @@ if(MSVC_IDE) include_directories($<TARGET_FILE_DIR:custom>) endif() +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") +endif() + spec2def(custom.dll custom.spec) add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def) target_link_libraries(custom uuid) diff --git a/modules/rostests/winetests/msvcrt/CMakeLists.txt b/modules/rostests/winetests/msvcrt/CMakeLists.txt index 359fb2aa674..52585225f21 100644 --- a/modules/rostests/winetests/msvcrt/CMakeLists.txt +++ b/modules/rostests/winetests/msvcrt/CMakeLists.txt @@ -9,6 +9,10 @@ if(MSVC) add_compile_flags("/wd4477") endif() +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-stringop-truncation") +endif() + list(APPEND SOURCE cpp.c data.c diff --git a/modules/rostests/winetests/msvcrt/heap.c b/modules/rostests/winetests/msvcrt/heap.c index 4a3c7a81700..a0ce2a41628 100644 --- a/modules/rostests/winetests/msvcrt/heap.c +++ b/modules/rostests/winetests/msvcrt/heap.c @@ -23,6 +23,12 @@ #include <errno.h> #include "wine/test.h" +#ifdef __REACTOS__ +#if defined(__GNUC__) && __GNUC__ >= 7 +#pragma GCC diagnostic ignored "-Walloc-size-larger-than=9223372036854775807" +#endif +#endif + static void (__cdecl *p_aligned_free)(void*) = NULL; static void * (__cdecl *p_aligned_malloc)(size_t,size_t) = NULL; static void * (__cdecl *p_aligned_offset_malloc)(size_t,size_t,size_t) = NULL; @@ -489,13 +495,13 @@ START_TEST(heap) mem = realloc(NULL, 10); ok(mem != NULL, "memory not allocated\n"); - + mem = realloc(mem, 20); ok(mem != NULL, "memory not reallocated\n"); - + mem = realloc(mem, 0); ok(mem == NULL, "memory not freed\n"); - + mem = realloc(NULL, 0); ok(mem != NULL, "memory not (re)allocated for size 0\n"); diff --git a/modules/rostests/winetests/services/CMakeLists.txt b/modules/rostests/winetests/services/CMakeLists.txt index 7f04dcffec6..45eae4795f8 100644 --- a/modules/rostests/winetests/services/CMakeLists.txt +++ b/modules/rostests/winetests/services/CMakeLists.txt @@ -1,4 +1,8 @@ +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") +endif() + add_executable(services_winetest service.c testlist.c) set_module_type(services_winetest win32cui) add_importlibs(services_winetest user32 advapi32 msvcrt kernel32) diff --git a/modules/rostests/winetests/setupapi/CMakeLists.txt b/modules/rostests/winetests/setupapi/CMakeLists.txt index 4f301cc08c6..e150b012597 100644 --- a/modules/rostests/winetests/setupapi/CMakeLists.txt +++ b/modules/rostests/winetests/setupapi/CMakeLists.txt @@ -1,4 +1,8 @@ +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") +endif() + list(APPEND SOURCE devinst.c dialog.c diff --git a/modules/rostests/winetests/shell32/CMakeLists.txt b/modules/rostests/winetests/shell32/CMakeLists.txt index e459d95360e..429f1bf3323 100644 --- a/modules/rostests/winetests/shell32/CMakeLists.txt +++ b/modules/rostests/winetests/shell32/CMakeLists.txt @@ -3,6 +3,10 @@ add_definitions(-DWINETEST_USE_DBGSTR_LONGLONG) remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") +endif() + list(APPEND SOURCE appbar.c assoc.c diff --git a/modules/rostests/winetests/user32/CMakeLists.txt b/modules/rostests/winetests/user32/CMakeLists.txt index 8c6f769c95f..bf635ae328b 100644 --- a/modules/rostests/winetests/user32/CMakeLists.txt +++ b/modules/rostests/winetests/user32/CMakeLists.txt @@ -5,6 +5,8 @@ add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x600) if(MSVC) # Disable warning C4477 (printf format warnings) add_compile_flags("/wd4477") +elseif(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") endif() list(APPEND SOURCE @@ -16,7 +18,7 @@ list(APPEND SOURCE dce.c dde.c dialog.c - edit.c + edit.c generated.c input.c listbox.c diff --git a/modules/rostests/winetests/version/CMakeLists.txt b/modules/rostests/winetests/version/CMakeLists.txt index 99a2fb5ebf6..c4c6f065895 100644 --- a/modules/rostests/winetests/version/CMakeLists.txt +++ b/modules/rostests/winetests/version/CMakeLists.txt @@ -1,6 +1,10 @@ add_definitions(-DUSE_WINE_TODOS) +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-format-overflow") +endif() + list(APPEND SOURCE info.c install.c diff --git a/modules/rostests/winetests/windowscodecs/CMakeLists.txt b/modules/rostests/winetests/windowscodecs/CMakeLists.txt index 6bae33b8912..09cca9909aa 100644 --- a/modules/rostests/winetests/windowscodecs/CMakeLists.txt +++ b/modules/rostests/winetests/windowscodecs/CMakeLists.txt @@ -3,6 +3,11 @@ add_definitions( -DUSE_WINE_TODOS -DWINETEST_USE_DBGSTR_LONGLONG) +# to be removed after synching with newer Wine +if(GCC AND GCC_VERSION VERSION_GREATER 7) + add_compile_flags("-Wno-stringop-overflow") +endif() + list(APPEND SOURCE bitmap.c bmpformat.c diff --git a/modules/rostests/winetests/winhttp/notification.c b/modules/rostests/winetests/winhttp/notification.c index 2322eae0a7b..494d474df46 100644 --- a/modules/rostests/winetests/winhttp/notification.c +++ b/modules/rostests/winetests/winhttp/notification.c @@ -1044,8 +1044,12 @@ if (!winetest_interactive) skip("Skipping test_persistent_connection due to hang. See ROSTESTS-295.\n"); } else -#endif +{ test_persistent_connection( si.port ); +} +#else + test_persistent_connection( si.port ); +#endif /* send the basic request again to shutdown the server thread */ test_basic_request( si.port, NULL, quitW );