VAX: Annotated intentional fall throughs in switch statements (COVERITY)

This commit is contained in:
Bob Supnik 2017-03-13 10:37:39 -07:00 committed by Mark Pizzolato
parent 4da04e06ce
commit 6333555947
2 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,6 @@
/* vax_cpu1.c: VAX complex instructions /* vax_cpu1.c: VAX complex instructions
Copyright (c) 1998-2016, Robert M Supnik Copyright (c) 1998-2017, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -23,6 +23,7 @@
used in advertising or otherwise to promote the sale, use or other dealings used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik. in this Software without prior written authorization from Robert M Supnik.
13-Mar-17 RMS Annotated fall through in switch
14-Jul-16 RMS Corrected REI rule 9 14-Jul-16 RMS Corrected REI rule 9
21-Jun-16 RMS Removed reserved check on SIRR (Mark Pizzolato) 21-Jun-16 RMS Removed reserved check on SIRR (Mark Pizzolato)
18-Feb-16 RMS Changed variables in MxPR to unsigned 18-Feb-16 RMS Changed variables in MxPR to unsigned
@ -1522,6 +1523,7 @@ switch (prn) { /* case on reg # */
case MT_MAPEN: /* MAPEN */ case MT_MAPEN: /* MAPEN */
mapen = val & 1; mapen = val & 1;
/* fall through */
case MT_TBIA: /* TBIA */ case MT_TBIA: /* TBIA */
zap_tb (1); /* clr entire TLB */ zap_tb (1); /* clr entire TLB */
break; break;

View file

@ -1,6 +1,6 @@
/* vax_sys.c: VAX simulator interface /* vax_sys.c: VAX simulator interface
Copyright (c) 1998-2011, Robert M Supnik Copyright (c) 1998-2017, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"), copy of this software and associated documentation files (the "Software"),
@ -23,6 +23,7 @@
used in advertising or otherwise to promote the sale, use or other dealings used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Robert M Supnik. in this Software without prior written authorization from Robert M Supnik.
13-Mar-17 RMS Annotated intentional fall throughs in switch
21-Mar-11 RMS Modified string for STOP_BOOT message 21-Mar-11 RMS Modified string for STOP_BOOT message
19-Nov-08 RMS Moved bad block routine to I/O library 19-Nov-08 RMS Moved bad block routine to I/O library
03-Nov-05 RMS Added 780 stop codes 03-Nov-05 RMS Added 780 stop codes
@ -107,7 +108,7 @@ const char *sim_stop_messages[] = {
The first entry contains: The first entry contains:
- FPD legal flag (DR_F) - FPD legal flag (DR_F)
- number of specifiers for decode bits 2:0> - number of specifiers for decode bits <2:0>
- number of specifiers for unimplemented instructions bits<6:4> - number of specifiers for unimplemented instructions bits<6:4>
- ONLY for simulator instruction history bits 11:8 reflect where - ONLY for simulator instruction history bits 11:8 reflect where
results are recorded from results are recorded from
@ -876,7 +877,8 @@ for (i = 0; i < numspec; i++) { /* loop thru spec */
break; break;
case BDD: /* @b^d(r),@b^n */ case BDD: /* @b^d(r),@b^n */
fputc ('@', of); fputc ('@', of);
/* fall through */
case BDP: /* b^d(r), b^n */ case BDP: /* b^d(r), b^n */
GETNUM (num, 1); GETNUM (num, 1);
if (rn == nPC) if (rn == nPC)
@ -888,6 +890,7 @@ for (i = 0; i < numspec; i++) { /* loop thru spec */
case WDD: /* @w^d(r),@w^n */ case WDD: /* @w^d(r),@w^n */
fputc ('@', of); fputc ('@', of);
/* fall through */
case WDP: /* w^d(r), w^n */ case WDP: /* w^d(r), w^n */
GETNUM (num, 2); GETNUM (num, 2);
if (rn == nPC) if (rn == nPC)
@ -898,7 +901,8 @@ for (i = 0; i < numspec; i++) { /* loop thru spec */
break; break;
case LDD: /* @l^d(r),@l^n */ case LDD: /* @l^d(r),@l^n */
fputc ('@', of); fputc ('@', of);
/* fall through */
case LDP: /* l^d(r),l^n */ case LDP: /* l^d(r),l^n */
GETNUM (num, 4); GETNUM (num, 4);
if (rn == nPC) if (rn == nPC)