mirror_zfs/cmd/zdb
Richard Yao 887fb37843 zdb: Silence Coverity complaint about verify_livelist_allocs()
svb is declared on the stack. We then set parts of svb.svb_dva with
DVA_SET_VDEV(), DVA_SET_OFFSET() and DVA_SET_ASIZE(). However, the DVA
contains other fields for pad, GRID and G. When setting the fields we
use, we technically read uninitialized bits  from the fields we do not
use. This makes Coverity and Clang's Static Analyzer complain.
Presumably, other static analyzers might complain too.

There is no real bug here, but we are still technically reading
undefined data and unless we stop doing that, static analyzers will
complain about it in perpetuum and this could obscure real issues. We
silence the static analyzer complaints by using a 0 struct initializer.

Reported by: Coverity (CID 1524627)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14210
2022-11-29 10:00:45 -08:00
..
Makefile.am autoconf: use include directives instead of recursing down cmd 2022-05-10 10:18:38 -07:00
zdb_il.c zfs_rename: support RENAME_* flags 2022-10-28 09:49:20 -07:00
zdb.c zdb: Silence Coverity complaint about verify_livelist_allocs() 2022-11-29 10:00:45 -08:00
zdb.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00