From b4e923a8056c29ae978c2086b65be0cbc84cef4e Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Tue, 17 Jan 2017 19:36:51 +0100 Subject: [PATCH] tools: mkimage: fix sizeof_mismatch found by coverity Reported-by: Coverity (CID: 155214) Signed-off-by: Sven Ebenfeld --- tools/mkimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index b0c98f6f55..d982bc5665 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -526,7 +526,7 @@ int main(int argc, char **argv) + 0x20, 0 }; int i = params.file_size; for (; i < aligned_filesize; i++) { - if (write(ifd, &i, 1) != 1) { + if (write(ifd, (char *) &i, 1) != 1) { fprintf(stderr, "%s: Write error on %s: %s\n", params.cmdname, -- 2.25.1