mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02: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
@@ -509,7 +509,7 @@ void reset_cmd_timeout(void)
|
||||
*/
|
||||
|
||||
#define putnstr(str,n) do { \
|
||||
printf ("%.*s", n, str); \
|
||||
printf ("%.*s", (int)n, str); \
|
||||
} while (0)
|
||||
|
||||
#define CTL_CH(c) ((c) - 'a' + 1)
|
||||
|
Reference in New Issue
Block a user