On Thu, Mar 02, 2017 at 05:01:06PM +0000, Felipe Franciosi wrote:
> Hi Eric,
> 
> Ping on this?
> http://lists.nongnu.org/archive/html/qemu-devel/2016-10/msg06169.html

[snip]

>       CC      contrib/ivshmem-client/main.o
>     
> /var/tmp/patchew-tester-tmp-naxuy_ku/src/contrib/libvhost-user/libvhost-user.c:
>  In function ‘vu_panic’:
>     
> /var/tmp/patchew-tester-tmp-naxuy_ku/src/contrib/libvhost-user/libvhost-user.c:84:5:
>  error: ignoring return value of ‘vasprintf’, declared with attribute 
> warn_unused_result [-Werror=unused-result]
>          (void)vasprintf(&buf, msg, ap);
>          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     cc1: all warnings being treated as errors

You can side-step the issue entirely by simply not using the vasprintf
function. Instead do   'buf = g_strdup_vprintf(msg, ap);' - glib does
abort-on-oom, so there's no error scenario you need to handle.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

Reply via email to