[WINETESTS] Supress GCC8 warnings

This commit is contained in:
Victor Perevertkin 2019-08-17 22:56:40 +03:00
parent e90b6bb1e9
commit f7dc14cca5
12 changed files with 54 additions and 5 deletions

View file

@ -1,6 +1,10 @@
add_definitions(-DUSE_WINE_TODOS) add_definitions(-DUSE_WINE_TODOS)
if(GCC AND GCC_VERSION VERSION_GREATER 7)
add_compile_flags("-Wno-format-overflow")
endif()
list(APPEND SOURCE list(APPEND SOURCE
advpack.c advpack.c
files.c files.c

View file

@ -1,6 +1,10 @@
add_definitions(-DUSE_WINE_TODOS) add_definitions(-DUSE_WINE_TODOS)
if(GCC AND GCC_VERSION VERSION_GREATER 7)
add_compile_flags("-Wno-format-overflow")
endif()
list(APPEND SOURCE list(APPEND SOURCE
asmcache.c asmcache.c
asmenum.c asmenum.c

View file

@ -8,6 +8,10 @@ if(MSVC_IDE)
include_directories($<TARGET_FILE_DIR:custom>) include_directories($<TARGET_FILE_DIR:custom>)
endif() endif()
if(GCC AND GCC_VERSION VERSION_GREATER 7)
add_compile_flags("-Wno-format-overflow")
endif()
spec2def(custom.dll custom.spec) spec2def(custom.dll custom.spec)
add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def) add_library(custom MODULE custom.c ${CMAKE_CURRENT_BINARY_DIR}/custom.def)
target_link_libraries(custom uuid) target_link_libraries(custom uuid)

View file

@ -9,6 +9,10 @@ if(MSVC)
add_compile_flags("/wd4477") add_compile_flags("/wd4477")
endif() endif()
if(GCC AND GCC_VERSION VERSION_GREATER 7)
add_compile_flags("-Wno-stringop-truncation")
endif()
list(APPEND SOURCE list(APPEND SOURCE
cpp.c cpp.c
data.c data.c

View file

@ -23,6 +23,12 @@
#include <errno.h> #include <errno.h>
#include "wine/test.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_free)(void*) = NULL;
static void * (__cdecl *p_aligned_malloc)(size_t,size_t) = 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; 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); mem = realloc(NULL, 10);
ok(mem != NULL, "memory not allocated\n"); ok(mem != NULL, "memory not allocated\n");
mem = realloc(mem, 20); mem = realloc(mem, 20);
ok(mem != NULL, "memory not reallocated\n"); ok(mem != NULL, "memory not reallocated\n");
mem = realloc(mem, 0); mem = realloc(mem, 0);
ok(mem == NULL, "memory not freed\n"); ok(mem == NULL, "memory not freed\n");
mem = realloc(NULL, 0); mem = realloc(NULL, 0);
ok(mem != NULL, "memory not (re)allocated for size 0\n"); ok(mem != NULL, "memory not (re)allocated for size 0\n");

View file

@ -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) add_executable(services_winetest service.c testlist.c)
set_module_type(services_winetest win32cui) set_module_type(services_winetest win32cui)
add_importlibs(services_winetest user32 advapi32 msvcrt kernel32) add_importlibs(services_winetest user32 advapi32 msvcrt kernel32)

View file

@ -1,4 +1,8 @@
if(GCC AND GCC_VERSION VERSION_GREATER 7)
add_compile_flags("-Wno-format-overflow")
endif()
list(APPEND SOURCE list(APPEND SOURCE
devinst.c devinst.c
dialog.c dialog.c

View file

@ -3,6 +3,10 @@ add_definitions(-DWINETEST_USE_DBGSTR_LONGLONG)
remove_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502) 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 list(APPEND SOURCE
appbar.c appbar.c
assoc.c assoc.c

View file

@ -5,6 +5,8 @@ add_definitions(-DWINVER=0x600 -D_WIN32_WINNT=0x600)
if(MSVC) if(MSVC)
# Disable warning C4477 (printf format warnings) # Disable warning C4477 (printf format warnings)
add_compile_flags("/wd4477") add_compile_flags("/wd4477")
elseif(GCC AND GCC_VERSION VERSION_GREATER 7)
add_compile_flags("-Wno-format-overflow")
endif() endif()
list(APPEND SOURCE list(APPEND SOURCE
@ -16,7 +18,7 @@ list(APPEND SOURCE
dce.c dce.c
dde.c dde.c
dialog.c dialog.c
edit.c edit.c
generated.c generated.c
input.c input.c
listbox.c listbox.c

View file

@ -1,6 +1,10 @@
add_definitions(-DUSE_WINE_TODOS) add_definitions(-DUSE_WINE_TODOS)
if(GCC AND GCC_VERSION VERSION_GREATER 7)
add_compile_flags("-Wno-format-overflow")
endif()
list(APPEND SOURCE list(APPEND SOURCE
info.c info.c
install.c install.c

View file

@ -3,6 +3,11 @@ add_definitions(
-DUSE_WINE_TODOS -DUSE_WINE_TODOS
-DWINETEST_USE_DBGSTR_LONGLONG) -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 list(APPEND SOURCE
bitmap.c bitmap.c
bmpformat.c bmpformat.c

View file

@ -1044,8 +1044,12 @@ if (!winetest_interactive)
skip("Skipping test_persistent_connection due to hang. See ROSTESTS-295.\n"); skip("Skipping test_persistent_connection due to hang. See ROSTESTS-295.\n");
} }
else else
#endif {
test_persistent_connection( si.port ); test_persistent_connection( si.port );
}
#else
test_persistent_connection( si.port );
#endif
/* send the basic request again to shutdown the server thread */ /* send the basic request again to shutdown the server thread */
test_basic_request( si.port, NULL, quitW ); test_basic_request( si.port, NULL, quitW );