Skip to content

Commit

Permalink
tools: imx image: fix write warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
MrVan authored and sbabic committed Apr 8, 2021
1 parent e9c99db commit 16841a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/imx8image.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tools/imx8mimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 16841a6

Please sign in to comment.