btrfs: remove redundant initialization of variable dirty
Subsystems (2)
PATCH 1/1 btrfs: remove redundant initialization of variable dirty
The variable dirty is initialized with a value that is never read, it is being re-assigned later on. Remove the redundant initialization. Cleans up clang scan build warning:
fs/btrfs/inode.c:5965:7: warning: Value stored to 'dirty' during its initialization is never read [deadcode.DeadStores]
Signed-off-by Colin Ian King <[email protected]>
--- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/inode.c +1 -1
@@ -5962,7 +5962,7 @@ static int btrfs_dirty_inode(struct btrfs_inode *inode)static int btrfs_update_time (struct inode *inode,int flags) {struct btrfs_root *root =BTRFS_I (inode)->root; -bool dirty = flags & ~S_VERSION ; +bool dirty;if (btrfs_root_readonly (root))return -EROFS ;
Signature · 1 line
2.39.2
Quoted 8 lines · Colin Ian King
The variable dirty is initialized with a value that is never read, it is being re-assigned later on. Remove the redundant initialization. Cleans up clang scan build warning:
fs/btrfs/inode.c:5965:7: warning: Value stored to 'dirty' during its initialization is never read [deadcode.DeadStores]Signed-off-by Colin Ian King <[email protected]>
Added to misc-next, thanks.