From 0654d274e6fdc5c1b3d632665670b338957fc60d Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 7 Oct 2011 20:56:00 -0600 Subject: [PATCH] qemu: silence Coverity false positive Coverity complained that 4 out of 5 callers to virJSONValueObjectGetBoolean checked for errors. But we documented that we don't care in this case. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetBlockInfo): Use ignore_value. --- src/qemu/qemu_monitor_json.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index c4f8360e9d..3d383c825e 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -40,6 +40,7 @@ #include "datatypes.h" #include "virterror_internal.h" #include "json.h" +#include "ignore-value.h" #define VIR_FROM_THIS VIR_FROM_QEMU @@ -1418,7 +1419,8 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitorPtr mon, /* Don't check for success here, because 'tray-open' is presented iff * medium is ejected. */ - virJSONValueObjectGetBoolean(dev, "tray-open", &info->tray_open); + ignore_value(virJSONValueObjectGetBoolean(dev, "tray-open", + &info->tray_open)); break; } -- GitLab