carl9170 firmware tools: fix compiler warnings
authorChristian Lamparter <chunkeey@googlemail.com>
Thu, 13 Jan 2011 13:38:33 +0000 (14:38 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Thu, 13 Jan 2011 13:42:44 +0000 (14:42 +0100)
fwinfo.c:258: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
eeprom_fix.c:235: warning: overflow in implicit constant conversion

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
tools/lib/carlfw.c
tools/lib/carlfw.h
tools/src/fwinfo.c

index 694e8d848a09f11dca33341aadf2d25288a534b0..b75253558cfcfacafb1360849f86067d4127a17c 100644 (file)
@@ -280,7 +280,7 @@ void carlfw_desc_del(struct carlfw *fw,
 }
 
 void *carlfw_desc_mod_len(struct carlfw *fw __unused,
-       struct carl9170fw_desc_head *desc, int len)
+       struct carl9170fw_desc_head *desc, size_t len)
 {
        struct carlfw_list_entry *obj, tmp;
        int new_len = le16_to_cpu(desc->length) + len;
index 85b76b00539a96b1e451da6c617c1515506d68e3..592231c84ec68f1c01a551a4b709a196c9e46865 100644 (file)
@@ -25,7 +25,7 @@ int carlfw_desc_add(struct carlfw *fw,
 
 void *carlfw_desc_mod_len(struct carlfw *fw,
                          struct carl9170fw_desc_head *desc,
-                         int len);
+                         size_t len);
 
 int carlfw_desc_add_before(struct carlfw *fw,
                           const struct carl9170fw_desc_head *desc,
index 64f23b2277b41b47a0a469c4341d566742ce9069..b42852d519f85dbba432b52b30b5a81c37fec0bd 100644 (file)
@@ -255,7 +255,7 @@ int main(int argc, char *args[])
 
        carlfw_get_fw(fw, &len);
        fprintf(stdout, "General Firmware Statistics:\n");
-       fprintf(stdout, "\tFirmware file size: %u Bytes\n", len);
+       fprintf(stdout, "\tFirmware file size: %u Bytes\n", (unsigned int)len);
        fprintf(stdout, "\t%d Descriptors in %d Bytes\n",
                carlfw_get_descs_num(fw), carlfw_get_descs_size(fw));