tests: Correct warning in sw_tree1.c

At least some clang versions (correctly) warn that 'size' is used
unititialized, if sw_tree1 is invoked with argc > 2.  This corrects the
warning.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 2017-10-26 09:08:29 +02:00
parent c1e55a5513
commit b0ae9e4b0c
1 changed files with 2 additions and 0 deletions

View File

@ -111,6 +111,8 @@ int main(int argc, char *argv[])
CONFIG("Bad allocation mode \"%s\" specified",
argv[1]);
}
} else {
CONFIG("sw_tree1 <dtb file> [<allocation mode>]");
}

fdt = xmalloc(size);