[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 47/51] block/block-copy: Fix uninitialized variable in block_copy_
From: |
Kevin Wolf |
Subject: |
[PULL 47/51] block/block-copy: Fix uninitialized variable in block_copy_task_entry |
Date: |
Fri, 15 May 2020 14:45:17 +0200 |
From: Philippe Mathieu-Daudé <address@hidden>
Fix when building with -Os:
CC block/block-copy.o
block/block-copy.c: In function ‘block_copy_task_entry’:
block/block-copy.c:428:38: error: ‘error_is_read’ may be used uninitialized
in this function [-Werror=maybe-uninitialized]
428 | t->call_state->error_is_read = error_is_read;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/block-copy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index 4713c8f2a3..7c7f7acbae 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -418,7 +418,7 @@ out:
static coroutine_fn int block_copy_task_entry(AioTask *task)
{
BlockCopyTask *t = container_of(task, BlockCopyTask, task);
- bool error_is_read;
+ bool error_is_read = false;
int ret;
ret = block_copy_do_copy(t->s, t->offset, t->bytes, t->zeroes,
--
2.25.4
- [PULL 36/51] block: Drop child_backing, (continued)
- [PULL 36/51] block: Drop child_backing, Kevin Wolf, 2020/05/15
- [PULL 38/51] block: Make filter drivers use child_of_bds, Kevin Wolf, 2020/05/15
- [PULL 39/51] block: Use child_of_bds in remaining places, Kevin Wolf, 2020/05/15
- [PULL 40/51] tests: Use child_of_bds instead of child_file, Kevin Wolf, 2020/05/15
- [PULL 41/51] block: Use bdrv_default_perms(), Kevin Wolf, 2020/05/15
- [PULL 43/51] block: Drop bdrv_format_default_perms(), Kevin Wolf, 2020/05/15
- [PULL 46/51] block: Drop @child_class from bdrv_child_perm(), Kevin Wolf, 2020/05/15
- [PULL 42/51] block: Make bdrv_filter_default_perms() static, Kevin Wolf, 2020/05/15
- [PULL 44/51] block: Drop child_file, Kevin Wolf, 2020/05/15
- [PULL 45/51] block: Pass BdrvChildRole in remaining cases, Kevin Wolf, 2020/05/15
- [PULL 47/51] block/block-copy: Fix uninitialized variable in block_copy_task_entry,
Kevin Wolf <=
- [PULL 49/51] iotests: log messages from notrun(), Kevin Wolf, 2020/05/15
- [PULL 50/51] hw/ide/ahci: Log lost IRQs, Kevin Wolf, 2020/05/15
- [PULL 51/51] iotests/030: Reduce run time by unthrottling job earlier, Kevin Wolf, 2020/05/15
- [PULL 48/51] block/block-copy: Simplify block_copy_do_copy(), Kevin Wolf, 2020/05/15
- Re: [PULL 00/51] Block layer patches, Peter Maydell, 2020/05/15
- Re: [PULL 00/51] Block layer patches, no-reply, 2020/05/15