diff mbox series

[01/26] tools: imx image: fix write warning

Message ID 20210319075718.14181-2-peng.fan@oss.nxp.com
State New
Headers show
Series imx: update for i.MX8M | expand

Commit Message

Peng Fan (OSS) March 19, 2021, 7:56 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>


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 <peng.fan@nxp.com>

---
 tools/imx8image.c  | 2 +-
 tools/imx8mimage.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.30.0
diff mbox series

Patch

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;