diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h index d811fd3479..184243bc1a 100644 --- a/MdePkg/Include/Library/DebugLib.h +++ b/MdePkg/Include/Library/DebugLib.h @@ -407,11 +407,9 @@ UnitTestDebugAssert ( } while (FALSE) #else #define ASSERT(Expression) \ - do { \ - if ((FALSE)) { \ - (VOID) (Expression); \ - } \ - } while (FALSE) + if (FALSE) { \ + (VOID) (Expression); \ + } #endif /** @@ -433,18 +431,11 @@ UnitTestDebugAssert ( _DEBUG (Expression); \ } \ } while (FALSE) -#elif defined (__GNUC__) || defined (__clang__) -#define DEBUG(Expression) \ - do { \ - _Pragma("GCC diagnostic push") \ - _Pragma("GCC diagnostic ignored \"-Wunused-value\"") \ - if ((FALSE)) { \ - (VOID) Expression; \ - } \ - _Pragma("GCC diagnostic pop") \ - } while (FALSE) #else -#define DEBUG(Expression) +#define DEBUG(Expression) \ + if (FALSE) { \ + _DEBUG (Expression); \ + } #endif /** @@ -471,11 +462,9 @@ UnitTestDebugAssert ( } while (FALSE) #else #define ASSERT_EFI_ERROR(StatusParameter) \ - do { \ - if ((FALSE)) { \ - (VOID) (StatusParameter); \ - } \ - } while (FALSE) + if (FALSE) { \ + (VOID) (StatusParameter); \ + } #endif /** @@ -503,11 +492,9 @@ UnitTestDebugAssert ( } while (FALSE) #else #define ASSERT_RETURN_ERROR(StatusParameter) \ - do { \ - if ((FALSE)) { \ - (VOID) (StatusParameter); \ - } \ - } while (FALSE) + if (FALSE) { \ + (VOID) (StatusParameter); \ + } #endif /**