mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-08 20:58:20 +03:00
Revert "sd-bus: use PRIu64 instead of casting" (#4556)
This reverts commit 75ead2b753cb9586f3f208326446081baab70da1. Follow up for #4546: > @@ -848,8 +848,7 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) { if (k->src_id == KDBUS_SRC_ID_KERNEL) bus_message_set_sender_driver(bus, m); else { - xsprintf(m->sender_buffer, ":1.%llu", - (unsigned long long)k->src_id); + xsprintf(m->sender_buffer, ":1.%"PRIu64, k->src_id); This produces: src/libsystemd/sd-bus/bus-kernel.c: In function ‘bus_kernel_make_message’: src/libsystemd/sd-bus/bus-kernel.c:851:44: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘__u64 {aka long long unsigned int}’ [-Wformat=] xsprintf(m->sender_buffer, ":1.%"PRIu64, k->src_id); ^
This commit is contained in:
parent
c14eff367c
commit
a1e2ef7ec9
@ -848,7 +848,8 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
|
||||
if (k->src_id == KDBUS_SRC_ID_KERNEL)
|
||||
bus_message_set_sender_driver(bus, m);
|
||||
else {
|
||||
xsprintf(m->sender_buffer, ":1.%"PRIu64, k->src_id);
|
||||
xsprintf(m->sender_buffer, ":1.%llu",
|
||||
(unsigned long long)k->src_id);
|
||||
m->sender = m->creds.unique_name = m->sender_buffer;
|
||||
}
|
||||
|
||||
@ -859,7 +860,8 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
|
||||
else if (k->dst_id == KDBUS_DST_ID_NAME)
|
||||
m->destination = bus->unique_name; /* fill in unique name if the well-known name is missing */
|
||||
else {
|
||||
xsprintf(m->destination_buffer, ":1.%"PRIu64, k->dst_id);
|
||||
xsprintf(m->destination_buffer, ":1.%llu",
|
||||
(unsigned long long)k->dst_id);
|
||||
m->destination = m->destination_buffer;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user