diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-22 11:40:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-22 14:40:39 +0200 |
commit | 1b0cba8c2cd672b0d5a59a215961c5136a6e656b (patch) | |
tree | a1cf6c3612d3f2294912914c3f68da103c5f3563 | |
parent | 9ff954d5f780cae5df6942e97b713cfc19449145 (diff) |
-Wimplicit-int-float-conversion
with clang trunk
implicit conversion from 'unsigned long' to 'double' changes value from
18446744073709551615 to 18446744073709551616
[-Werror,-Wimplicit-int-float-conversion]
if (f < 1.0 || f > std::numeric_limits<SCSIZE>::max())
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: Ief0eb55ed1ade9fb88f5749774790aebbb27e085
Reviewed-on: https://gerrit.libreoffice.org/81319
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 3e41643e6c50..ae99d1a79ef6 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -3656,7 +3656,7 @@ void ScInterpreter::CalculateSmallLarge(bool bSmall) [](double f) { f = rtl::math::approxFloor(f); // Valid ranks are >= 1. - if (f < 1.0 || f > std::numeric_limits<SCSIZE>::max()) + if (f < 1.0 || static_cast<SCSIZE>(f) > std::numeric_limits<SCSIZE>::max()) return static_cast<SCSIZE>(0); return static_cast<SCSIZE>(f); }); |