From 894c6af744bc136a182aa8abcebb7fb12bcb5782 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 31 Jan 2008 12:35:31 +0000 Subject: [PATCH] a couple more compiler warnings --- lib/format_text/import_vsn1.c | 2 +- lib/label/label.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c index d2902992e..dba48a51f 100644 --- a/lib/format_text/import_vsn1.c +++ b/lib/format_text/import_vsn1.c @@ -524,7 +524,7 @@ static int _read_lvnames(struct format_instance *fid __attribute((unused)), case 0: lv->read_ahead = DM_READ_AHEAD_AUTO; break; - case -1: + case (uint32_t) -1: lv->read_ahead = DM_READ_AHEAD_NONE; break; default: diff --git a/lib/label/label.c b/lib/label/label.c index 7ba586aef..a0608c068 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -143,7 +143,7 @@ static struct labeller *_find_labeller(struct device *dev, char *buf, continue; } if (calc_crc(INITIAL_CRC, &lh->offset_xl, LABEL_SIZE - - ((void *) &lh->offset_xl - (void *) lh)) != + ((uintptr_t) &lh->offset_xl - (uintptr_t) lh)) != xlate32(lh->crc_xl)) { log_info("Label checksum incorrect on %s - " "ignoring", dev_name(dev)); @@ -322,7 +322,7 @@ int label_write(struct device *dev, struct label *label) return_0; lh->crc_xl = xlate32(calc_crc(INITIAL_CRC, &lh->offset_xl, LABEL_SIZE - - ((void *) &lh->offset_xl - (void *) lh))); + ((uintptr_t) &lh->offset_xl - (uintptr_t) lh))); if (!dev_open(dev)) return_0;