From 17903827bdb294f7e60d4c7f172bd6a1a71dfbd5 Mon Sep 17 00:00:00 2001 From: Peter Schorn Date: Sat, 1 Apr 2017 08:48:43 +0200 Subject: [PATCH] AltairZ80: Mark Coverity false positives in rotate operations --- AltairZ80/i86_prim_ops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AltairZ80/i86_prim_ops.c b/AltairZ80/i86_prim_ops.c index 4c3707ce..b45cf376 100644 --- a/AltairZ80/i86_prim_ops.c +++ b/AltairZ80/i86_prim_ops.c @@ -733,6 +733,7 @@ uint8 rcr_byte(PC_ENV *m, uint8 d, uint8 s) in case the object came in and was treated as a negative number. Needed???*/ mask = (1<<(8-cnt))-1; + /* coverity[BAD_SHIFT] */ res = (d >> cnt) & mask; /* now the high stuff which rotated around into the positions B_cnt-2 .. B_0 */ @@ -804,6 +805,7 @@ uint16 rcr_word(PC_ENV *m, uint16 d, uint16 s) in case the object came in and was treated as a negative number. Needed???*/ mask = (1<<(16-cnt))-1; + /* coverity[BAD_SHIFT] */ res = (d >> cnt) & mask; /* now the high stuff which rotated around into the positions B_cnt-2 .. B_0 */