From 05d2ed3277a7c7057b77b2e62bda9d0ed8c6ef13 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 1 Apr 2011 11:43:51 +0100 Subject: [PATCH] * grub-core/normal/menu_entry.c (run): Quieten uninitialised warning. (This was in fact always initialised before use, but GCC wasn't smart enough to prove that.) * grub-core/script/lexer.c (grub_script_lexer_yywrap): Likewise. --- ChangeLog | 7 +++++++ grub-core/normal/menu_entry.c | 2 +- grub-core/script/lexer.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 847d04b03..21fd6b68b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-04-01 Colin Watson + + * grub-core/normal/menu_entry.c (run): Quieten uninitialised + warning. (This was in fact always initialised before use, but GCC + wasn't smart enough to prove that.) + * grub-core/script/lexer.c (grub_script_lexer_yywrap): Likewise. + 2011-03-31 Vladimir Serbinenko * grub-core/kern/x86_64/efi/callwrap.S (efi_wrap_0): Preserve 16-byte diff --git a/grub-core/normal/menu_entry.c b/grub-core/normal/menu_entry.c index 94f6e7f32..a675ff005 100644 --- a/grub-core/normal/menu_entry.c +++ b/grub-core/normal/menu_entry.c @@ -1165,7 +1165,7 @@ run (struct screen *screen) { char *script; int errs_before; - grub_menu_t menu; + grub_menu_t menu = NULL; char *dummy[1] = { NULL }; auto char * editor_getsource (void); diff --git a/grub-core/script/lexer.c b/grub-core/script/lexer.c index 909b515fa..98279079f 100644 --- a/grub-core/script/lexer.c +++ b/grub-core/script/lexer.c @@ -126,7 +126,7 @@ int grub_script_lexer_yywrap (struct grub_parser_param *parserstate, const char *input) { - int len; + int len = 0; char *p = 0; char *line = 0; YY_BUFFER_STATE buffer;