diff options
-rw-r--r-- | src/libsystemd/sd-bus/bus-control.c | 6 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-kernel.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index 9e58ffbd8..303ae0f23 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -264,10 +264,13 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) { if ((flags & KDBUS_LIST_UNIQUE) && name->id != previous_id && !(name->flags & KDBUS_HELLO_ACTIVATOR)) { char *n; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" if (asprintf(&n, ":1.%llu", name->id) < 0) { r = -ENOMEM; goto fail; } +#pragma GCC diagnostic pop r = strv_consume(x, n); if (r < 0) @@ -711,10 +714,13 @@ int bus_get_name_creds_kdbus( } if (mask & SD_BUS_CREDS_UNIQUE_NAME) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) { r = -ENOMEM; goto fail; } +#pragma GCC diagnostic pop c->mask |= SD_BUS_CREDS_UNIQUE_NAME; } diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index c82caeb3f..ca6aee7c0 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -51,6 +51,8 @@ #include "user-util.h" #include "util.h" +#pragma GCC diagnostic ignored "-Wformat" + #define UNIQUE_NAME_MAX (3+DECIMAL_STR_MAX(uint64_t)) int bus_kernel_parse_unique_name(const char *s, uint64_t *id) { |