Re: [Qemu-devel] [PATCH 0/3] fix clang negative signed bit shift warning
On Tue, Nov 10, 2015 at 03:57:32PM +, Stefan Hajnoczi wrote: > LLVM's clang 3.7.0 compile warns about bit shifting negative numbers because > the result is undefined. This series includes 3 small fixes to appease clang. > > Stefan Hajnoczi (3): > monitor: avoid clang shifting negative signed warning > tpm: avoid clang shifting negative signed warning > disas/arm: avoid clang shifting negative signed warning > > disas/arm.c | 2 +- > hw/tpm/tpm_tis.c | 2 +- > target-i386/monitor.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > -- > 2.5.0 > Thanks, applied Patches 2 & 3 to my block tree: https://github.com/stefanha/qemu/commits/block Stefan signature.asc Description: PGP signature
Re: [Qemu-devel] [PATCH 0/3] fix clang negative signed bit shift warning
On Mon, Nov 16, 2015 at 03:20:12PM +, Peter Maydell wrote: > On 16 November 2015 at 14:23, Peter Maydell wrote: > > My clang-3.7 build (it's part of fbinfer) also complains about: > > > > /Users/pm215/src/qemu/hw/audio/fmopl.c:1085:39: warning: shifting a > > negative signed value is undefined [-Wshift-negative-value] > > data = Limit( outd[0] , OPL_MAXOUT, OPL_MINOUT ); > > ^~ > > /Users/pm215/src/qemu/hw/audio/fmopl.c:75:28: note: expanded from > > macro 'OPL_MINOUT' > > #define OPL_MINOUT (-0x8000< > ~~~^ > > I sent a patch for that one. The MIPS stuff I'll leave for somebody > else at least for now... Thanks. I don't plan to investigate the audio one soon. Stefan signature.asc Description: PGP signature
Re: [Qemu-devel] [PATCH 0/3] fix clang negative signed bit shift warning
On 16 November 2015 at 14:23, Peter Maydell wrote: > My clang-3.7 build (it's part of fbinfer) also complains about: > > /Users/pm215/src/qemu/hw/audio/fmopl.c:1085:39: warning: shifting a > negative signed value is undefined [-Wshift-negative-value] > data = Limit( outd[0] , OPL_MAXOUT, OPL_MINOUT ); > ^~ > /Users/pm215/src/qemu/hw/audio/fmopl.c:75:28: note: expanded from > macro 'OPL_MINOUT' > #define OPL_MINOUT (-0x8000< ~~~^ I sent a patch for that one. The MIPS stuff I'll leave for somebody else at least for now... thanks -- PMM
Re: [Qemu-devel] [PATCH 0/3] fix clang negative signed bit shift warning
On 10 November 2015 at 15:57, Stefan Hajnoczi wrote: > LLVM's clang 3.7.0 compile warns about bit shifting negative numbers because > the result is undefined. This series includes 3 small fixes to appease clang. > > Stefan Hajnoczi (3): > monitor: avoid clang shifting negative signed warning > tpm: avoid clang shifting negative signed warning > disas/arm: avoid clang shifting negative signed warning > > disas/arm.c | 2 +- > hw/tpm/tpm_tis.c | 2 +- > target-i386/monitor.c | 2 +- My clang-3.7 build (it's part of fbinfer) also complains about: /Users/pm215/src/qemu/hw/audio/fmopl.c:1085:39: warning: shifting a negative signed value is undefined [-Wshift-negative-value] data = Limit( outd[0] , OPL_MAXOUT, OPL_MINOUT ); ^~ /Users/pm215/src/qemu/hw/audio/fmopl.c:75:28: note: expanded from macro 'OPL_MINOUT' #define OPL_MINOUT (-0x8000<
Re: [Qemu-devel] [PATCH 0/3] fix clang negative signed bit shift warning
On 10 November 2015 at 15:57, Stefan Hajnoczi wrote: > LLVM's clang 3.7.0 compile warns about bit shifting negative numbers because > the result is undefined. This series includes 3 small fixes to appease clang. > > Stefan Hajnoczi (3): > monitor: avoid clang shifting negative signed warning > tpm: avoid clang shifting negative signed warning > disas/arm: avoid clang shifting negative signed warning > > disas/arm.c | 2 +- > hw/tpm/tpm_tis.c | 2 +- > target-i386/monitor.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) Whole series Reviewed-by: Peter Maydell thanks -- PMM
[Qemu-devel] [PATCH 0/3] fix clang negative signed bit shift warning
LLVM's clang 3.7.0 compile warns about bit shifting negative numbers because the result is undefined. This series includes 3 small fixes to appease clang. Stefan Hajnoczi (3): monitor: avoid clang shifting negative signed warning tpm: avoid clang shifting negative signed warning disas/arm: avoid clang shifting negative signed warning disas/arm.c | 2 +- hw/tpm/tpm_tis.c | 2 +- target-i386/monitor.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 2.5.0