diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2021-03-09 14:49:35 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-03-09 14:49:35 +1100 |
commit | 8e7ff260f755548f5b039ab4e0a970dfff8073b2 (patch) | |
tree | 169a24a3312ed975aaa36d82dafeda2567e3ed26 /dtc.c | |
parent | 88875268c05c9cf342d958a5c65973b0ee45888e (diff) | |
download | dtc-8e7ff260f755548f5b039ab4e0a970dfff8073b2.zip dtc-8e7ff260f755548f5b039ab4e0a970dfff8073b2.tar.gz dtc-8e7ff260f755548f5b039ab4e0a970dfff8073b2.tar.bz2 |
libfdt: Fix a possible "unchecked return value" warning
Apparently the unchecked return value of the first fdt_next_tag() call in
fdt_add_subnode_namelen() is tripping Coverity Scan in some circumstances,
although it appears not to for the scan on our project itself.
This fdt_next_tag() should always return FDT_BEGIN_NODE, since otherwise
the fdt_subnode_offset_namelen() above would have returned BADOFFSET or
BADSTRUCTURE.
Still, add a check to shut Coverity up, gated by a can_assume() to avoid
bloat in small builds.
Reported-by: Ryan Long <ryan.long@oarcorp.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.c')
0 files changed, 0 insertions, 0 deletions