On 10 November 2015 at 15:57, Stefan Hajnoczi <[email protected]> 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<<OPL_OUTSB)
~~~~~~~^
and a lot of shift-of-negative uses in target-mips code.
Did you also have patches planned for those or are these three
the only ones you have in progress?
thanks
-- PMM