[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 20/21] libvhost-user: replace vasprintf() to fix buil
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 20/21] libvhost-user: replace vasprintf() to fix build |
Date: |
Fri, 5 May 2017 12:13:36 +0200 |
From: Felipe Franciosi <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
---
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 af4faad60b..61e1657e41 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;
--
2.12.2
- [Qemu-devel] [PULL 11/21] checkpatch: Disallow glib asserts in main code, (continued)
- [Qemu-devel] [PULL 11/21] checkpatch: Disallow glib asserts in main code, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 13/21] dump: Acquire BQL around vm_start() in dump thread, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 08/21] sgabios: update for "fix wrong video attrs for int 10h, ah==13h", Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 12/21] hax: Fix memory mapping de-duplication logic, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 09/21] vmw_pvscsi: check message ring page count at initialisation, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 14/21] Fix the -accel parameter and the documentation for 'hax', Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 15/21] MAINTAINERS: Add "R:" tag for self-appointed reviewers, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 16/21] get_maintainer: Teach get_maintainer.pl about the new "R:" tag, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 19/21] get_maintainer: add subsystem to reviewer output, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 17/21] get_maintainer: it's '--pattern-depth', not '-pattern-depth', Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 20/21] libvhost-user: replace vasprintf() to fix build,
Paolo Bonzini <=
- [Qemu-devel] [PULL 18/21] get_maintainer: --r (list reviewer) is on by default, Paolo Bonzini, 2017/05/05
- [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Paolo Bonzini, 2017/05/05
- Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Stefan Hajnoczi, 2017/05/30
- Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Felipe Franciosi, 2017/05/30
- Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Paolo Bonzini, 2017/05/30
- Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Felipe Franciosi, 2017/05/30
- Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Paolo Bonzini, 2017/05/30
- Re: [Qemu-devel] [PULL 21/21] vhost-scsi: create a vhost-scsi-common abstraction, Felipe Franciosi, 2017/05/30
Re: [Qemu-devel] [PULL 00/21] Misc patches for 2017-05-05, Stefan Hajnoczi, 2017/05/08
Re: [Qemu-devel] [PULL 00/21] Misc patches for 2017-05-05, Stefan Hajnoczi, 2017/05/30