mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
Fix a few printf argument verification warnings
The parameters of size_t type shall be formatted using "%zu" and not using "%d". Precision argument for the "%.*s" parameters shall be of int type. Signed-off-by: Vasili Galka <vvv444@gmail.com>
This commit is contained in:
@ -23,7 +23,7 @@ static int addr_aligned(struct bounce_buffer *state)
|
|||||||
|
|
||||||
/* Check if length is aligned */
|
/* Check if length is aligned */
|
||||||
if (state->len != state->len_aligned) {
|
if (state->len != state->len_aligned) {
|
||||||
debug("Unaligned buffer length %d\n", state->len);
|
debug("Unaligned buffer length %zu\n", state->len);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -862,7 +862,7 @@ static int device_parse(const char *const mtd_dev, const char **ret, struct mtd_
|
|||||||
debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
|
debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
|
||||||
id->type, MTD_DEV_TYPE(id->type),
|
id->type, MTD_DEV_TYPE(id->type),
|
||||||
id->num, id->mtd_id);
|
id->num, id->mtd_id);
|
||||||
debug("parsing partitions %.*s\n", (pend ? pend - p : strlen(p)), p);
|
debug("parsing partitions %.*s\n", (int)(pend ? pend - p : strlen(p)), p);
|
||||||
|
|
||||||
|
|
||||||
/* parse partitions */
|
/* parse partitions */
|
||||||
@ -1007,7 +1007,7 @@ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_
|
|||||||
list_for_each(entry, &mtdids) {
|
list_for_each(entry, &mtdids) {
|
||||||
id = list_entry(entry, struct mtdids, link);
|
id = list_entry(entry, struct mtdids, link);
|
||||||
|
|
||||||
debug("entry: '%s' (len = %d)\n",
|
debug("entry: '%s' (len = %zu)\n",
|
||||||
id->mtd_id, strlen(id->mtd_id));
|
id->mtd_id, strlen(id->mtd_id));
|
||||||
|
|
||||||
if (mtd_id_len != strlen(id->mtd_id))
|
if (mtd_id_len != strlen(id->mtd_id))
|
||||||
|
@ -86,7 +86,7 @@ void spl_parse_image_header(const struct image_header *header)
|
|||||||
spl_image.os = image_get_os(header);
|
spl_image.os = image_get_os(header);
|
||||||
spl_image.name = image_get_name(header);
|
spl_image.name = image_get_name(header);
|
||||||
debug("spl: payload image: %.*s load addr: 0x%x size: %d\n",
|
debug("spl: payload image: %.*s load addr: 0x%x size: %d\n",
|
||||||
sizeof(spl_image.name), spl_image.name,
|
(int)sizeof(spl_image.name), spl_image.name,
|
||||||
spl_image.load_addr, spl_image.size);
|
spl_image.load_addr, spl_image.size);
|
||||||
} else {
|
} else {
|
||||||
/* Signature not found - assume u-boot.bin */
|
/* Signature not found - assume u-boot.bin */
|
||||||
|
Reference in New Issue
Block a user