[Qemu-devel] [PATCH 0/5] Clang patches

2012-07-30 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com With this patch set, I'm able to compile AREG0 free softmmu targets. Blue Swirl (5): sparc: fix floppy TC line setup sparc: fix expression with uninitialized initial value qapi: avoid reserved word restrict user: fix accidental AREG0 use configure:

[Qemu-devel] [PATCH 3/5] qapi: avoid reserved word restrict

2012-07-30 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Clang compiler complained about use of reserved word 'restrict' in SLIRP and QAPI. Rename 'restrict' to 'restricted' which also matches other SLIRP code. Signed-off-by: Blue Swirl blauwir...@gmail.com --- net/slirp.c |6 +++--- qapi-schema.json |

[Qemu-devel] [PATCH 4/5] user: fix accidental AREG0 use

2012-07-30 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Global register AREG0 was always assumed to be usable in user-exec.c, but this is incorrect for several targets. Fix with #ifdeffery and by using other variables. Signed-off-by: Blue Swirl blauwir...@gmail.com --- user-exec.c | 17 - 1

[Qemu-devel] [PATCH 2/5] sparc: fix expression with uninitialized initial value

2012-07-30 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com err was uninitalized, it's not OK to use |=. Spotted by Clang compiler. Fix by replacing |= by =. Signed-off-by: Blue Swirl blauwir...@gmail.com --- linux-user/signal.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[Qemu-devel] [PATCH 5/5] configure: disable a few Clang compiler warnings

2012-07-30 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Clang compiler warns about a few constructs in QEMU code. It's possible to avoid those but that needs more work. Suppress some warnings for Clang compiler. -Wno-unused-value would conflict with GCC. Signed-off-by: Blue Swirl blauwir...@gmail.com ---

[Qemu-devel] [PATCH 1/5] sparc: fix floppy TC line setup

2012-07-30 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com The qemu_irq for Terminal Count (TC) line between FDC and Slavio misc device was created only after use, spotted by Clang compiler. Also, it was not created if the FDC didn't exist. Rearrange code to fix order. Always create the TC line. Signed-off-by: Blue

[Qemu-devel] [PATCH 0/5] portability patches

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com I entertained myself by compiling QEMU with -std=c99 -pedantic and fixing some issues found with that. Blue Swirl (5): Avoid GCC extension ?: Avoid returning void Use __asm__ instead of asm or __asm Avoid unportable %m format Avoid redefining

[Qemu-devel] [PATCH 2/5] Avoid returning void

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com It's silly and non-conforming to standards to return void, don't do it. Signed-off-by: Blue Swirl blauwir...@gmail.com --- block.c|2 +- dma.h |6 +++--- hw/bt-l2cap.c | 11 +++ hw/eepro100.c

[Qemu-devel] [PATCH 3/5] Use __asm__ instead of asm or __asm

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Replace asm and __asm with __asm__. Signed-off-by: Blue Swirl blauwir...@gmail.com --- bswap.h | 40 cache-utils.h | 10 +- exec-all.h|6 +++--- qemu-barrier.h

[Qemu-devel] [PATCH 5/5] Avoid redefining inline

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com System headers (e.g. gutils.h) may define 'inline', #undefine it before #defining. Signed-off-by: Blue Swirl blauwir...@gmail.com --- osdep.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/osdep.h b/osdep.h index 3ea4af0..1e15a4b

[Qemu-devel] [PATCH 1/5] Avoid GCC extension ?:

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Replace expr1 ?: expr2 with expr1 ? expr1 : expr2 as KR intended. If expr1 has side effects, introduce a temporary variable. Signed-off-by: Blue Swirl blauwir...@gmail.com --- block.c |6 -- block/qcow2.c|6 --

[Qemu-devel] [PATCH 4/5] Avoid unportable %m format

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Replace %m format with explicit call to standard strerror(). Signed-off-by: Blue Swirl blauwir...@gmail.com --- kvm-all.c |3 ++- main-loop.c |2 +- net/tap-linux.c |8 +--- qemu-nbd.c |3 +-- 4 files changed, 9

[Qemu-devel] [PATCH] bitops: fix types

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Use 'unsigned int' for bit numbers. Return 'bool' for test functions. QEMU is not the kernel, we don't need 'volatile'. Adjust asserts. Signed-off-by: Blue Swirl blauwir...@gmail.com --- bitops.h | 47 --- 1

[Qemu-devel] [PATCH v2 0/5] portability patches

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com I entertained myself by compiling QEMU with -std=c99 -pedantic and fixing some issues found with that. v1-v2: Fix copypasta in 1/5 (Anders Schwab) Resent with correct address Blue Swirl (5): Avoid GCC extension ?: Avoid returning void Use __asm__

[Qemu-devel] [PATCH v2 5/5] Avoid redefining inline

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com System headers (e.g. gutils.h) may define 'inline', #undefine it before #defining. Signed-off-by: Blue Swirl blauwir...@gmail.com --- osdep.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/osdep.h b/osdep.h index 3ea4af0..1e15a4b

[Qemu-devel] [PATCH v2 2/5] Avoid returning void

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com It's silly and non-conforming to standards to return void, don't do it. Signed-off-by: Blue Swirl blauwir...@gmail.com --- block.c|2 +- dma.h |6 +++--- hw/bt-l2cap.c | 11 +++ hw/eepro100.c

[Qemu-devel] [PATCH v2 3/5] Use __asm__ instead of asm or __asm

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Replace asm and __asm with __asm__. Signed-off-by: Blue Swirl blauwir...@gmail.com --- bswap.h | 40 cache-utils.h | 10 +- exec-all.h|6 +++--- qemu-barrier.h

[Qemu-devel] [PATCH v2 1/5] Avoid GCC extension ?:

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Replace expr1 ?: expr2 with expr1 ? expr1 : expr2 as KR intended. If expr1 has side effects, introduce a temporary variable. Signed-off-by: Blue Swirl blauwir...@gmail.com --- block.c |6 -- block/qcow2.c|6 --

[Qemu-devel] [PATCH v2 4/5] Avoid unportable %m format

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Replace %m format with explicit call to standard strerror(). Signed-off-by: Blue Swirl blauwir...@gmail.com --- kvm-all.c |3 ++- main-loop.c |2 +- net/tap-linux.c |8 +--- qemu-nbd.c |3 +-- 4 files changed, 9

[Qemu-devel] [PATCH v2 0/3] bitops patches

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Improve bit operations. v1-v2 Split from single patch. Blue Swirl (3): bitops: fix types bitops: drop volatile qualifier bitops: use bool bitops.h | 42 ++ 1 files changed, 22 insertions(+), 20 deletions(-)

[Qemu-devel] [PATCH v2 2/3] bitops: drop volatile qualifier

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Qualifier 'volatile' is not useful for applications, it's too strict for single threaded code but does not give the real atomicity guarantees needed for multithreaded code. Drop them. Signed-off-by: Blue Swirl blauwir...@gmail.com --- bitops.h | 18

[Qemu-devel] [PATCH v2 3/3] bitops: use bool

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Use 'bool' type for return value of bit test functions. Signed-off-by: Blue Swirl blauwir...@gmail.com --- bitops.h |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bitops.h b/bitops.h index bc99727..1cecf00 100644 ---

[Qemu-devel] [PATCH v2 1/3] bitops: fix types

2012-07-08 Thread blauwirbel
From: Blue Swirl blauwir...@gmail.com Use 'unsigned int' for bit numbers instead of 'unsigned long' or 'int'. Adjust asserts. Signed-off-by: Blue Swirl blauwir...@gmail.com --- bitops.h | 46 ++ 1 files changed, 26 insertions(+), 20 deletions(-)