]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qtest: Include system headers before user headers
authorStefan Hajnoczi <stefanha@redhat.com>
Sat, 8 Feb 2014 10:41:07 +0000 (11:41 +0100)
committerAndreas Färber <afaerber@suse.de>
Mon, 17 Feb 2014 22:10:02 +0000 (23:10 +0100)
It is dangerous to include user headers before system headers since user
macros can affect system headers.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
tests/endianness-test.c
tests/fw_cfg-test.c
tests/i440fx-test.c
tests/m48t59-test.c
tests/qom-test.c
tests/rtc-test.c
tests/tmp105-test.c

index 646df7d8da3e29a29f4f7e104b8b62c0501346df..92e17d251ad815d0888e6dfb8bb188d7501e1212 100644 (file)
@@ -10,7 +10,6 @@
  * See the COPYING file in the top-level directory.
  *
  */
-#include "libqtest.h"
 
 #include <glib.h>
 #include <stdio.h>
@@ -18,6 +17,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "libqtest.h"
 #include "qemu/bswap.h"
 
 typedef struct TestCase TestCase;
index e4f355ce3f6a221299cb24e72534389485bec103..5c8f8d6c2465c3d370834de5123ced3eb3c66d47 100644 (file)
  * See the COPYING file in the top-level directory.
  */
 
-#define NO_QEMU_PROTOS
+#include <string.h>
+#include <glib.h>
 
 #include "libqtest.h"
+#define NO_QEMU_PROTOS
 #include "hw/nvram/fw_cfg.h"
 #include "libqos/fw_cfg.h"
 
-#include <string.h>
-#include <glib.h>
-
 static uint64_t ram_size = 128 << 20;
 static uint16_t nb_cpus = 1;
 static uint16_t max_cpus = 1;
index fa3e3d6b8769c4bdf580a801a628f98ab291a0dc..e398b83018ebfdd0dbc878753f254f1844c938f2 100644 (file)
  * See the COPYING file in the top-level directory.
  */
 
-#include "libqos/pci.h"
-#include "libqos/pci-pc.h"
-#include "libqtest.h"
-
-#include "hw/pci/pci_regs.h"
-
 #include <glib.h>
 #include <string.h>
 #include <stdio.h>
 #include <sys/mman.h>
 #include <stdlib.h>
 
+#include "libqtest.h"
+#include "libqos/pci.h"
+#include "libqos/pci-pc.h"
+#include "hw/pci/pci_regs.h"
+
 #define BROKEN 1
 
 #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
index 6abc4c8bf0e4607accc58c23ec6d2c35ea19e477..71b4f280528bbe9258e66bcd68edf71ec60ac5fd 100644 (file)
@@ -11,7 +11,6 @@
  * See the COPYING file in the top-level directory.
  *
  */
-#include "libqtest.h"
 
 #include <glib.h>
 #include <stdio.h>
@@ -19,6 +18,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "libqtest.h"
+
 #define RTC_SECONDS             0x9
 #define RTC_MINUTES             0xa
 #define RTC_HOURS               0xb
index 3316a110a26c88194198933e163277c488e21855..b6671fbec3f31522b5369e36e4d614b98437bd82 100644 (file)
@@ -6,10 +6,11 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  */
-#include "libqtest.h"
 
 #include <glib.h>
 #include <string.h>
+
+#include "libqtest.h"
 #include "qemu/osdep.h"
 #include "qapi/qmp/types.h"
 
index f1b123fae1b829295fd8c6ad1f06a9b5ea70bc14..4243624de6c85e5e025c7a209d865068f12c1233 100644 (file)
@@ -10,8 +10,6 @@
  * See the COPYING file in the top-level directory.
  *
  */
-#include "libqtest.h"
-#include "hw/timer/mc146818rtc_regs.h"
 
 #include <glib.h>
 #include <stdio.h>
@@ -19,6 +17,9 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "libqtest.h"
+#include "hw/timer/mc146818rtc_regs.h"
+
 static uint8_t base = 0x70;
 
 static int bcd2dec(int value)
index 5ac48e2f5c332452f3637a1d28a27f8c991d9bac..0834219e35d6d0eb24f6b9594769073ab95ff19d 100644 (file)
@@ -6,12 +6,13 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  */
+
+#include <glib.h>
+
 #include "libqtest.h"
 #include "libqos/i2c.h"
 #include "hw/misc/tmp105_regs.h"
 
-#include <glib.h>
-
 #define OMAP2_I2C_1_BASE 0x48070000
 
 #define N8X0_ADDR 0x48