From f798aed128f8ccdcd30bd3d82d577f6d1115e37a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 6 May 2021 12:24:41 +0200 Subject: [PATCH] rfkill: fix compiler warning [-Wformat=] * `RFKILL_EVENT_SIZE_V1` is defined as sizeof(struct rfkill_event), so let's use %zu * cast `len` to size_t to make it usable with %zu Signed-off-by: Karel Zak --- sys-utils/rfkill.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c index 542614b1ba..0b72fa9638 100644 --- a/sys-utils/rfkill.c +++ b/sys-utils/rfkill.c @@ -218,7 +218,8 @@ static int rfkill_read_event(int fd, struct rfkill_event *event) } if (len < RFKILL_EVENT_SIZE_V1) { - warnx(_("wrong size of rfkill event: %zu < %d"), len, RFKILL_EVENT_SIZE_V1); + warnx(_("wrong size of rfkill event: %zu < %zu"), + (size_t) len, RFKILL_EVENT_SIZE_V1); return 1; } -- 2.47.2