GRI, H316, I7094, NOVA, SDS, sigma: Annotate switch case fall through (COVERITY)
This commit is contained in:
parent
6333555947
commit
fa62a00fd0
8 changed files with 34 additions and 15 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* gri_sys.c: GRI-909 simulator interface
|
/* gri_sys.c: GRI-909 simulator interface
|
||||||
|
|
||||||
Copyright (c) 2001-2015, Robert M Supnik
|
Copyright (c) 2001-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-Jan-08 RMS Added GRI-99 support
|
14-Jan-08 RMS Added GRI-99 support
|
||||||
18-Oct-02 RMS Fixed bug in symbolic decode (Hans Pufal)
|
18-Oct-02 RMS Fixed bug in symbolic decode (Hans Pufal)
|
||||||
*/
|
*/
|
||||||
|
@ -615,7 +616,7 @@ switch (j) { /* case on class */
|
||||||
cptr = get_sd (cptr, val, ',', TRUE); /* src */
|
cptr = get_sd (cptr, val, ',', TRUE); /* src */
|
||||||
if (!cptr)
|
if (!cptr)
|
||||||
return SCPE_ARG;
|
return SCPE_ARG;
|
||||||
|
/* fall through */
|
||||||
case F_V_SFI: /* skip func impl */
|
case F_V_SFI: /* skip func impl */
|
||||||
cptr = get_fnc (cptr, val); /* fo # */
|
cptr = get_fnc (cptr, val); /* fo # */
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* h316_dp.c: Honeywell 4623, 4651, 4720 disk simulator
|
/* h316_dp.c: Honeywell 4623, 4651, 4720 disk simulator
|
||||||
|
|
||||||
Copyright (c) 2003-2015, Robert M. Supnik
|
Copyright (c) 2003-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"),
|
||||||
|
@ -27,6 +27,7 @@
|
||||||
4651 disk subsystem
|
4651 disk subsystem
|
||||||
4720 disk subsystem
|
4720 disk subsystem
|
||||||
|
|
||||||
|
13-Mar-17 RMS Annotated intentional fall through in switch
|
||||||
03-Jul-13 RLA compatibility changes for extended interrupts
|
03-Jul-13 RLA compatibility changes for extended interrupts
|
||||||
19-Mar-12 RMS Fixed declaration of chan_req (Mark Pizzolato)
|
19-Mar-12 RMS Fixed declaration of chan_req (Mark Pizzolato)
|
||||||
04-Sep-05 RMS Fixed missing return (Peter Schorn)
|
04-Sep-05 RMS Fixed missing return (Peter Schorn)
|
||||||
|
@ -109,7 +110,7 @@
|
||||||
#define STA_ANYER 0000002 /* any error^ */
|
#define STA_ANYER 0000002 /* any error^ */
|
||||||
#define STA_EOR 0000001 /* end of record */
|
#define STA_EOR 0000001 /* end of record */
|
||||||
#define STA_ALLERR (STA_ADRER|STA_FMTER|STA_HNLER|STA_OFLER|STA_SEKER|\
|
#define STA_ALLERR (STA_ADRER|STA_FMTER|STA_HNLER|STA_OFLER|STA_SEKER|\
|
||||||
STA_WPRER|STA_UNSER|STA_DTRER)
|
STA_WPRER|STA_UNSER|STA_DTRER)
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
|
|
||||||
|
@ -471,7 +472,8 @@ switch (inst) { /* case on opcode */
|
||||||
|
|
||||||
case 011: case 012: case 013: /* !not seeking 0-6 */
|
case 011: case 012: case 013: /* !not seeking 0-6 */
|
||||||
case 014: case 015: case 016: case 017:
|
case 014: case 015: case 016: case 017:
|
||||||
u = fnc - 011;
|
u = fnc - 011; /* set u */
|
||||||
|
/* fall through */
|
||||||
case 007: /* !not seeking 7 */
|
case 007: /* !not seeking 7 */
|
||||||
if (!sim_is_active (&dp_unit[u]) || /* quiescent? */
|
if (!sim_is_active (&dp_unit[u]) || /* quiescent? */
|
||||||
(dp_unit[u].FNC != (FNC_SEEK | FNC_2ND)))
|
(dp_unit[u].FNC != (FNC_SEEK | FNC_2ND)))
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
Except as contained in this notice, the name of the author shall not be
|
Except as contained in this notice, the name of the author shall not be
|
||||||
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 the author.
|
in this Software without prior written authorization from the author.
|
||||||
|
|
||||||
|
13-Mar-17 RMS Annotated fall through in switch
|
||||||
*/
|
*/
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*
|
*
|
||||||
|
@ -165,7 +167,7 @@ binloader (FILE *fd, const char *file, int loadpt)
|
||||||
|
|
||||||
case RELADDR_TAG:
|
case RELADDR_TAG:
|
||||||
ldata = ldata + loadaddr;
|
ldata = ldata + loadaddr;
|
||||||
|
/* fall through */
|
||||||
case ABSDATA_TAG:
|
case ABSDATA_TAG:
|
||||||
STORE:
|
STORE:
|
||||||
#ifdef DEBUGLOADER
|
#ifdef DEBUGLOADER
|
||||||
|
@ -177,6 +179,7 @@ binloader (FILE *fd, const char *file, int loadpt)
|
||||||
|
|
||||||
case ABSXFER_TAG:
|
case ABSXFER_TAG:
|
||||||
transfer = TRUE;
|
transfer = TRUE;
|
||||||
|
/* fall through */
|
||||||
case ABSENTRY_TAG:
|
case ABSENTRY_TAG:
|
||||||
PC = (uint32) ldata & AMASK;
|
PC = (uint32) ldata & AMASK;
|
||||||
#ifdef DEBUGLOADER
|
#ifdef DEBUGLOADER
|
||||||
|
@ -188,6 +191,7 @@ binloader (FILE *fd, const char *file, int loadpt)
|
||||||
|
|
||||||
case RELXFER_TAG:
|
case RELXFER_TAG:
|
||||||
transfer = TRUE;
|
transfer = TRUE;
|
||||||
|
/* fall through */
|
||||||
case RELENTRY_TAG:
|
case RELENTRY_TAG:
|
||||||
ldata = (ldata + loadaddr) & AMASK;
|
ldata = (ldata + loadaddr) & AMASK;
|
||||||
PC = (uint32) ldata & AMASK;
|
PC = (uint32) ldata & AMASK;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* i7094_cd.c: IBM 711/721 card reader/punch
|
/* i7094_cd.c: IBM 711/721 card reader/punch
|
||||||
|
|
||||||
Copyright (c) 2003-2012, Robert M. Supnik
|
Copyright (c) 2003-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"),
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
cdr 711 card reader
|
cdr 711 card reader
|
||||||
cdp 721 card punch
|
cdp 721 card punch
|
||||||
|
|
||||||
|
13-Mar-17 RMS Annotated fall through in switch
|
||||||
19-Mar-12 RMS Fixed declaration of sim_switches (Mark Pizzolato)
|
19-Mar-12 RMS Fixed declaration of sim_switches (Mark Pizzolato)
|
||||||
19-Jan-07 RMS Added UNIT_TEXT
|
19-Jan-07 RMS Added UNIT_TEXT
|
||||||
13-Jul-06 RMS Fixed problem with 80 column full cards
|
13-Jul-06 RMS Fixed problem with 80 column full cards
|
||||||
|
@ -238,7 +239,7 @@ switch (cdr_sta) { /* case on state */
|
||||||
cdr_bbuf[bufw] |= dat;
|
cdr_bbuf[bufw] |= dat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* fall through */
|
||||||
case CDS_DATA: /* data state */
|
case CDS_DATA: /* data state */
|
||||||
dat = cdr_bbuf[cdr_bptr++]; /* get next word */
|
dat = cdr_bbuf[cdr_bptr++]; /* get next word */
|
||||||
if (cdr_bptr >= CD_BINLNT) { /* last word? */
|
if (cdr_bptr >= CD_BINLNT) { /* last word? */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* nova_mta.c: NOVA magnetic tape simulator
|
/* nova_mta.c: NOVA magnetic tape simulator
|
||||||
|
|
||||||
Copyright (c) 1993-2008, Robert M. Supnik
|
Copyright (c) 1993-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"),
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
mta magnetic tape
|
mta magnetic tape
|
||||||
|
|
||||||
|
13-Mar-17 RMS Annotated fall through in switch
|
||||||
04-Jul-07 BKR fixed boot code to properly boot self-boot tapes;
|
04-Jul-07 BKR fixed boot code to properly boot self-boot tapes;
|
||||||
boot routine now uses standard DG APL boot code;
|
boot routine now uses standard DG APL boot code;
|
||||||
device name changed to DG's MTA from DEC's MT.
|
device name changed to DG's MTA from DEC's MT.
|
||||||
|
@ -510,8 +511,10 @@ switch (st) {
|
||||||
|
|
||||||
case MTSE_FMT: /* illegal fmt */
|
case MTSE_FMT: /* illegal fmt */
|
||||||
mta_upddsta (uptr, uptr->USTAT | STA_WLK | STA_RDY);
|
mta_upddsta (uptr, uptr->USTAT | STA_WLK | STA_RDY);
|
||||||
|
/* fall through */
|
||||||
case MTSE_UNATT: /* unattached */
|
case MTSE_UNATT: /* unattached */
|
||||||
mta_sta = mta_sta | STA_ILL;
|
mta_sta = mta_sta | STA_ILL;
|
||||||
|
/* fall through */
|
||||||
case MTSE_OK: /* no error */
|
case MTSE_OK: /* no error */
|
||||||
return SCPE_IERR; /* never get here! */
|
return SCPE_IERR; /* never get here! */
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* sds_drm.c: SDS 940 Project Genie drum simulator
|
/* sds_drm.c: SDS 940 Project Genie drum simulator
|
||||||
|
|
||||||
Copyright (c) 2002-2013, Robert M. Supnik
|
Copyright (c) 2002-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"),
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
drm drum
|
drm drum
|
||||||
|
|
||||||
|
13-Mar-17 RMS Annotated fall through in switch
|
||||||
03-Sep-13 RMS Added explicit void * cast
|
03-Sep-13 RMS Added explicit void * cast
|
||||||
|
|
||||||
The drum is buffered in memory.
|
The drum is buffered in memory.
|
||||||
|
@ -236,7 +237,7 @@ if (drm_sta != DRM_SXFR) { /* fetch drum prog? */
|
||||||
case DRM_EIE: /* end, int if err */
|
case DRM_EIE: /* end, int if err */
|
||||||
if (!drm_err)
|
if (!drm_err)
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
|
/* fall through */
|
||||||
case DRM_EIU: /* end, int uncond */
|
case DRM_EIU: /* end, int uncond */
|
||||||
int_req = int_req | INT_DRM;
|
int_req = int_req | INT_DRM;
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* sigma_map.c: XDS Sigma memory access routines
|
/* sigma_map.c: XDS Sigma memory access routines
|
||||||
|
|
||||||
Copyright (c) 2007, Robert M Supnik
|
Copyright (c) 2007-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"),
|
||||||
|
@ -22,6 +22,8 @@
|
||||||
Except as contained in this notice, the name of Robert M Supnik shall not be
|
Except as contained in this notice, the name of Robert M Supnik shall not be
|
||||||
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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sigma_defs.h"
|
#include "sigma_defs.h"
|
||||||
|
@ -528,6 +530,7 @@ if (QCPU_S89)
|
||||||
break;
|
break;
|
||||||
case 0xB: /* read sr0, clr */
|
case 0xB: /* read sr0, clr */
|
||||||
mem_sr0[memu] = mem_sr1[memu] = 0;
|
mem_sr0[memu] = mem_sr1[memu] = 0;
|
||||||
|
/* fall through */
|
||||||
case 0x8: /* read sr0 */
|
case 0x8: /* read sr0 */
|
||||||
R[rn] = (wd & S89_SR0_RD) |
|
R[rn] = (wd & S89_SR0_RD) |
|
||||||
(((1u << (chan_num + 1)) - 1) << (S89_SR0_V_PORTS - (chan_num + 1)));
|
(((1u << (chan_num + 1)) - 1) << (S89_SR0_V_PORTS - (chan_num + 1)));
|
||||||
|
@ -556,7 +559,8 @@ else switch (CC) { /* 5X0 */
|
||||||
mmc_wlk[ppag | 1] = R[rn] & 0xF;
|
mmc_wlk[ppag | 1] = R[rn] & 0xF;
|
||||||
break;
|
break;
|
||||||
case 0xC: /* read sr0, clr */
|
case 0xC: /* read sr0, clr */
|
||||||
mem_sr0[memu] = 0;
|
mem_sr0[memu] = 0; /* clr */
|
||||||
|
/* fall through */
|
||||||
case 0x8: /* read sr0 */
|
case 0x8: /* read sr0 */
|
||||||
R[rn] = S5X0_SR0_FIXED | (wd & S5X0_SR0_RD) |
|
R[rn] = S5X0_SR0_FIXED | (wd & S5X0_SR0_RD) |
|
||||||
(((1u << (chan_num + 1)) - 1) << (S5X0_SR0_V_PORTS - (chan_num + 1)));
|
(((1u << (chan_num + 1)) - 1) << (S5X0_SR0_V_PORTS - (chan_num + 1)));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* sigma_mt.c: Sigma 732X 9-track magnetic tape
|
/* sigma_mt.c: Sigma 732X 9-track magnetic tape
|
||||||
|
|
||||||
Copyright (c) 2007-2008, Robert M. Supnik
|
Copyright (c) 2007-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"),
|
||||||
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
mt 7320 and 7322/7323 magnetic tape
|
mt 7320 and 7322/7323 magnetic tape
|
||||||
|
|
||||||
|
13-Mar-17 RMS Annotated fall through in switch
|
||||||
|
|
||||||
Magnetic tapes are represented as a series of variable records
|
Magnetic tapes are represented as a series of variable records
|
||||||
of the form:
|
of the form:
|
||||||
|
|
||||||
|
@ -475,7 +477,8 @@ switch (st) {
|
||||||
case MTSE_FMT: /* illegal fmt */
|
case MTSE_FMT: /* illegal fmt */
|
||||||
case MTSE_UNATT: /* not attached */
|
case MTSE_UNATT: /* not attached */
|
||||||
case MTSE_WRP: /* write protect */
|
case MTSE_WRP: /* write protect */
|
||||||
chan_set_chf (mt_dib.dva, CHF_XMME);
|
chan_set_chf (mt_dib.dva, CHF_XMME); /* set err */
|
||||||
|
/* fall through */
|
||||||
case MTSE_OK: /* no error */
|
case MTSE_OK: /* no error */
|
||||||
chan_uen (mt_dib.dva); /* uend */
|
chan_uen (mt_dib.dva); /* uend */
|
||||||
return SCPE_IERR;
|
return SCPE_IERR;
|
||||||
|
|
Loading…
Add table
Reference in a new issue