summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2022-08-29 13:07:11 +0200
committerJan Janssen <medhefgo@web.de>2022-08-30 12:03:28 +0200
commitc0f86d66f3f6b561528e7f856f9926bec766c036 (patch)
treeb5b17ffb3a41a7974ff0ad35db009b4f8aa94116 /src/core
parent125d108665506e8abfd575f2cbf7adf9d0ae0a00 (diff)
downloadsystemd-c0f86d66f3f6b561528e7f856f9926bec766c036.tar.gz
tree-wide: Use correct format specifiers
gcc will complain about all these with -Wformat-signedness.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/automount.c4
-rw-r--r--src/core/bpf-socket-bind.c4
-rw-r--r--src/core/cgroup.c2
-rw-r--r--src/core/manager.c2
-rw-r--r--src/core/service.c2
-rw-r--r--src/core/unit.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 39c716fb81..6c75d0e3ad 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -375,7 +375,7 @@ static int open_dev_autofs(Manager *m) {
return -errno;
}
- log_debug("Autofs kernel version %i.%i", param.ver_major, param.ver_minor);
+ log_debug("Autofs kernel version %u.%u", param.ver_major, param.ver_minor);
return m->dev_autofs_fd;
}
@@ -429,7 +429,7 @@ static int autofs_protocol(int dev_autofs_fd, int ioctl_fd) {
minor = param.protosubver.sub_version;
- log_debug("Autofs protocol version %i.%i", major, minor);
+ log_debug("Autofs protocol version %u.%u", major, minor);
return 0;
}
diff --git a/src/core/bpf-socket-bind.c b/src/core/bpf-socket-bind.c
index 3aa1bfa1f1..30e5b2f392 100644
--- a/src/core/bpf-socket-bind.c
+++ b/src/core/bpf-socket-bind.c
@@ -69,11 +69,11 @@ static int prepare_socket_bind_bpf(
if (allow_count > SOCKET_BIND_MAX_RULES)
return log_unit_full_errno(u, u ? LOG_ERR : LOG_WARNING, SYNTHETIC_ERRNO(EINVAL),
- "bpf-socket-bind: Maximum number of socket bind rules=%u is exceeded", SOCKET_BIND_MAX_RULES);
+ "bpf-socket-bind: Maximum number of socket bind rules=%i is exceeded", SOCKET_BIND_MAX_RULES);
if (deny_count > SOCKET_BIND_MAX_RULES)
return log_unit_full_errno(u, u ? LOG_ERR : LOG_WARNING, SYNTHETIC_ERRNO(EINVAL),
- "bpf-socket-bind: Maximum number of socket bind rules=%u is exceeded", SOCKET_BIND_MAX_RULES);
+ "bpf-socket-bind: Maximum number of socket bind rules=%i is exceeded", SOCKET_BIND_MAX_RULES);
obj = socket_bind_bpf__open();
if (!obj)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index c945f76abc..c0bb13caf3 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1599,7 +1599,7 @@ static void cgroup_context_apply(
if (unit_has_unified_memory_config(u)) {
val = c->memory_max;
- log_cgroup_compat(u, "Applying MemoryMax=%" PRIi64 " as MemoryLimit=", val);
+ log_cgroup_compat(u, "Applying MemoryMax=%" PRIu64 " as MemoryLimit=", val);
} else
val = c->memory_limit;
diff --git a/src/core/manager.c b/src/core/manager.c
index d21698a99b..510585198d 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2763,7 +2763,7 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t
return log_error_errno(errno, "Reading from signal fd failed: %m");
}
if (n != sizeof(sfsi)) {
- log_warning("Truncated read from signal fd (%zu bytes), ignoring!", n);
+ log_warning("Truncated read from signal fd (%zi bytes), ignoring!", n);
return 0;
}
diff --git a/src/core/service.c b/src/core/service.c
index fa37207dcc..4933163b56 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -496,7 +496,7 @@ static int service_add_fd_store_set(Service *s, FDSet *fds, const char *name, bo
if (r < 0)
return log_unit_error_errno(UNIT(s), r, "Failed to add fd to store: %m");
if (r > 0)
- log_unit_debug(UNIT(s), "Added fd %u (%s) to fd store.", fd, strna(name));
+ log_unit_debug(UNIT(s), "Added fd %i (%s) to fd store.", fd, strna(name));
fd = -1;
}
diff --git a/src/core/unit.c b/src/core/unit.c
index 05cee225ed..82a1d81e04 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2263,7 +2263,7 @@ void unit_start_on_failure(
}
if (n_jobs >= 0)
- log_unit_debug(u, "Triggering %s dependencies done (%u %s).",
+ log_unit_debug(u, "Triggering %s dependencies done (%i %s).",
dependency_name, n_jobs, n_jobs == 1 ? "job" : "jobs");
}