Browse Source

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 7 years ago
parent
commit
b0ae9e4b0c
  1. 2
      tests/sw_tree1.c

2
tests/sw_tree1.c

@ -111,6 +111,8 @@ int main(int argc, char *argv[]) @@ -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);

Loading…
Cancel
Save