From 6d62a7da19d9bc882157f6bcde276399b31cbf8f Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Tue, 12 Mar 2019 21:41:18 +0100 Subject: Fix format strings in logd module. --- logd/src/logd/watch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'logd') 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(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(totalsize)); + LOG(info, "removing %s, total size (%" PRId64 ") too big", fname, static_cast(totalsize)); if (unlink(fname) != 0) { LOG(warning, "cannot remove %s: %s", fname, strerror(errno)); } -- cgit v1.2.3