summary refs log tree commit diff stats
path: root/docs/sphinx/qapidoc.py
diff options
context:
space:
mode:
authorChen Qun <kuhn.chenqun@huawei.com>2020-11-11 22:22:03 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-11-12 14:49:16 +0000
commita24292830b7a356f528760e065c0012ff56e18ab (patch)
tree119aca0afecf9c634c494e6ba3bf57e69954898f /docs/sphinx/qapidoc.py
parenta1af605bd5ade1a6dd571f553a6746b97f3d6869 (diff)
downloadfocaccia-qemu-a24292830b7a356f528760e065c0012ff56e18ab.tar.gz
focaccia-qemu-a24292830b7a356f528760e065c0012ff56e18ab.zip
migration: fix uninitialized variable warning in migrate_send_rp_req_pages()
After the WITH_QEMU_LOCK_GUARD macro is added, the compiler cannot identify
 that the statements in the macro must be executed. As a result, some variables
 assignment statements in the macro may be considered as unexecuted by the compiler.

When the -Wmaybe-uninitialized capability is enabled on GCC9,the compiler showed warning:
migration/migration.c: In function ‘migrate_send_rp_req_pages’:
migration/migration.c:384:8: warning: ‘received’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 384 |     if (received) {
     |        ^

Add a default value for 'received' to prevented the warning.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201111142203.2359370-6-kuhn.chenqun@huawei.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'docs/sphinx/qapidoc.py')
0 files changed, 0 insertions, 0 deletions