mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 10:01:32 +00:00
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] Signed-off-by: Luka Perkov <lists@lukaperkov.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
a2da616311
commit
8603b69b8b
1 changed files with 2 additions and 2 deletions
4
tools/env/fw_env.c
vendored
4
tools/env/fw_env.c
vendored
|
@ -488,7 +488,7 @@ int fw_setenv(int argc, char *argv[])
|
||||||
value = (char *)malloc(len - strlen(name));
|
value = (char *)malloc(len - strlen(name));
|
||||||
if (!value) {
|
if (!value) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Cannot malloc %u bytes: %s\n",
|
"Cannot malloc %zu bytes: %s\n",
|
||||||
len - strlen(name), strerror(errno));
|
len - strlen(name), strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -802,7 +802,7 @@ static int flash_write_buf (int dev, int fd, void *buf, size_t count,
|
||||||
data = malloc (erase_len);
|
data = malloc (erase_len);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Cannot malloc %u bytes: %s\n",
|
"Cannot malloc %zu bytes: %s\n",
|
||||||
erase_len, strerror (errno));
|
erase_len, strerror (errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue