[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Thu Feb 23 14:20:29 UTC 2017
sal/osl/all/log.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 5446a434b4302f1ab3bca70927ac376111a4743e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 23 15:19:58 2017 +0100
Silence -Werror=format-overflow
Change-Id: I09abf54d67d0033ff3f8d61498ab094745c2081b
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 0e15aab..446108b 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -134,8 +134,8 @@ void maybeOutputTimestamp(std::ostringstream &s) {
tm.tm_mon = dateTime.Month - 1;
tm.tm_year = dateTime.Year - 1900;
strftime(ts, sizeof(ts), "%Y-%m-%d:%H:%M:%S", &tm);
- char milliSecs[10];
- sprintf(milliSecs, "%03d", static_cast<int>(dateTime.NanoSeconds/1000000));
+ char milliSecs[11];
+ sprintf(milliSecs, "%03u", static_cast<unsigned>(dateTime.NanoSeconds/1000000));
s << ts << '.' << milliSecs << ':';
}
if (outputRelativeTimer) {
More information about the Libreoffice-commits
mailing list