kinect_upload_fw: fix -Wsign-compare and -Wpointer-sign
authorAntonio Ospite <ospite@studenti.unina.it>
Thu, 29 Sep 2011 21:11:21 +0000 (23:11 +0200)
committerAntonio Ospite <ospite@studenti.unina.it>
Thu, 29 Sep 2011 21:40:12 +0000 (23:40 +0200)
kinect_upload_fw.c:99:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
kinect_upload_fw.c:188:4: error: pointer targets in passing argument 3 of â€˜libusb_bulk_transfer’ differ in signedness [-Wpointer-sign]

kinect_upload_fw/kinect_upload_fw.c

index b16cff9..3a22d5c 100644 (file)
@@ -36,7 +36,7 @@
 #include <libusb.h>
 
 static libusb_device_handle *dev;
-int seq;
+unsigned int seq;
 
 typedef struct {
        uint32_t magic;
@@ -162,7 +162,7 @@ int main(int argc, char** argv) {
        seq++;
 
        uint32_t addr = 0x00080000;
-       char page[0x4000];
+       unsigned char page[0x4000];
        int read;
        do {
                read = fread(page, 1, 0x4000, fw);