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

@ -328,7 +328,7 @@ static grub_err_t
grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[])
{
struct grub_linux_initrd_context initrd_ctx = { 0, };
struct grub_linux_initrd_context initrd_ctx = { 0, 0, 0 };
int initrd_size, initrd_pages;
void *initrd_mem = NULL;