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
@@ -216,10 +216,10 @@ MachineCheckException(struct pt_regs *regs)
|
||||
|
||||
if (machinecheck_count > 1) {
|
||||
regs->nip += 4; /* skip offending instruction */
|
||||
printf("Skipping current instr, Returning to 0x%08x\n",
|
||||
printf("Skipping current instr, Returning to 0x%08lx\n",
|
||||
regs->nip);
|
||||
} else {
|
||||
printf("Returning back to 0x%08x\n",regs->nip);
|
||||
printf("Returning back to 0x%08lx\n",regs->nip);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ ExtIntException(struct pt_regs *regs)
|
||||
printf("External Interrupt Exception at PC: %lx, SR: %lx, vector=%lx",
|
||||
regs->nip, regs->msr, regs->trap);
|
||||
vect = pic->iack0;
|
||||
printf(" irq IACK0@%05x=%d\n",&pic->iack0,vect);
|
||||
printf(" irq IACK0@%05x=%d\n",(int)&pic->iack0,vect);
|
||||
show_regs(regs);
|
||||
print_backtrace((unsigned long *)regs->gpr[1]);
|
||||
machinecheck_count++;
|
||||
@@ -310,7 +310,7 @@ ExtIntException(struct pt_regs *regs)
|
||||
printf("Returning back to 0x%08x\n",regs->nip);
|
||||
#else
|
||||
regs->nip += 4; /* skip offending instruction */
|
||||
printf("Skipping current instr, Returning to 0x%08x\n",regs->nip);
|
||||
printf("Skipping current instr, Returning to 0x%08lx\n",regs->nip);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user