summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/random.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx
index c9269abb837b..224a345a3094 100644
--- a/sal/rtl/random.cxx
+++ b/sal/rtl/random.cxx
@@ -22,6 +22,7 @@
#include <cmath>
#include <sal/types.h>
+#include <o3tl/temporary.hxx>
#include <osl/thread.h>
#include <osl/thread.hxx>
#include <osl/time.h>
@@ -85,7 +86,7 @@ static double data(RandomData_Impl *pImpl)
(static_cast<double>(pImpl->m_nY) / 30269.0) +
(static_cast<double>(pImpl->m_nZ) / 30307.0) );
- return std::modf(random, &random);
+ return std::modf(random, &o3tl::temporary(double()));
}
static bool initPool(RandomPool_Impl *pImpl)