[systemd-devel] [PATCH] Fix format string mismatch introduced in ab9001a1
misc at zarb.org
misc at zarb.org
Sun Jan 5 08:06:50 PST 2014
From: Michael Scherer <misc at zarb.org>
src/libsystemd-bus/sd-bus.c: In function 'sd_bus_open_user':
src/libsystemd-bus/sd-bus.c:1104:25: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'long unsigned int' [-Wformat=]
asprintf(&b->address, UNIX_USER_BUS_FMT, (unsigned long) getuid());
---
src/libsystemd-bus/sd-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 61dc0e5..a4e4999 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1101,7 +1101,7 @@ _public_ int sd_bus_open_user(sd_bus **ret) {
#ifdef ENABLE_KDBUS
asprintf(&b->address, KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT, (unsigned long) getuid(), ee);
#else
- asprintf(&b->address, UNIX_USER_BUS_FMT, (unsigned long) getuid());
+ asprintf(&b->address, UNIX_USER_BUS_FMT, ee);
#endif
} else {
#ifdef ENABLE_KDBUS
--
1.8.4.2
More information about the systemd-devel
mailing list