diff options
| author | Stefan Hajnoczi | 2015-11-10 16:57:34 +0100 |
|---|---|---|
| committer | Stefan Hajnoczi | 2015-11-17 11:35:56 +0100 |
| commit | 886ce6f8b6ede74eb04314ef62d15bcdf5df7ef1 (patch) | |
| tree | 4a8316d03c6ff485cb4f21b505057ff1e44c2b0b | |
| parent | tests: Ignore recent test binaries (diff) | |
| download | qemu-886ce6f8b6ede74eb04314ef62d15bcdf5df7ef1.tar.gz qemu-886ce6f8b6ede74eb04314ef62d15bcdf5df7ef1.tar.xz qemu-886ce6f8b6ede74eb04314ef62d15bcdf5df7ef1.zip | |
tpm: avoid clang shifting negative signed warning
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 <stefanha@redhat.com>
| -rw-r--r-- | hw/tpm/tpm_tis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 0806b5f82e..ff073d501a 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 \ |
