diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-04-04 08:49:06 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-04-04 08:49:06 +0200 |
commit | 0798da8df9fd917515c957ae918d6d979cf5f3fb (patch) | |
tree | d1b7b85ec58e7b624a28f23303afd1c129907fa9 /linux-user/ppc | |
parent | 7e5157696b97a5431ef8786e01bffe989c05493b (diff) | |
download | qemu-0798da8df9fd917515c957ae918d6d979cf5f3fb.zip qemu-0798da8df9fd917515c957ae918d6d979cf5f3fb.tar.gz qemu-0798da8df9fd917515c957ae918d6d979cf5f3fb.tar.bz2 |
linux-user/ppc: Narrow type of ccr in save_user_regs
Coverity warns that we shift a 32-bit value by N, and then
accumulate it into a 64-bit type (target_ulong on ppc64).
The ccr is always 8 * 4-bit fields, and thus is always a
32-bit quantity; narrow the type to avoid the warning.
Fixes: Coverity CID 1487223
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220401191643.330393-1-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'linux-user/ppc')
-rw-r--r-- | linux-user/ppc/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index ec0b9c0..ce5a468 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -229,7 +229,7 @@ static void save_user_regs(CPUPPCState *env, struct target_mcontext *frame) { target_ulong msr = env->msr; int i; - target_ulong ccr = 0; + uint32_t ccr = 0; /* In general, the kernel attempts to be intelligent about what it needs to save for Altivec/FP/SPE registers. We don't care that |