diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-23 15:19:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-23 15:19:58 +0100 |
commit | 5446a434b4302f1ab3bca70927ac376111a4743e (patch) | |
tree | 6192e4e3eb5a0429b1c3bcb11809edbdc914c7ca /sal | |
parent | f827e119a34e7c1d1a31911f226f02dd64e05410 (diff) |
Silence -Werror=format-overflow
Change-Id: I09abf54d67d0033ff3f8d61498ab094745c2081b
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/all/log.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index 0e15aab8f1fb..446108b3c042 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) { |