X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;fp=src%2Fcommon%2Fmacros.h;h=6a3e061d5f17464222d85701e96a0cbf6e871121;hp=34ac393f76bda366a8ad142ff4d568ba3465bb25;hb=2ea09241f07f1dfd4b6fd0f2f296a10142fda7d2;hpb=42fc5ffd68859cf70ab45e2091975e890813ed54 diff --git a/src/common/macros.h b/src/common/macros.h index 34ac393f..6a3e061d 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -81,6 +81,17 @@ extern "C" { ((void) sizeof((void) (_expr1), (void) (_expr2), \ (void) (_expr3), (void) (_expr4), (void) (_expr5), 0)) +#if defined __clang__ +# if __has_warning("-Wunused-but-set-variable") +# define BT_DIAG_IGNORE_UNUSED_BUT_SET_VARIABLE \ + _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") +# endif +#endif + +#if !defined BT_DIAG_IGNORE_UNUSED_BUT_SET_VARIABLE +# define BT_DIAG_IGNORE_UNUSED_BUT_SET_VARIABLE +#endif + #ifdef __cplusplus } #endif