]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
clang tidy generates use-after-move warning 57878/head
authorSuyash Dongre <suyashd999@gmail.com>
Tue, 4 Jun 2024 18:47:48 +0000 (00:17 +0530)
committerSuyash Dongre <suyashd999@gmail.com>
Wed, 3 Jul 2024 16:42:36 +0000 (22:12 +0530)
commit02e9a4c77a27ce818d4ee15d5a2ee073c019a0f2
tree35a04151d379c1bd9ad972246a2d9984a805cd02
parent8c4f910f646947fd5a6025aee76003c4d279bb82
clang tidy generates use-after-move warning

clang-tidy original warning:
/home/suyash/ceph/src/cls/queue/cls_queue_src.cc:330:50: warning: 'bl' used after it was moved [bugprone-use-after-move]
    uint64_t entry_start_offset = start_offset - bl.length();
                                                 ^
/home/suyash/ceph/src/cls/queue/cls_queue_src.cc:333:14: note: move occurred here
    bl_chunk = std::move(bl);
             ^
/home/suyash/ceph/src/cls/queue/cls_queue_src.cc:330:50: note: the use happens in a later loop iteration than the move
    uint64_t entry_start_offset = start_offset - bl.length();
                                                 ^

Fixes: https://tracker.ceph.com/issues/66356
Signed-off-by: Suyash Dongre <suyashd999@gmail.com>
src/cls/queue/cls_queue_src.cc