From: Sven Ebenfeld Date: Tue, 17 Jan 2017 19:36:51 +0100 Subject: [U-Boot] [PATCH] tools: mkimage: fix sizeof_mismatch found by coverity Message-ID: <1484678211-16515-1-git-send-email-sven.ebenfeld@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 f48135f..e9d049e 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -522,7 +522,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.7.4