提交 0654d274 编写于 作者: E Eric Blake

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.
上级 2e593ba5
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册