39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From c3e648518235e1f77ca496c1234459e4bac300ad Mon Sep 17 00:00:00 2001
|
|
From: "Brian C. Lane" <bcl@redhat.com>
|
|
Date: Mon, 9 Nov 2020 15:16:22 -0800
|
|
Subject: [PATCH 24/42] linux: Fix gcc complains about signed sccanf variables
|
|
|
|
---
|
|
libparted/arch/linux.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
|
index 09ec781..4c17720 100644
|
|
--- a/libparted/arch/linux.c
|
|
+++ b/libparted/arch/linux.c
|
|
@@ -720,9 +720,9 @@ _get_linux_version ()
|
|
static int kver = -1;
|
|
|
|
struct utsname uts;
|
|
- int major = 0;
|
|
- int minor = 0;
|
|
- int teeny = 0;
|
|
+ unsigned int major = 0;
|
|
+ unsigned int minor = 0;
|
|
+ unsigned int teeny = 0;
|
|
|
|
if (kver != -1)
|
|
return kver;
|
|
@@ -2884,7 +2884,7 @@ _dm_get_partition_start_and_length(PedPartition const *part,
|
|
char *params;
|
|
char *target_type;
|
|
dm_get_next_target(task, NULL, (uint64_t *)start, (uint64_t *)length, &target_type, ¶ms);
|
|
- if (sscanf (params, "%d:%d %Ld", &major, &minor, start) != 3)
|
|
+ if (sscanf (params, "%d:%d %Lu", &major, &minor, start) != 3)
|
|
goto err;
|
|
rc = 1;
|
|
|
|
--
|
|
2.26.2
|
|
|