diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-10-26 09:08:29 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-10-26 09:18:08 +0200 |
commit | b0ae9e4b0ceb3b9e220bcca0f7434923781ad715 (patch) | |
tree | 8a5e8a72e6884d866f172f44034251ae28712de0 | |
parent | c1e55a5513e9bca41dc78a0f20245cc928596a3a (diff) | |
download | dtc-b0ae9e4b0ceb3b9e220bcca0f7434923781ad715.zip dtc-b0ae9e4b0ceb3b9e220bcca0f7434923781ad715.tar.gz dtc-b0ae9e4b0ceb3b9e220bcca0f7434923781ad715.tar.bz2 |
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.c | 2 |
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); |