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>
This commit is contained in:
parent
ea34d1dd96
commit
ae11f6ca66
@ -584,7 +584,7 @@ static coroutine_fn int block_copy_task_entry(AioTask *task)
|
|||||||
BlockCopyState *s = t->s;
|
BlockCopyState *s = t->s;
|
||||||
bool error_is_read = false;
|
bool error_is_read = false;
|
||||||
BlockCopyMethod method = t->method;
|
BlockCopyMethod method = t->method;
|
||||||
int ret;
|
int ret = -1;
|
||||||
|
|
||||||
WITH_GRAPH_RDLOCK_GUARD() {
|
WITH_GRAPH_RDLOCK_GUARD() {
|
||||||
ret = block_copy_do_copy(s, t->req.offset, t->req.bytes, &method,
|
ret = block_copy_do_copy(s, t->req.offset, t->req.bytes, &method,
|
||||||
|
Loading…
Reference in New Issue
Block a user