Skip to contentSkip to conversation

Signdness issue in drivers/usb/gadget/ether.c

PATCH New Eric Sesterhenn 1 participant 1 message Aug 20, 2006 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Signdness issue in drivers/usb/gadget/ether.c

hi,

another gcc 4.1 signdness warning:

drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false

length is assigned the value of usb_ep_queue() which returns an int. Directly after this it is checked for < 0, which can never be true. Making length an int makes the error check work again.

drivers/usb/gadget/ether.c renamed from drivers/usb/gadget/ether.c.orig +1 -1
@@ -1998,7 +1998,7 @@ rndis_control_ack_complete (struct usb_e
 static int rndis_control_ack (struct net_device *net)
 {
 	struct eth_dev          *dev = netdev_priv(net);
-	u32                     length;
+	int                     length;
 	struct usb_request      *resp = dev->stat_req;
 
 	/* in case RNDIS calls this after disconnect */