From dc4b0b38d4aadf08826f6c31270f1eecd27964fd Mon Sep 17 00:00:00 2001 From: Andrew Klossner Date: Mon, 7 Jul 2008 06:41:14 -0700 Subject: 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 --- common/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/main.c') diff --git a/common/main.c b/common/main.c index 046da6f23..79ad2912a 100644 --- a/common/main.c +++ b/common/main.c @@ -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) -- cgit v1.2.3