diff options
author | Pedro Giffuni <pfg@apache.org> | 2015-12-11 01:56:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-11 09:36:08 +0000 |
commit | 7cc31b68c4c09f165f2e804847ba758820163f11 (patch) | |
tree | 54f8c2d6de24e147c8c9c195ae128ba765f126fb /shell | |
parent | b672126e7c4ffd32d42594cf527b09a9f0434cb9 (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)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/unix/sysshell/recently_used_file_handler.cxx | 4 |
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*/) |