aboutsummaryrefslogtreecommitdiff
path: root/target/i386/tcg/seg_helper.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-07-23 16:42:07 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-07-29 16:58:58 +0100
commit7d01623a1b0d282430a1e99fbe62068e27a4b4c4 (patch)
treef0db23ca7ae137990db91d1490e13065d6257e20 /target/i386/tcg/seg_helper.c
parentb42ba4ea4322357fcbfcb0e6e613d79ede84de64 (diff)
downloadqemu-7d01623a1b0d282430a1e99fbe62068e27a4b4c4.zip
qemu-7d01623a1b0d282430a1e99fbe62068e27a4b4c4.tar.gz
qemu-7d01623a1b0d282430a1e99fbe62068e27a4b4c4.tar.bz2
target/m68k: avoid shift into sign bit in dump_address_map()
Coverity complains (CID 1547592) that in dump_address_map() we take a value stored in a signed integer variable 'i' and shift it by enough to shift into the sign bit when we construct the value 'logical'. This isn't a bug for QEMU because we use -fwrapv semantics, but we can make Coverity happy by using an unsigned type for the loop variables i, j, k in this function. While we're changing the declaration of the variables, put them in the for() loops so their scope is the minimum required (a style now permitted by our coding style guide). Resolves: Coverity CID 1547592 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240723154207.1483665-1-peter.maydell@linaro.org
Diffstat (limited to 'target/i386/tcg/seg_helper.c')
0 files changed, 0 insertions, 0 deletions