aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2024-04-09 17:11:33 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-02 16:14:29 +0400
commitae11f6ca66f2de9a7e2f0445ac870824e7fa8eee (patch)
tree6b2a3fe86cd39d3e3dc5dd06492407347f6ad400 /block
parentea34d1dd968956ec418c4278b39b6c44bb606d9c (diff)
block/block-copy: fix -Werror=maybe-uninitialized false-positive
../block/block-copy.c:591:12: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'block')
-rw-r--r--block/block-copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/block-copy.c b/block/block-copy.c
index 93eb1b2664..eddb0b81e0 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -584,7 +584,7 @@ static coroutine_fn int block_copy_task_entry(AioTask *task)
BlockCopyState *s = t->s;
bool error_is_read = false;
BlockCopyMethod method = t->method;
- int ret;
+ int ret = -1;
WITH_GRAPH_RDLOCK_GUARD() {
ret = block_copy_do_copy(s, t->req.offset, t->req.bytes, &method,