From 28b0d19061d66e3633148ac8e44decda914bf266 Mon Sep 17 00:00:00 2001 From: Eric Snowberg Date: Tue, 6 Mar 2018 13:38:58 -0800 Subject: [PATCH] mkimage: fix build regression in grub_mkimage_load_image The grub_mkimage_load_image function (commit 7542af6, mkimage: refactor a bunch of section data into a struct.) introduces a build regression on SPARC: cc1: warnings being treated as errors In file included from util/grub-mkimage32.c:23: util/grub-mkimagexx.c: In function 'grub_mkimage_load_image32': util/grub-mkimagexx.c:1968: error: missing initializer util/grub-mkimagexx.c:1968: error: (near initialization for 'smd.sections') make[2]: *** [util/grub_mkimage-grub-mkimage32.o] Error 1 Initialize the entire section_metadata structure. Signed-off-by: Eric Snowberg Reviewed-by: Daniel Kiper --- util/grub-mkimagexx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c index 11d05d7a8..a483c674c 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -1965,7 +1965,7 @@ SUFFIX (grub_mkimage_load_image) (const char *kernel_path, const struct grub_install_image_target_desc *image_target) { char *kernel_img, *out_img; - struct section_metadata smd = { 0, }; + struct section_metadata smd = { 0, 0, 0, 0, 0, 0, 0 }; Elf_Ehdr *e; int i; Elf_Shdr *s;