summaryrefslogtreecommitdiff
path: root/lib_ppc
diff options
context:
space:
mode:
authorAndrew Klossner <andrew@cesa.opbu.xerox.com>2008-07-07 06:41:14 -0700
committerWolfgang Denk <wd@denx.de>2008-07-09 23:55:46 +0200
commitdc4b0b38d4aadf08826f6c31270f1eecd27964fd (patch)
tree54bcc5c3f6e5e25e94fb3baa445f4beb02c1a045 /lib_ppc
parenta292d2265ef0463be4e7c4827a8a0dec556f0a88 (diff)
downloadu-boot-imx-dc4b0b38d4aadf08826f6c31270f1eecd27964fd.zip
u-boot-imx-dc4b0b38d4aadf08826f6c31270f1eecd27964fd.tar.gz
u-boot-imx-dc4b0b38d4aadf08826f6c31270f1eecd27964fd.tar.bz2
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>
Diffstat (limited to 'lib_ppc')
-rw-r--r--lib_ppc/bootm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index 3c1c18b..8d54675 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -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");