summaryrefslogtreecommitdiffstats
path: root/discover/grub2
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-04-11 16:11:51 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-04-16 09:08:45 +0800
commitcf651e02fb7a34545211708c2a285cd228645531 (patch)
tree96830acda3e05d5293abe077219dd24f48464ee9 /discover/grub2
parentada4ea46dd44e667bfe6341e0b7b5366e5741351 (diff)
downloadtalos-petitboot-cf651e02fb7a34545211708c2a285cd228645531.tar.gz
talos-petitboot-cf651e02fb7a34545211708c2a285cd228645531.zip
discover: Fix uninitialised var warnings
We get a couple of uninitialised var warning when compiling with certain CFLAGS (-fprofile-arcs -ftest-coverage at this stage). In statement_if_execute: We'll never actually use this uninitialised (as there must be at least one conditional in the parsed statement), but we should address the warning nonetheless. As passed to strtok_r: strtok will initialise this, but it isn't obvious to the compiler. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/grub2')
-rw-r--r--discover/grub2/script.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/discover/grub2/script.c b/discover/grub2/script.c
index 0618297..36f73b2 100644
--- a/discover/grub2/script.c
+++ b/discover/grub2/script.c
@@ -309,7 +309,7 @@ int statement_if_execute(struct grub2_script *script,
{
struct grub2_statement_if *st = to_stmt_if(statement);
struct grub2_statement *conditional;
- bool executed;
+ bool executed = false;
int rc = 0;
list_for_each_entry(&st->conditionals->list, conditional, list) {
OpenPOWER on IntegriCloud