From 771292c3283d076bc9ec41db86f107853d11f519 Mon Sep 17 00:00:00 2001 From: darklukee Date: Tue, 3 Nov 2020 15:48:19 +0100 Subject: [PATCH] Remove sizeof from unused variable silencer (#1974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using sizeof causes some compilers to complain: 'operand of sizeof is not a type, variable, or dereferenced pointer' static_cast itself should be enough to silence unused variable warning Co-authored-by: Ɓukasz Mitka --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 4e773f58..ea45429f 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -115,7 +115,7 @@ FMT_END_NAMESPACE # else # define FMT_THROW(x) \ do { \ - static_cast(sizeof(x)); \ + static_cast(x); \ FMT_ASSERT(false, ""); \ } while (false) # endif