Skip to contentSkip to conversation

LVM2/lib format_text/import_vsn1.c label/label.c

PATCH [email protected] 1 participant 1 message Jan 31, 2008

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2008-01-31 12:35:32

Modified files:
lib/format_text: import_vsn1.c
lib/label : label.c

Log message:
a couple more compiler warnings

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/label/label.c.diff?cvsroot=lvm2&r1=1.40&r2=1.41

lib/format_text/import_vsn1.c +1 -1
@@ -524,7 +524,7 @@
 		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:
lib/label/label.c +2 -2
@@ -143,7 +143,7 @@
 				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 @@
 		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;