libvhost-user: replace vasprintf() to fix build
commiteae0f543341b311038fa2d40350688c646880082
authorFelipe Franciosi <felipe@nutanix.com>
Thu, 2 Mar 2017 18:25:50 +0000 (2 10:25 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 May 2017 10:10:00 +0000 (5 12:10 +0200)
tree99724022f6546f8971b9bfb943b775c18a347e10
parent622e42a71f6f6a928b1f2b9d95aff35b47d8b13c
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>
contrib/libvhost-user/libvhost-user.c