Patch 1/2 will be pushed soon under the trivial rule.
Patch 2/2 will be pushed soon under the build breaker rule.
Peter Krempa (2):
qemu: json: Fix missing break in error reporting function
qemu: monitor: Avoid shadowing variable "devname" on FreeBSD. Again.
src/qemu/qemu_monitor_json.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--
2.1.0
Show replies by date
Otherwise we'd report a different error.
Reported by John Ferlan's coverity run.
---
src/qemu/qemu_monitor_json.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 5f00101..7fcf245 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -2128,6 +2128,7 @@ qemuMonitorJSONReportBlockExtentError(qemuMonitorBlockExtentError
error)
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("blockstats stats entry was not in "
"expected format"));
+ break;
case QEMU_MONITOR_BLOCK_EXTENT_ERROR_NOOFFSET:
virReportError(VIR_ERR_INTERNAL_ERROR,
--
2.1.0
FreeBSD's compiler complains that we shadow the symbol. Sigh.
s/devname/dev_name/
---
src/qemu/qemu_monitor_json.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 7fcf245..90a125f 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1993,7 +1993,7 @@ int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
virJSONValuePtr inserted;
virJSONValuePtr image;
qemuBlockStatsPtr bstats;
- const char *devname;
+ const char *dev_name;
if (!dev || dev->type != VIR_JSON_TYPE_OBJECT) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -2002,18 +2002,18 @@ int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
goto cleanup;
}
- if (!(devname = virJSONValueObjectGetString(dev, "device"))) {
+ if (!(dev_name = virJSONValueObjectGetString(dev, "device"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("query-block device entry was not "
"in expected format"));
goto cleanup;
}
- if (STRPREFIX(devname, QEMU_DRIVE_HOST_PREFIX))
- devname += strlen(QEMU_DRIVE_HOST_PREFIX);
+ if (STRPREFIX(dev_name, QEMU_DRIVE_HOST_PREFIX))
+ dev_name += strlen(QEMU_DRIVE_HOST_PREFIX);
/* ignore missing info */
- if (!(bstats = virHashLookup(stats, devname)))
+ if (!(bstats = virHashLookup(stats, dev_name)))
continue;
/* drive may be empty */
--
2.1.0