Skip to contentSkip to conversation

PATCH: Fix warning on 64bit boxes

PATCH Alan Cox 2 participants 2 messages Jan 17, 2006

Subsystems (2)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

We cast an int to a void * which not unreasonably makes gcc suspicious. We don't actually care what type "type" is so use unsigned long so it matches pointer length on all platforms.

drivers/usb/storage/libusual.c +1 -1
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.16-rc1/drivers/usb/storage/libusual.c linux-2.6.16-rc1/drivers/usb/storage/libusual.c
@@ -116,7 +116,7 @@
 static int usu_probe(struct usb_interface *intf,
 			 const struct usb_device_id *id)
 {
-	int type;
+	unsigned long type;
 	int rc;
 	unsigned long flags;
 
Acked-by
#1 lore raw

drivers/usb/storage/libusual.c line 119

Quoted 11 lines · Alan Cox

We cast an int to a void * which not unreasonably makes gcc suspicious. We don't actually care what type "type" is so use unsigned long so it matches pointer length on all platforms.

static int usu_probe(struct usb_interface *intf,

drivers/usb/storage/libusual.c +1 -1
 			 const struct usb_device_id *id)
 {
-	int type;
+	unsigned long type;

Looks good to me.

-- Pete