[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.5 3/7] tpm: avoid clang shifting negative signe
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL for-2.5 3/7] tpm: avoid clang shifting negative signed warning |
Date: |
Tue, 17 Nov 2015 19:17:24 +0800 |
clang 3.7.0 on x86_64 warns about the following:
hw/tpm/tpm_tis.c:1000:36: warning: shifting a negative signed value is
undefined [-Wshift-negative-value]
tis->loc[c].iface_id = TPM_TIS_IFACE_ID_SUPPORTED_FLAGS1_3;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/tpm/tpm_tis.c:144:10: note: expanded from macro
'TPM_TIS_IFACE_ID_SUPPORTED_FLAGS1_3'
(~0 << 4)/* all of it is don't care */)
~~ ^
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 0806b5f..ff073d5 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -141,7 +141,7 @@
#define TPM_TIS_IFACE_ID_SUPPORTED_FLAGS1_3 \
(TPM_TIS_IFACE_ID_INTERFACE_TIS1_3 | \
- (~0 << 4)/* all of it is don't care */)
+ (~0u << 4)/* all of it is don't care */)
/* if backend was a TPM 2.0: */
#define TPM_TIS_IFACE_ID_SUPPORTED_FLAGS2_0 \
--
2.5.0
- [Qemu-devel] [PULL for-2.5 0/7] Block patches, Stefan Hajnoczi, 2015/11/17
- [Qemu-devel] [PULL for-2.5 1/7] docs: update bitmaps.md, Stefan Hajnoczi, 2015/11/17
- [Qemu-devel] [PULL for-2.5 2/7] tests: Ignore recent test binaries, Stefan Hajnoczi, 2015/11/17
- [Qemu-devel] [PULL for-2.5 3/7] tpm: avoid clang shifting negative signed warning,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL for-2.5 4/7] disas/arm: avoid clang shifting negative signed warning, Stefan Hajnoczi, 2015/11/17
- [Qemu-devel] [PULL for-2.5 5/7] aio-epoll: Fix use-after-free of node, Stefan Hajnoczi, 2015/11/17
- [Qemu-devel] [PULL for-2.5 6/7] block: make 'stats-interval' an array of ints instead of a string, Stefan Hajnoczi, 2015/11/17
- [Qemu-devel] [PULL for-2.5 7/7] virtio-blk: Fix double completion for werror=stop, Stefan Hajnoczi, 2015/11/17
- Re: [Qemu-devel] [PULL for-2.5 0/7] Block patches, Peter Maydell, 2015/11/17