diff --git a/src/verstable.h b/src/verstable.h index d64b17e0e..8c5a49dc3 100644 --- a/src/verstable.h +++ b/src/verstable.h @@ -452,6 +452,9 @@ License (MIT): #ifndef VERSTABLE_H #define VERSTABLE_H +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waggregate-return" + #include #include #include @@ -2093,6 +2096,8 @@ C99 prefixed function API to circumvent this restriction. #endif #endif +#pragma GCC diagnostic pop + #endif #undef NAME diff --git a/src/w_wad.c b/src/w_wad.c index 5c398e8b3..87cd85459 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -90,9 +90,6 @@ typedef struct #define LUMPNUMCACHESIZE 2048 // should be reasonable ig #define LUMPNUMCACHENAME 32 -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Waggregate-return" - #define NAME lumpnum_map #define KEY_TY char * #define KEY_GET_CONST @@ -111,8 +108,6 @@ typedef struct #define KEY_DTOR_FN free #include "verstable.h" -#pragma GCC diagnostic pop - static lumpnum_map lumpnumcache; typedef struct FolderCache {