From 2c8ced01216096dd03a4143fe41b4c5653deb67a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 13 Sep 2022 13:11:12 +0200 Subject: cid#1509290, cid#1509240: Silence "Use of 32-bit time_t (Y2K38_SAFETY)" for now We'll eventually need to do something about the 32 bit TimeValue::Seconds, but as it is unsigned we should be fine for another 80 years (until "06:28:15 UTC on Sunday, 7 February 2106", according to ). Change-Id: I74e680be0b2f0ef8cd84d6bc0faef436efc8d3cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139859 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/osl/unx/time.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sal') diff --git a/sal/osl/unx/time.cxx b/sal/osl/unx/time.cxx index a77015614e74..d6a2ca33ba6c 100644 --- a/sal/osl/unx/time.cxx +++ b/sal/osl/unx/time.cxx @@ -170,6 +170,8 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, Ti bias = aTime.tm_isdst > 0 ? timezone - 3600 : timezone; #endif + // coverity[store_truncates_time_t] - TODO: sal_uInt32 TimeValue::Seconds is only large + // enough for integer time_t values < 2^32 representing dates until year 2106: pTimeVal->Seconds = nSeconds; pTimeVal->Nanosec = pDateTime->NanoSeconds; -- cgit