From 2edf3d9ded3be1d24e6adecd2d55311055170bbb Mon Sep 17 00:00:00 2001 From: Bob Supnik Date: Mon, 13 Mar 2017 10:17:23 -0700 Subject: [PATCH] VAX: Annotated intentional fall throughs in switch statements (COVERITY) --- VAX/vax_cpu1.c | 4 +++- VAX/vax_sys.c | 11 ++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/VAX/vax_cpu1.c b/VAX/vax_cpu1.c index ef6f710b..6b6f0251 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 @@ -1542,6 +1543,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 a7fffc58..d6bf92c1 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 @@ -109,7 +110,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> */ @@ -875,7 +876,7 @@ 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) @@ -886,7 +887,7 @@ for (i = 0; i < numspec; i++) { /* loop thru spec */ break; case WDD: /* @w^d(r),@w^n */ - fputc ('@', of); + fputc ('@', of); /* fall through */ case WDP: /* w^d(r), w^n */ GETNUM (num, 2); if (rn == nPC) @@ -897,7 +898,7 @@ 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)