[Libreoffice-commits] core.git: Branch 'aoo/trunk' - shell/source

Pedro Giffuni pfg at apache.org
Thu Dec 10 18:09:04 PST 2015


 shell/source/unix/sysshell/recently_used_file_handler.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1c030e286ac7a82eaa5b87c0f950894ab6be5027
Author: Pedro Giffuni <pfg at apache.org>
Date:   Fri Dec 11 01:56:53 2015 +0000

    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

diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index e432182..7648575 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -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*/)


More information about the Libreoffice-commits mailing list