From: Sven Ebenfeld Date: Tue, 17 Jan 2017 18:36:51 +0000 (+0100) Subject: tools: mkimage: fix sizeof_mismatch found by coverity X-Git-Tag: v2017.03-rc1~73 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b4e923a8056c29ae978c2086b65be0cbc84cef4e;p=u-boot tools: mkimage: fix sizeof_mismatch found by coverity Reported-by: Coverity (CID: 155214) Signed-off-by: Sven Ebenfeld --- 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,