mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Fix printf errors.
The compiler will help find mismatches between printf formats and arguments if you let it. This patch adds the necessary attributes to declarations in include/common.h, then begins to correct the resulting compiler warnings. Some of these were bugs, e.g., "$d" instead of "%d" and incorrect arguments. Others were just annoying, like int-long mismatches on a system where both are 32 bits. It's worth fixing the annoying errors to catch the real ones. Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
This commit is contained in:
committed by
Wolfgang Denk
parent
a292d2265e
commit
dc4b0b38d4
@@ -105,7 +105,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
|
||||
|
||||
if (size < bootm_size) {
|
||||
ulong base = bootmap_base + size;
|
||||
printf("WARNING: adjusting available memory to %x\n", size);
|
||||
printf("WARNING: adjusting available memory to %lx\n", size);
|
||||
lmb_reserve(lmb, base, bootm_size - size);
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
|
||||
*/
|
||||
fdt_blob = (char *)fdt_addr;
|
||||
debug ("* fdt: raw FDT blob\n");
|
||||
printf ("## Flattened Device Tree blob at %08lx\n", fdt_blob);
|
||||
printf ("## Flattened Device Tree blob at %08lx\n", (long)fdt_blob);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -680,7 +680,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
|
||||
goto error;
|
||||
}
|
||||
|
||||
printf (" Booting using the fdt blob at 0x%x\n", fdt_blob);
|
||||
printf (" Booting using the fdt blob at 0x%x\n", (int)fdt_blob);
|
||||
|
||||
} else if (images->legacy_hdr_valid &&
|
||||
image_check_type (&images->legacy_hdr_os_copy, IH_TYPE_MULTI)) {
|
||||
@@ -699,7 +699,7 @@ static int boot_get_fdt (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
|
||||
if (fdt_len) {
|
||||
|
||||
fdt_blob = (char *)fdt_data;
|
||||
printf (" Booting using the fdt at 0x%x\n", fdt_blob);
|
||||
printf (" Booting using the fdt at 0x%x\n", (int)fdt_blob);
|
||||
|
||||
if (fdt_check_header (fdt_blob) != 0) {
|
||||
fdt_error ("image is not a fdt");
|
||||
|
||||
Reference in New Issue
Block a user