From 45313f9aa0b4e2a5ee6f75216dd9f7b322f0f571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mitka?= Date: Tue, 3 Nov 2020 12:25:53 +0100 Subject: [PATCH] Remove sizeof from unused variable silencer 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 --- 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