systemd/0002-rfkill-fix-the-format-string-to-prevent-compilation-.patch
Lukas Nykryn 7b725611af systemd-248-3
Resolves: #1931710
2021-05-14 12:07:08 +02:00

31 lines
1.5 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 54f0c86b083a4782e37754d3bbe27d4d81c53d23 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Thu, 13 May 2021 12:10:00 +0200
Subject: [PATCH] rfkill: fix the format string to prevent compilation error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
../src/rfkill/rfkill.c:339:70: error: format %d expects argument of type int, but argument 8 has type long unsigned int [-Werror=format=]
339 | return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %d)",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Resolves: #1931710
---
src/rfkill/rfkill.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rfkill/rfkill.c b/src/rfkill/rfkill.c
index 6126e9b0c4..0b6ba65c3a 100644
--- a/src/rfkill/rfkill.c
+++ b/src/rfkill/rfkill.c
@@ -336,7 +336,7 @@ static int run(int argc, char *argv[]) {
}
if ((size_t) l < RFKILL_EVENT_SIZE_V1)
- return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %d)",
+ return log_error_errno(SYNTHETIC_ERRNO(EIO), "Short read of struct rfkill_event: (%zd < %lu)",
l, RFKILL_EVENT_SIZE_V1);
log_debug("Reading struct rfkill_event: got %zd bytes.", l);