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>
{
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) {
static void populate_network_config(struct platform_powerpc *platform,
struct config *config)
{
+ char *val, *saveptr = NULL;
const char *cval;
- char *val;
int i;
cval = get_param(platform, "petitboot,network");
val = talloc_strdup(config, cval);
for (i = 0; ; i++) {
- char *tok, *saveptr;
+ char *tok;
tok = strtok_r(i == 0 ? val : NULL, " ", &saveptr);
if (!tok)