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 <eric.snowberg@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Eric Snowberg 2018-03-06 13:38:58 -08:00 committed by Daniel Kiper
parent d73badfd0a
commit 28b0d19061

View file

@ -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;