Use full initializer for initrd_ctx to avoid fatal warnings with older GCC

struct ... foo = { 0, } is valid initializer, but older GCC emits
warning which is fatal error due to -Werror=missing-field-initializer.
So simply use full initializer to avoid these errors. This was fixed
probably in GCC 4.7.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
This commit is contained in:
Andrei Borzenkov 2014-10-14 20:12:15 +04:00
parent 77063f4cb6
commit 9a67e1ac8e
9 changed files with 20 additions and 8 deletions

View file

@ -415,7 +415,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
void *initrd_src;
grub_addr_t initrd_dest;
grub_err_t err;
struct grub_linux_initrd_context initrd_ctx = { 0, };
struct grub_linux_initrd_context initrd_ctx = { 0, 0, 0 };
if (argc == 0)
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));