Convert a false positive warning suppression in the Voodoo dynarec code into a pragma

This commit is contained in:
Alexander Babikov
2022-04-07 05:23:23 +05:00
parent bd8b58b5e9
commit a66d381be9
3 changed files with 10 additions and 6 deletions

View File

@@ -20,6 +20,11 @@
#define LOD_MASK (LOD_TMIRROR_S | LOD_TMIRROR_T)
/* Suppress a false positive warning on gcc that causes excessive build log spam */
#if __GNUC__ >= 10
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
typedef struct voodoo_x86_data_t
{
uint8_t code_block[BLOCK_SIZE];

View File

@@ -20,6 +20,11 @@
#define LOD_MASK (LOD_TMIRROR_S | LOD_TMIRROR_T)
/* Suppress a false positive warning on gcc that causes excessive build log spam */
#if __GNUC__ >= 10
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
typedef struct voodoo_x86_data_t
{
uint8_t code_block[BLOCK_SIZE];

View File

@@ -47,9 +47,3 @@ add_library(voodoo OBJECT vid_voodoo.c vid_voodoo_banshee.c
if(NOT MSVC AND (ARCH STREQUAL "i386" OR ARCH STREQUAL "x86_64"))
target_compile_options(voodoo PRIVATE "-msse2")
endif()
# Suppress GCC false positive warnings in vid_voodoo_codegen_x86[-64].h
# that cause ~3000 lines to be output into the logs each time
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(voodoo PRIVATE "-Wstringop-overflow=0")
endif()