From 6333555947ca329e7f1e62c287f7e5586d4b1d5f Mon Sep 17 00:00:00 2001 From: Bob Supnik Date: Mon, 13 Mar 2017 10:37:39 -0700 Subject: [PATCH] VAX: Annotated intentional fall throughs in switch statements (COVERITY) --- VAX/vax_cpu1.c | 4 +++- VAX/vax_sys.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/VAX/vax_cpu1.c b/VAX/vax_cpu1.c index ee4ae6ba..c7c0372b 100644 --- a/VAX/vax_cpu1.c +++ b/VAX/vax_cpu1.c @@ -1,6 +1,6 @@ /* 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 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 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 21-Jun-16 RMS Removed reserved check on SIRR (Mark Pizzolato) 18-Feb-16 RMS Changed variables in MxPR to unsigned @@ -1522,6 +1523,7 @@ switch (prn) { /* case on reg # */ case MT_MAPEN: /* MAPEN */ mapen = val & 1; + /* fall through */ case MT_TBIA: /* TBIA */ zap_tb (1); /* clr entire TLB */ break; diff --git a/VAX/vax_sys.c b/VAX/vax_sys.c index 29bae87f..231108d6 100644 --- a/VAX/vax_sys.c +++ b/VAX/vax_sys.c @@ -1,6 +1,6 @@ /* 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 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 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 19-Nov-08 RMS Moved bad block routine to I/O library 03-Nov-05 RMS Added 780 stop codes @@ -107,7 +108,7 @@ const char *sim_stop_messages[] = { The first entry contains: - 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> - ONLY for simulator instruction history bits 11:8 reflect where results are recorded from @@ -876,7 +877,8 @@ for (i = 0; i < numspec; i++) { /* loop thru spec */ break; case BDD: /* @b^d(r),@b^n */ - fputc ('@', of); + fputc ('@', of); + /* fall through */ case BDP: /* b^d(r), b^n */ GETNUM (num, 1); if (rn == nPC) @@ -888,6 +890,7 @@ for (i = 0; i < numspec; i++) { /* loop thru spec */ case WDD: /* @w^d(r),@w^n */ fputc ('@', of); + /* fall through */ case WDP: /* w^d(r), w^n */ GETNUM (num, 2); if (rn == nPC) @@ -898,7 +901,8 @@ for (i = 0; i < numspec; i++) { /* loop thru spec */ break; case LDD: /* @l^d(r),@l^n */ - fputc ('@', of); + fputc ('@', of); + /* fall through */ case LDP: /* l^d(r),l^n */ GETNUM (num, 4); if (rn == nPC)