From 7ca8fc3b170f14c4ca9acee4d4af51957ec7576e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 30 Jan 2019 07:06:40 -0800 Subject: [PATCH] Fix a bogus warning --- include/fmt/format-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h index 2debe52a..ddf82127 100644 --- a/include/fmt/format-inl.h +++ b/include/fmt/format-inl.h @@ -721,7 +721,7 @@ template FMT_FUNC typename std::enable_if::type grisu2_format(Double value, buffer& buf, core_format_specs specs) { FMT_ASSERT(value >= 0, "value is negative"); - if (value == 0) { + if (value <= 0) { // <= instead of == to silence a warning. gen_digits_params params = process_specs(specs, 1, buf); const size_t size = 1; buf[0] = '0';