From: Christian Lamparter Date: Thu, 13 Jan 2011 13:38:33 +0000 (+0100) Subject: carl9170 firmware tools: fix compiler warnings X-Git-Tag: 1.9.3~23 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=1b87ea4a51988adea4d112ada0cb749c8059353c;p=carl9170fw.git carl9170 firmware tools: fix compiler warnings 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 --- diff --git a/tools/lib/carlfw.c b/tools/lib/carlfw.c index 694e8d8..b752535 100644 --- a/tools/lib/carlfw.c +++ b/tools/lib/carlfw.c @@ -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; diff --git a/tools/lib/carlfw.h b/tools/lib/carlfw.h index 85b76b0..592231c 100644 --- a/tools/lib/carlfw.h +++ b/tools/lib/carlfw.h @@ -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, diff --git a/tools/src/fwinfo.c b/tools/src/fwinfo.c index 64f23b2..b42852d 100644 --- a/tools/src/fwinfo.c +++ b/tools/src/fwinfo.c @@ -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));