From 1c8fac1fbeb858903f05ddb54b974ab1b4d7e2f5 Mon Sep 17 00:00:00 2001 From: Maxim Kammerer Date: Sat, 4 Aug 2012 05:09:10 +0400 Subject: [PATCH] image: Prevent an uninitialized variable warning padlen variable in image_write() cannot be used uninitialized, but compiler is unable to determine that. Signed-off-by: Maxim Kammerer Signed-off-by: Jeremy Kerr --- image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/image.c b/image.c index ef2ad6f..435f8a5 100644 --- a/image.c +++ b/image.c @@ -395,6 +395,7 @@ int image_write(struct image *image, const char *filename) uint8_t pad[8]; is_signed = image->sigbuf && image->sigsize; + padlen = 0; /* optionally update the image to contain signature data */ if (is_signed) {