Commit 1c204dc92772682432a5fe1b56a64ab97f1a9842

Peter Stuge 2012-11-25T03:51:46

libztex: Silence warning: comparison between signed and unsigned

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libztex.c b/libztex.c
index 78ab939..2cc5053 100644
--- a/libztex.c
+++ b/libztex.c
@@ -466,7 +466,7 @@ int libztex_prepare_device(struct libusb_device *dev, struct libztex_device** zt
 	}
 
 	/* num chars = (all bytes except bLength and bDescriptorType) / 2 */
-	for (i = 0; i <= (cnt - 2) / 2 && i < sizeof(newdev->snString)-1; i++)
+	for (i = 0; i <= (cnt - 2) / 2 && i < (int)sizeof(newdev->snString)-1; i++)
 		newdev->snString[i] = buf[2 + i*2];
 
 	newdev->snString[i] = 0;