
On 07/30/2013 07:05 AM, Peter Krempa wrote:
Use the JSON error messages to report errors back to the caller in addition to erroring out. The error reported from the event loop from the mock function of the monitor was later overwritten by the call to the monitor/agent interaction API. This will also allow testing of error reporting. --- tests/qemumonitortestutils.c | 56 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 10 deletions(-)
My version of gcc complains: qemumonitortestutils.c: In function 'qemuMonitorReportError': qemumonitortestutils.c:140:5: error: function might be possible candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format] if (virVasprintf(&msg, errmsg, msgargs) < 0) ^
@@ -132,11 +134,48 @@ qemuMonitorTestAddUnexpectedErrorResponse(qemuMonitorTestPtr test)
static int +qemuMonitorReportError(qemuMonitorTestPtr test, const char *errmsg, ...)
You'll need to add ATTRIBUTE_FMT_PRINTF(2, 3) to shut up the warning. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org