aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-01-15 12:56:41 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-19 16:42:03 -0600
commit40480d2bf4b4f5770b1f740672c5d890bf9cee19 (patch)
treef0093233585c77c60696417ac1b610290825dcc9 /qemu-common.h
parentUpdate version and changelog for release (diff)
downloadqemu-kvm-40480d2bf4b4f5770b1f740672c5d890bf9cee19.tar.gz
qemu-kvm-40480d2bf4b4f5770b1f740672c5d890bf9cee19.tar.bz2
qemu-kvm-40480d2bf4b4f5770b1f740672c5d890bf9cee19.zip
Fix QEMU_WARN_UNUSED_RESULT
Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it is conditional on a define from config-host.h which is included only later. Include that file earlier to get the warnings back. Reactivating it unfortunately leads to some warnings about unused qdev_init results. These calls are changed to qdev_init_nofail to avoid build failures. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit beb6f0de7aa19ce62fdd21a876b8c171ac7fde2e)
Diffstat (limited to 'qemu-common.h')
-rw-r--r--qemu-common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/qemu-common.h b/qemu-common.h
index 8630f8c41..d96060adb 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -2,6 +2,8 @@
#ifndef QEMU_COMMON_H
#define QEMU_COMMON_H
+#include "config-host.h"
+
#define QEMU_NORETURN __attribute__ ((__noreturn__))
#ifdef CONFIG_GCC_ATTRIBUTE_WARN_UNUSED_RESULT
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
@@ -29,7 +31,6 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <assert.h>
-#include "config-host.h"
#ifndef O_LARGEFILE
#define O_LARGEFILE 0