mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Use diagnostic push and pop when suppressing GCC warnings to prevent suppressions from impacting code outside of ETL (#99)
This commit is contained in:
parent
ece332630d
commit
fb3d4d78fa
@ -54,6 +54,7 @@ SOFTWARE.
|
||||
#define ETL_FILE "27"
|
||||
|
||||
#ifdef ETL_COMPILER_GCC
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
@ -2232,6 +2233,10 @@ namespace etl
|
||||
|
||||
#include "private/minmax_pop.h"
|
||||
|
||||
#ifdef ETL_COMPILER_GCC
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#undef ETL_FILE
|
||||
|
||||
#endif
|
||||
|
||||
@ -45,6 +45,7 @@ SOFTWARE.
|
||||
#include "../stl/iterator.h"
|
||||
|
||||
#ifdef ETL_COMPILER_GCC
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
@ -204,6 +205,10 @@ namespace etl
|
||||
|
||||
#include "minmax_pop.h"
|
||||
|
||||
#ifdef ETL_COMPILER_GCC
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#undef ETL_IN_PVOIDVECTOR
|
||||
|
||||
#endif
|
||||
|
||||
@ -59,7 +59,8 @@ SOFTWARE.
|
||||
#endif
|
||||
|
||||
#ifdef ETL_COMPILER_GCC
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#endif
|
||||
|
||||
//*****************************************************************************
|
||||
@ -1223,4 +1224,8 @@ namespace etl
|
||||
|
||||
#include "private/ivectorpointer.h"
|
||||
|
||||
#ifdef ETL_COMPILER_GCC
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user