Skip to content

Commit

Permalink
Remove sizeof from unused variable silencer (#1974)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
darklukee and lukasz-mitka authored Nov 3, 2020
1 parent 86bf604 commit 771292c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ FMT_END_NAMESPACE
# else
# define FMT_THROW(x) \
do { \
static_cast<void>(sizeof(x)); \
static_cast<void>(x); \
FMT_ASSERT(false, ""); \
} while (false)
# endif
Expand Down

0 comments on commit 771292c

Please sign in to comment.