From: Felipe Franciosi <felipe@nutanix.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Marc-Andre Lureau <marcandre.lureau@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Daniel P. Berrange" <berrange@redhat.com>,
Felipe Franciosi <felipe@nutanix.com>
Subject: [Qemu-devel] [PATCH v5 1/4] libvhost-user: replace vasprintf() to fix build
Date: Thu, 2 Mar 2017 10:25:50 -0800 [thread overview]
Message-ID: <1488479153-21203-2-git-send-email-felipe@nutanix.com> (raw)
In-Reply-To: <1488479153-21203-1-git-send-email-felipe@nutanix.com>
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>
---
contrib/libvhost-user/libvhost-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
1.9.4
next prev parent reply other threads:[~2017-03-02 18:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 18:25 [Qemu-devel] [PATCH v5 0/4] Introduce vhost-user-scsi and sample application Felipe Franciosi
2017-03-02 18:25 ` Felipe Franciosi [this message]
2017-03-02 19:28 ` [Qemu-devel] [PATCH v5 1/4] libvhost-user: replace vasprintf() to fix build Eric Blake
2017-03-02 18:25 ` [Qemu-devel] [PATCH v5 2/4] vhost-scsi: create a vhost-scsi-common abstraction Felipe Franciosi
2017-03-02 18:25 ` [Qemu-devel] [PATCH v5 3/4] vus: Introduce vhost-user-scsi host device Felipe Franciosi
2017-03-02 18:25 ` [Qemu-devel] [PATCH v5 4/4] vus: Introduce a vhost-user-scsi sample application Felipe Franciosi
2017-03-02 18:31 ` [Qemu-devel] [PATCH v5 0/4] Introduce vhost-user-scsi and " no-reply
2017-03-02 18:32 ` no-reply
2017-03-02 18:46 ` no-reply
2017-03-02 21:47 ` Michael S. Tsirkin
2017-04-21 14:53 ` Felipe Franciosi
2017-07-06 13:41 ` Michael S. Tsirkin
2017-07-06 16:54 ` Harris, James R
2017-07-06 16:56 ` Paolo Bonzini
2017-07-06 17:03 ` Harris, James R
2017-07-06 17:06 ` Paolo Bonzini
2017-07-06 17:38 ` Harris, James R
2017-07-06 17:11 ` Marc-André Lureau
2017-07-06 17:44 ` Harris, James R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488479153-21203-2-git-send-email-felipe@nutanix.com \
--to=felipe@nutanix.com \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).