From 541dc0d47f10973c241e9955afc2aefc96adec51 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 31 Aug 2011 12:38:01 +0200 Subject: Use new macro QEMU_PACKED for packed structures Most changes were made using these commands: git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/' Whitespace in linux-user/syscall_defs.h was fixed manually to avoid warnings from scripts/checkpatch.pl. Manual changes were also applied to hw/pc.c. I did not fix indentation with tabs in block/vvfat.c. The patch will show 4 errors with scripts/checkpatch.pl. Signed-off-by: Stefan Weil Signed-off-by: Blue Swirl --- tests/test-i386.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test-i386.c b/tests/test-i386.c index 56ff1103f..9cb5b51b7 100644 --- a/tests/test-i386.c +++ b/tests/test-i386.c @@ -773,7 +773,7 @@ void test_fops(double a, double b) void fpu_clear_exceptions(void) { - struct __attribute__((packed)) { + struct QEMU_PACKED { uint16_t fpuc; uint16_t dummy1; uint16_t fpus; @@ -924,7 +924,7 @@ void test_fbcd(double a) void test_fenv(void) { - struct __attribute__((packed)) { + struct QEMU_PACKED { uint16_t fpuc; uint16_t dummy1; uint16_t fpus; @@ -934,7 +934,7 @@ void test_fenv(void) uint32_t ignored[4]; long double fpregs[8]; } float_env32; - struct __attribute__((packed)) { + struct QEMU_PACKED { uint16_t fpuc; uint16_t fpus; uint16_t fptag; @@ -1279,7 +1279,7 @@ void test_segs(void) struct { uint32_t offset; uint16_t seg; - } __attribute__((packed)) segoff; + } QEMU_PACKED segoff; ldt.entry_number = 1; ldt.base_addr = (unsigned long)&seg_data1; @@ -1441,7 +1441,7 @@ void test_misc(void) /* XXX: see if Intel Core2 and AMD64 behavior really differ. Here we implemented the Intel way which is not compatible yet with QEMU. */ - static struct __attribute__((packed)) { + static struct QEMU_PACKED { uint64_t offset; uint16_t seg; } desc; -- cgit v1.2.3