diff mbox series

[02/13] block/iscsi:Remove redundant statement in iscsi_open()

Message ID 20200225020937.25028-3-kuhn.chenqun@huawei.com
State New
Headers show
Series redundant code: Fix warnings reported by Clang static code analyzer | expand

Commit Message

Chenqun (kuhn) Feb. 25, 2020, 2:09 a.m. UTC
From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
  block/iscsi.c:1920:9: warning: Value stored to 'flags' is never read
        flags &= ~BDRV_O_RDWR;
        ^        ~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
---
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Lieven <pl@kamp.de>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org
---
 block/iscsi.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/block/iscsi.c b/block/iscsi.c
index 682abd8e09..ed88479ede 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1917,7 +1917,6 @@  static int iscsi_open(BlockDriverState *bs, QDict *options, int flags,
         if (ret < 0) {
             goto out;
         }
-        flags &= ~BDRV_O_RDWR;
     }
 
     iscsi_readcapacity_sync(iscsilun, &local_err);