summaryrefslogtreecommitdiffstats
path: root/libfdisk
diff options
context:
space:
mode:
authorKarel Zak2017-03-16 10:01:54 +0100
committerKarel Zak2017-03-16 10:01:54 +0100
commitbb6762035a088583cb8c0cc87386da6f8a5958cb (patch)
tree86c8d42dee9cfecb7020f03002756cc0b2b6e2a5 /libfdisk
parenttests: refresh lscpu tests (diff)
downloadkernel-qcow2-util-linux-bb6762035a088583cb8c0cc87386da6f8a5958cb.tar.gz
kernel-qcow2-util-linux-bb6762035a088583cb8c0cc87386da6f8a5958cb.tar.xz
kernel-qcow2-util-linux-bb6762035a088583cb8c0cc87386da6f8a5958cb.zip
libfdisk: fix compiler warning [-Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk')
-rw-r--r--libfdisk/src/gpt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
index 6962e7702..c99b16f12 100644
--- a/libfdisk/src/gpt.c
+++ b/libfdisk/src/gpt.c
@@ -830,7 +830,7 @@ static struct gpt_entry *gpt_read_entries(struct fdisk_context *cxt,
sz = (ssize_t) le32_to_cpu(header->npartition_entries) *
le32_to_cpu(header->sizeof_partition_entry);
- if (sz == 0 || sz >= UINT32_MAX ||
+ if (sz == 0 || sz >= (ssize_t) UINT32_MAX ||
le32_to_cpu(header->sizeof_partition_entry) != sizeof(struct gpt_entry)) {
DBG(LABEL, ul_debug("GPT entreis array size check failed"));
return NULL;