diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2019-03-12 21:41:18 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2019-03-12 21:49:46 +0100 |
commit | 6d62a7da19d9bc882157f6bcde276399b31cbf8f (patch) | |
tree | 091d4c8b2de2baca2ef240438c0e37298a8c1079 /logd | |
parent | 4083e27beb4db1762685602837effc0d7b773812 (diff) |
Fix format strings in logd module.
Diffstat (limited to 'logd')
-rw-r--r-- | logd/src/logd/watch.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/logd/src/logd/watch.cpp b/logd/src/logd/watch.cpp index ec27e0ad0e1..fc1937e5693 100644 --- a/logd/src/logd/watch.cpp +++ b/logd/src/logd/watch.cpp @@ -271,8 +271,8 @@ Watcher::watchfile() if (rotTime > 59 || (sb.st_size == offset && rotTime > 4)) { removeOldLogs(filename); if (sb.st_size != offset) { - LOG(warning, "logfile rotation incomplete after %d s (dropping %lu bytes)", - rotTime, sb.st_size - offset); + LOG(warning, "logfile rotation incomplete after %d s (dropping %" PRIu64 " bytes)", + rotTime, static_cast<uint64_t>(sb.st_size - offset)); } else { LOG(debug, "logfile rotation complete after %d s", rotTime); } @@ -399,7 +399,7 @@ Watcher::removeOldLogs(const char *prefix) totalsize += sb.st_size; if (totalsize > (_confsubscriber.getRemoveMegabytes() * 1048576LL)) { - LOG(info, "removing %s, total size (%ld) too big", fname, static_cast<int64_t>(totalsize)); + LOG(info, "removing %s, total size (%" PRId64 ") too big", fname, static_cast<int64_t>(totalsize)); if (unlink(fname) != 0) { LOG(warning, "cannot remove %s: %s", fname, strerror(errno)); } |