summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-10-26 09:08:29 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2017-10-26 09:18:08 +0200
commitb0ae9e4b0ceb3b9e220bcca0f7434923781ad715 (patch)
tree8a5e8a72e6884d866f172f44034251ae28712de0
parentc1e55a5513e9bca41dc78a0f20245cc928596a3a (diff)
downloaddevice-tree-compiler-b0ae9e4b0ceb3b9e220bcca0f7434923781ad715.tar.gz
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>
-rw-r--r--tests/sw_tree1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/sw_tree1.c b/tests/sw_tree1.c
index 6a338fc..386b05f 100644
--- a/tests/sw_tree1.c
+++ b/tests/sw_tree1.c
@@ -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);