
2 Nov
2020
2 Nov
'20
12:06 a.m.
On Sat, 31 Oct 2020 09:07:52 +0800 Qu Wenruo wqu@suse.com wrote:
In show_dir() if we hit file type FT_CHRDEV or FT_BLKDEV, we expect an BTRFS_INODE_ITEM_KEY, and for that case, we should have @ii filled with data read from disk.
We even have ASSERT() for this purpose, but unfortunately coverity can't understand the ASSERT() nor if we get key type BTRFS_INODE_ITEM_KEY, previous if() branch must go to the read_extent_buffer() branch to fill the @ii.
So to make coverity happy, just initialize the variable @ii to all zero.
WTF. If ASSERT excludes this from happening, coverity should understand this. We live in 2020. I don't much like the idea to do things just to get coverity happy if it can't understand and infer from things like ASSERT.