From 359f12f9eb0440294a8be1b78ade1b69926d2896 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Tue, 16 Apr 2013 16:07:33 +0800 Subject: discover: Fix potentially-unused var warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit discover/boot.c: In function ‘boot’: discover/boot.c:153:13: error: ‘local_initrd’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Signed-off-by: Jeremy Kerr --- discover/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'discover') diff --git a/discover/boot.c b/discover/boot.c index 02618cc..e67ed00 100644 --- a/discover/boot.c +++ b/discover/boot.c @@ -103,6 +103,7 @@ int boot(void *ctx, struct boot_option *opt, struct boot_command *cmd, char *image, *initrd, *args; int result; + local_initrd = NULL; image = NULL; initrd = NULL; args = NULL; @@ -134,7 +135,6 @@ int boot(void *ctx, struct boot_option *opt, struct boot_command *cmd, if (!local_image) goto no_load; - local_initrd = NULL; if (initrd) { local_initrd = load_file(NULL, initrd, &clean_initrd); if (!local_initrd) -- cgit v1.2.1