diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-22 07:56:13 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-22 13:41:46 -0500 |
commit | 9aabb2f88bec8549194b8e302b22a1aacefc5ffd (patch) | |
tree | 56e0611acbd79397a6e858e0fbe0c49dda146b46 /board | |
parent | 412411cb2e6f5694b717d8ff574bcf61bfc476cf (diff) |
board/esd/cpci405/cpci405.c: Fix compile warning
Fix this:
cpci405.c: In function 'do_get_bpip':
cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 3 has type 'IPaddr_t'
cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 4 has type 'IPaddr_t'
cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 5 has type 'IPaddr_t'
cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 6 has type 'IPaddr_t'
cpci405.c:700:8: warning: unused variable 'bd'
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/esd/cpci405/cpci405.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 1441b10a978..fb082457edf 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -697,7 +697,6 @@ U_BOOT_CMD( */ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - bd_t *bd = gd->bd; char *buf; ulong crc; char str[32]; @@ -730,11 +729,7 @@ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * Update whole ip-addr */ - sprintf(str, "%ld.%ld.%ld.%ld", - (ipaddr & 0xff000000) >> 24, - (ipaddr & 0x00ff0000) >> 16, - (ipaddr & 0x0000ff00) >> 8, - (ipaddr & 0x000000ff)); + sprintf(str, "%pI4", &ipaddr); setenv("ipaddr", str); printf("Updated ip_addr from bp_eeprom to %s!\n", str); } |