diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/bastyp/calc.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/fields/flddat.cxx | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index c1cbfdfb841d..30a1ca83a5ab 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -38,6 +38,7 @@ #include <editeng/unolingu.hxx> #include <expfld.hxx> #include <hintids.hxx> +#include <o3tl/temporary.hxx> #include <osl/diagnose.hxx> #include <rtl/math.hxx> #include <shellres.hxx> @@ -1195,8 +1196,8 @@ SwSbxValue SwCalc::Prim() GetToken(); double right = Prim().GetDouble(); - double fraction, integer; - fraction = modf( right, &integer ); + double fraction; + fraction = modf( right, &o3tl::temporary(double()) ); if( ( dleft < 0.0 && 0.0 != fraction ) || ( 0.0 == dleft && right < 0.0 ) ) { diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx index aac0b4def6aa..6cb2f930b492 100644 --- a/sw/source/core/fields/flddat.cxx +++ b/sw/source/core/fields/flddat.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <o3tl/any.hxx> +#include <o3tl/temporary.hxx> #include <tools/datetime.hxx> #include <svl/zforlist.hxx> #include <com/sun/star/util/DateTime.hpp> @@ -150,8 +151,7 @@ Date SwDateTimeField::GetDate() const tools::Time SwDateTimeField::GetTime() const { - double fDummy; - double fFract = modf(GetValue(), &fDummy); + double fFract = modf(GetValue(), &o3tl::temporary(double())); DateTime aDT( DateTime::EMPTY ); aDT.AddTime(fFract); return static_cast<tools::Time>(aDT); |