block/file-posix: Remove redundant statement in raw_handle_perm_lock()
authorChen Qun <kuhn.chenqun@huawei.com>
Mon, 2 Mar 2020 13:07:06 +0000 (21:07 +0800)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 9 Mar 2020 14:59:31 +0000 (15:59 +0100)
Clang static code analyzer show warning:
  block/file-posix.c:891:9: warning: Value stored to 'op' is never read
        op = RAW_PL_ABORT;
        ^    ~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200302130715.29440-5-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
block/file-posix.c

index 634547711297d6b6f78f9f4cca4d9b0a1a983c25..0f77447a25df87642136f34b0290b1379b27d210 100644 (file)
@@ -888,7 +888,6 @@ static int raw_handle_perm_lock(BlockDriverState *bs,
                               "Is another process using the image [%s]?\n",
                               bs->filename);
         }
-        op = RAW_PL_ABORT;
         /* fall through to unlock bytes. */
     case RAW_PL_ABORT:
         raw_apply_lock_bytes(s, s->fd, s->perm, ~s->shared_perm,