From 353bbd0e8cfdb5fc3cc5c2bd78eaf3ed810a8253 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Wed, 27 Sep 2017 09:45:48 +0200 Subject: [PATCH] Fix GCC 4.8.5 warning --- src/ArduinoJson/Serialization/FloatParts.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ArduinoJson/Serialization/FloatParts.hpp b/src/ArduinoJson/Serialization/FloatParts.hpp index d7524774..e7ca8194 100644 --- a/src/ArduinoJson/Serialization/FloatParts.hpp +++ b/src/ArduinoJson/Serialization/FloatParts.hpp @@ -27,9 +27,8 @@ struct FloatParts { exponent = normalize(value); integral = uint32_t(value); - TFloat remainder = value - TFloat(integral); + TFloat remainder = (value - TFloat(integral)) * TFloat(maxDecimalPart); - remainder *= maxDecimalPart; decimal = uint32_t(remainder); remainder = remainder - TFloat(decimal);