mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
mkenvimage: Fix compiler warning
Fix the compiler warning
mkenvimage.c: In function ‘main’:
mkenvimage.c:218: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
mkenvimage.c:226: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
introduced with the commit
mkenvimage: Use mmap() when reading from a regular file
6ee39f8055
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
CC: David Wagner <david.wagner@free-electrons.com>
CC: Anatolij Gustschin <agust@denx.de>
CC: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: David Wagner <deubeuliou@gmail.com>
This commit is contained in:
parent
3786980dd3
commit
1ebff63fb9
1 changed files with 2 additions and 2 deletions
|
@ -213,7 +213,7 @@ int main(int argc, char **argv)
|
|||
filebuf = mmap(NULL, sizeof(*envptr) * filesize, PROT_READ,
|
||||
MAP_PRIVATE, txt_fd, 0);
|
||||
if (filebuf == MAP_FAILED) {
|
||||
fprintf(stderr, "mmap (%ld bytes) failed: %s\n",
|
||||
fprintf(stderr, "mmap (%zu bytes) failed: %s\n",
|
||||
sizeof(*envptr) * filesize,
|
||||
strerror(errno));
|
||||
fprintf(stderr, "Falling back to read()\n");
|
||||
|
@ -221,7 +221,7 @@ int main(int argc, char **argv)
|
|||
filebuf = malloc(sizeof(*envptr) * filesize);
|
||||
ret = read(txt_fd, filebuf, sizeof(*envptr) * filesize);
|
||||
if (ret != sizeof(*envptr) * filesize) {
|
||||
fprintf(stderr, "Can't read the whole input file (%ld bytes): %s\n",
|
||||
fprintf(stderr, "Can't read the whole input file (%zu bytes): %s\n",
|
||||
sizeof(*envptr) * filesize,
|
||||
strerror(errno));
|
||||
|
||||
|
|
Loading…
Reference in a new issue