You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pf...@apache.org on 2015/12/11 02:56:53 UTC
svn commit: r1719244 -
/openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
Author: pfg
Date: Fri Dec 11 01:56:53 2015
New Revision: 1719244
URL: http://svn.apache.org/viewvc?rev=1719244&view=rev
Log:
Do not assume time_t is long.
time_t is long on some platforms but not on all.
This plagues a warning on FreeBSD.
Taken from: Jung-uk Kim
Modified:
openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
Modified: openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx?rev=1719244&r1=1719243&r2=1719244&view=diff
==============================================================================
--- openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx (original)
+++ openoffice/trunk/main/shell/source/unix/sysshell/recently_used_file_handler.cxx Fri Dec 11 01:56:53 2015
@@ -94,11 +94,11 @@ namespace /* private */ {
void set_timestamp(const string_t& character)
{
- time_t t;
+ long t;
if (sscanf(character.c_str(), "%ld", &t) != 1)
timestamp_ = -1;
else
- timestamp_ = t;
+ timestamp_ = static_cast<time_t>(t);
}
void set_is_private(const string_t& /*character*/)