]> git.proxmox.com Git - qemu.git/commit
sd/pl181.c: Avoid undefined shift behaviour in RWORD macro
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 27 Jun 2013 14:03:51 +0000 (15:03 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 15 Jul 2013 15:17:30 +0000 (16:17 +0100)
commit8827b0fb66cab9f7978c4e66dad4cf3c0989a72e
tree12dd2050248886384769cc99dc27222437b2bb3a
parent528622421eb1be95eaadfe91e8e11729d1e46431
sd/pl181.c: Avoid undefined shift behaviour in RWORD macro

Add a cast to avoid potentially shifting into the sign bit of
a signed value, which is undefined behaviour in C.

(Detected with clang's -fsanitize=undefined.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1372341831-4264-1-git-send-email-peter.maydell@linaro.org
hw/sd/pl181.c