summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Giffuni <pfg@apache.org>2015-12-11 01:56:53 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-12-11 09:36:08 +0000
commit7cc31b68c4c09f165f2e804847ba758820163f11 (patch)
tree54f8c2d6de24e147c8c9c195ae128ba765f126fb
parentb672126e7c4ffd32d42594cf527b09a9f0434cb9 (diff)
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 (cherry picked from commit 1c030e286ac7a82eaa5b87c0f950894ab6be5027)
-rw-r--r--shell/source/unix/sysshell/recently_used_file_handler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx
index 81b96960fac5..3049bcf6587a 100644
--- a/shell/source/unix/sysshell/recently_used_file_handler.cxx
+++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx
@@ -91,11 +91,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(SAL_UNUSED_PARAMETER const string_t& /*character*/)