Re: [PATCH 13/20] qemumonitortestutils: Improve error reporting from mock qemu monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]