diff options
author | Felipe Franciosi <felipe@nutanix.com> | 2017-03-02 10:25:50 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-05-05 12:10:00 +0200 |
commit | eae0f543341b311038fa2d40350688c646880082 (patch) | |
tree | 99724022f6546f8971b9bfb943b775c18a347e10 | |
parent | 622e42a71f6f6a928b1f2b9d95aff35b47d8b13c (diff) | |
download | qemu-eae0f543341b311038fa2d40350688c646880082.zip qemu-eae0f543341b311038fa2d40350688c646880082.tar.gz qemu-eae0f543341b311038fa2d40350688c646880082.tar.bz2 |
libvhost-user: replace vasprintf() to fix build
On gcc 3.4 and newer, simply using (void) in front of WUR functions is
not sufficient to ignore the return value. That prevents a build when
handling warnings as errors.
libvhost-user had a usage of (void)vasprintf() which triggered such a
condition. This fixes it by replacing this call with g_strdup_vprintf()
which aborts on OOM.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
Message-Id: <1488479153-21203-2-git-send-email-felipe@nutanix.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
-rw-r--r-- | contrib/libvhost-user/libvhost-user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c index af4faad..61e1657 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -81,7 +81,7 @@ vu_panic(VuDev *dev, const char *msg, ...) va_list ap; va_start(ap, msg); - (void)vasprintf(&buf, msg, ap); + buf = g_strdup_vprintf(msg, ap); va_end(ap); dev->broken = true; |