diff options
| author | Andrew Klossner <andrew@cesa.opbu.xerox.com> | 2008-07-07 06:41:14 -0700 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2008-07-09 23:55:46 +0200 | 
| commit | dc4b0b38d4aadf08826f6c31270f1eecd27964fd (patch) | |
| tree | 54bcc5c3f6e5e25e94fb3baa445f4beb02c1a045 /common/cmd_fdt.c | |
| parent | a292d2265ef0463be4e7c4827a8a0dec556f0a88 (diff) | |
| download | olio-uboot-2014.01-dc4b0b38d4aadf08826f6c31270f1eecd27964fd.tar.xz olio-uboot-2014.01-dc4b0b38d4aadf08826f6c31270f1eecd27964fd.zip | |
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 'common/cmd_fdt.c')
| -rw-r--r-- | common/cmd_fdt.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index 97b9dd76c..d3b19ddc1 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -451,14 +451,14 @@ static int fdt_valid(void)  		if (err == -FDT_ERR_BADVERSION) {  			if (fdt_version(working_fdt) <  			    FDT_FIRST_SUPPORTED_VERSION) { -				printf (" - too old, fdt $d < %d", +				printf (" - too old, fdt %d < %d",  					fdt_version(working_fdt),  					FDT_FIRST_SUPPORTED_VERSION);  				working_fdt = NULL;  			}  			if (fdt_last_comp_version(working_fdt) >  			    FDT_LAST_SUPPORTED_VERSION) { -				printf (" - too new, fdt $d > %d", +				printf (" - too new, fdt %d > %d",  					fdt_version(working_fdt),  					FDT_LAST_SUPPORTED_VERSION);  				working_fdt = NULL; @@ -546,7 +546,7 @@ static int fdt_parse_prop(char **newval, int count, char *data, int *len)  				newp = newval[++stridx];  		}  		if (*newp != ']') { -			printf("Unexpected character '%c'\n", *newval); +			printf("Unexpected character '%c'\n", *newp);  			return 1;  		}  	} else { @@ -763,7 +763,7 @@ static int fdt_print(const char *pathp, char *prop, int depth)  			}  			break;  		case FDT_NOP: -			printf("/* NOP */\n", &tabs[MAX_LEVEL - level]); +			printf("%s/* NOP */\n", &tabs[MAX_LEVEL - level]);  			break;  		case FDT_END:  			return 1; |