On a Tuesday in 2020, Michal Privoznik wrote:
In a few commit back (v6.10.0-5-gb3dad96972) a new helper for obtaining string arrays from a virJSONObject was introduced: virJSONValueObjectGetStringArray(). I've identified three places where it can be used instead of open coding it: qemuAgentSSHGetAuthorizedKeys(), qemuMonitorJSONGetStringListProperty() and qemuMonitorJSONGetCPUDefinitions(). Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_agent.c | 30 +++---------------- src/qemu/qemu_monitor_json.c | 56 +++++------------------------------- 2 files changed, 11 insertions(+), 75 deletions(-) @@ -6788,9 +6764,6 @@ qemuMonitorJSONGetStringListProperty(qemuMonitorPtr mon, g_autoptr(virJSONValue) cmd = NULL; g_autoptr(virJSONValue) reply = NULL; VIR_AUTOSTRINGLIST list = NULL;
list is now unused: ../src/qemu/qemu_monitor_json.c:6766:24: error: unused variable 'list' [-Werror,-Wunused-variable] VIR_AUTOSTRINGLIST list = NULL; ^ 1 error generated.
- virJSONValuePtr data; - size_t n; - size_t i; *strList = NULL;
with that fixed: Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature