From: Peng Fan Date: Fri, 19 Mar 2021 07:56:53 +0000 (+0800) Subject: tools: imx image: fix write warning X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=16841a6a500766662f6e5d3c07ad1595c7deaceb;p=u-boot.git tools: imx image: fix write warning Fix the warning by set the variable zero to uint64_t "warning: ‘write’ reading 5 bytes from a region of size 4" Signed-off-by: Peng Fan --- diff --git a/tools/imx8image.c b/tools/imx8image.c index 133780f5ea..fa8f227487 100644 --- a/tools/imx8image.c +++ b/tools/imx8image.c @@ -365,7 +365,7 @@ static void copy_file (int ifd, const char *datafile, int pad, int offset) struct stat sbuf; unsigned char *ptr; int tail; - int zero = 0; + uint64_t zero = 0; uint8_t zeros[4096]; int size, ret; diff --git a/tools/imx8mimage.c b/tools/imx8mimage.c index 9985b95a98..11e40ccd94 100644 --- a/tools/imx8mimage.c +++ b/tools/imx8mimage.c @@ -248,7 +248,7 @@ static void copy_file(int ifd, const char *datafile, int pad, int offset, struct stat sbuf; unsigned char *ptr; int tail; - int zero = 0; + uint64_t zero = 0; uint8_t zeros[4096]; int size, ret;