Commit 28b0d190 authored by Eric Snowberg's avatar Eric Snowberg Committed by Daniel Kiper

mkimage: fix build regression in grub_mkimage_load_image

The grub_mkimage_load_image function (commit 7542af69, 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: default avatarEric Snowberg <eric.snowberg@oracle.com>
Reviewed-by: default avatarDaniel Kiper <daniel.kiper@oracle.com>
parent d73badfd
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment