From 844972441e1d28bf64ee3ef3539fee562227036e Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 30 Oct 2016 14:46:47 +0000 Subject: COMMON: Fix GCC Warning in JSON Parser. The emitted warning is "ISO C++98 does not support the ‘%lg’ gnu_printf format [-Wformat=]". Though "%lg" is required for *scanf functions to indicate the field size, it is not required for *printf functions which use "%g" instead. --- common/json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/json.cpp b/common/json.cpp index f7a54d23b2..792d1967e9 100644 --- a/common/json.cpp +++ b/common/json.cpp @@ -980,7 +980,7 @@ String JSONValue::stringifyImpl(size_t const indentDepth) const { ret_string = "null"; else { char str[80]; - sprintf(str, "%lg", _numberValue); + sprintf(str, "%g", _numberValue); ret_string = str; } break; -- cgit v1.2.3