fix compile warning for env tools
PATCH v2 1/1 fix compile warning for env tools
Patch fixes this issue:
fw_env.c: In function ?fw_setenv?:
fw_env.c:492:5: warning: format ?%u? expects argument of type ?unsigned int?, but argument 3 has type ?size_t? [-Wformat] fw_env.c: In function ?flash_write_buf?:
fw_env.c:806:6: warning: format ?%u? expects argument of type ?unsigned int?, but argument 3 has type ?size_t? [-Wformat]
---
tools/env/fw_env.c +2 -2
@@ -488,7 +488,7 @@ int fw_setenv(int argc, char *argv[]) value = (char *)malloc (len -strlen (name));if (!value) {fprintf (stderr, -"Cannot malloc %u bytes: %s\n" , +"Cannot malloc %zu bytes: %s\n" , len -strlen (name),strerror (errno));return -1 ; }
@@ -802,7 +802,7 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count, data =malloc (erase_len);if (!data) {fprintf (stderr, -"Cannot malloc %u bytes: %s\n" , +"Cannot malloc %zu bytes: %s\n" , erase_len,strerror (errno));return -1 ; }
PATCH v2 1/1 fix compile warning for env tools
Quoted 8 lines · On Monday, September 05, 2011 17:40:13 Luka Perkov wrote:
Patch fixes this issue:
fw_env.c: In function ?fw_setenv?:
fw_env.c:492:5: warning: format ?%u? expects argument of type ?unsigned int?, but argument 3 has type ?size_t? [-Wformat]fw_env.c: In function ?flash_write_buf?:
fw_env.c:806:6: warning: format ?%u? expects argument of type ?unsigned int?, but argument 3 has type ?size_t? [-Wformat]
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110907/8e9cc3bf/attachment.pgp
Wolfgang Denk
AppliedPATCH v2 1/1 fix compile warning for env tools
In reply to Luka PerkovDear Luka Perkov,
Quoted 9 lines · In message <[email protected]> you wrote:
Patch fixes this issue:
fw_env.c: In function ???fw_setenv???:
fw_env.c:492:5: warning: format ???%u??? expects argument of type ???unsigned int???, but argument 3 has type ???size_t??? [-Wformat]fw_env.c: In function ???flash_write_buf???:
fw_env.c:806:6: warning: format ???%u??? expects argument of type ???unsigned int???, but argument 3 has type ???size_t??? [-Wformat]Signed-off-by Luka Perkov <[email protected]>---
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Beauty is transitory." "Beauty survives." -- Spock and Kirk, "That Which Survives", stardate unknown