From: Lennart Poettering Date: Thu, 11 Oct 2018 20:05:55 +0000 (+0200) Subject: macro: drop -Wdeclaration-after-statement exclusion magic, we dropped that warning... X-Git-Tag: v240~562^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=696c0b890ee1caa327daedc9dd6e5d67a6cae33c;p=thirdparty%2Fsystemd.git macro: drop -Wdeclaration-after-statement exclusion magic, we dropped that warning anyway from our build --- diff --git a/src/basic/macro.h b/src/basic/macro.h index 9972b6f9927..361ffbc5d02 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -56,10 +56,6 @@ #endif /* Temporarily disable some warnings */ -#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \ - _Pragma("GCC diagnostic push"); \ - _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") - #define DISABLE_WARNING_FORMAT_NONLITERAL \ _Pragma("GCC diagnostic push"); \ _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") @@ -314,20 +310,13 @@ static inline int __coverity_check__(int condition) { } while (false) #if defined(static_assert) -/* static_assert() is sometimes defined in a way that trips up - * -Wdeclaration-after-statement, hence let's temporarily turn off - * this warning around it. */ #define assert_cc(expr) \ - DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \ - static_assert(expr, #expr); \ - REENABLE_WARNING + static_assert(expr, #expr); #else #define assert_cc(expr) \ - DISABLE_WARNING_DECLARATION_AFTER_STATEMENT; \ struct CONCATENATE(_assert_struct_, __COUNTER__) { \ char x[(expr) ? 0 : -1]; \ - }; \ - REENABLE_WARNING + }; #endif #define assert_return(expr, r) \