PDP10, PDP11, PDP18B, PDP8: Annotate switch case fall through (COVERITY)

This commit is contained in:
Bob Supnik 2017-03-13 10:59:06 -07:00 committed by Mark Pizzolato
parent fa62a00fd0
commit d1768d2771
6 changed files with 28 additions and 17 deletions

View file

@ -1,6 +1,6 @@
/* pdp10_rp.c - RH11/RP04/05/06/07 RM02/03/05/80 "Massbus" disk controller /* pdp10_rp.c - RH11/RP04/05/06/07 RM02/03/05/80 "Massbus" disk controller
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 @@
rp RH/RP/RM moving head disks rp RH/RP/RM moving head disks
13-Mar-17 RMS Annotated fall through in switch
12-Nov-05 RMS Fixed DCLR not to clear drive address 12-Nov-05 RMS Fixed DCLR not to clear drive address
07-Jul-05 RMS Removed extraneous externs 07-Jul-05 RMS Removed extraneous externs
18-Mar-05 RMS Added attached test to detach routine 18-Mar-05 RMS Added attached test to detach routine
@ -45,7 +46,7 @@
28-Sep-01 RMS Fixed interrupt handling for SC/ATA 28-Sep-01 RMS Fixed interrupt handling for SC/ATA
23-Aug-01 RMS Added read/write header stubs for ITS 23-Aug-01 RMS Added read/write header stubs for ITS
(found by Mirian Crzig Lennox) (found by Mirian Crzig Lennox)
13-Jul-01 RMS Changed fread call to fxread (found by Peter Schorn) 13-Jul-01 RMS Changed fread call to fxread (Peter Schorn)
14-May-01 RMS Added check for unattached drive 14-May-01 RMS Added check for unattached drive
The "Massbus style" disks consisted of several different large The "Massbus style" disks consisted of several different large
@ -933,6 +934,7 @@ switch (uptr->FUNC) { /* case on function */
update_rpcs (CS1_DONE | CS1_TRE, drv); /* set done, err */ update_rpcs (CS1_DONE | CS1_TRE, drv); /* set done, err */
break; break;
} }
/* fall through */
case FNC_WCHK: /* write check */ case FNC_WCHK: /* write check */
case FNC_READ: /* read */ case FNC_READ: /* read */
case FNC_READH: /* read headers */ case FNC_READH: /* read headers */

View file

@ -1,6 +1,6 @@
/* pdp11_rp.c - RP04/05/06/07 RM02/03/05/80 Massbus disk controller /* pdp11_rp.c - RP04/05/06/07 RM02/03/05/80 Massbus disk controller
Copyright (c) 1993-2013, 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 @@
rp RH/RP/RM moving head disks rp RH/RP/RM moving head disks
13-Mar-17 RMS Annotated intentional fall through in switch
23-Oct-13 RMS Revised for new boot setup routine 23-Oct-13 RMS Revised for new boot setup routine
06-Mar-11 MP Converted to using sim_disk library and refactored 06-Mar-11 MP Converted to using sim_disk library and refactored
for Asynch I/O. for Asynch I/O.
@ -1172,6 +1173,7 @@ if (!uptr->io_complete) { /* Top End (I/O Initiation) Processing */
rp_update_ds (DS_ATA, drv); /* set attn */ rp_update_ds (DS_ATA, drv); /* set attn */
return SCPE_OK; return SCPE_OK;
} }
/* fall through */
case FNC_WCHK: /* write check */ case FNC_WCHK: /* write check */
case FNC_READ: /* read */ case FNC_READ: /* read */
case FNC_READH: /* read headers */ case FNC_READH: /* read headers */

View file

@ -1,6 +1,6 @@
/* pdp11_rs.c - RS03/RS04 Massbus disk controller /* pdp11_rs.c - RS03/RS04 Massbus disk controller
Copyright (c) 2013, Robert M Supnik Copyright (c) 2013-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 @@
rs RS03/RS04 fixed head disks rs RS03/RS04 fixed head disks
13-Mar-17 RMS Annotated intentional fall through in switch
23-Oct-13 RMS Revised for new boot setup routine 23-Oct-13 RMS Revised for new boot setup routine
*/ */
@ -145,7 +146,7 @@
#define RS_LA_OF 7 #define RS_LA_OF 7
/* This controller supports many two disk drive types: /* This controller supports two disk drive types:
type #words/ #sectors/ #tracks/ type #words/ #sectors/ #tracks/
sector track drive sector track drive
@ -482,6 +483,7 @@ switch (fnc) { /* case on function */
rs_update_ds (DS_ATA, drv); /* set attn */ rs_update_ds (DS_ATA, drv); /* set attn */
return SCPE_OK; return SCPE_OK;
} }
/* fall through */
case FNC_WCHK: /* write check */ case FNC_WCHK: /* write check */
case FNC_READ: /* read */ case FNC_READ: /* read */
if (rsda[drv] & DA_INV) { /* bad addr? */ if (rsda[drv] & DA_INV) { /* bad addr? */

View file

@ -1,6 +1,6 @@
/* pdp11_tu.c - PDP-11 TM02/TU16 TM03/TU45/TU77 Massbus magnetic tape controller /* pdp11_tu.c - PDP-11 TM02/TU16 TM03/TU45/TU77 Massbus magnetic tape controller
Copyright (c) 1993-2013, 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 @@
tu TM02/TM03 magtape tu TM02/TM03 magtape
13-Mar-17 RMS Annotated fall through in switch
23-Oct-13 RMS Revised for new boot setup routine 23-Oct-13 RMS Revised for new boot setup routine
18-Apr-11 MP Fixed t_addr printouts for 64b big-endian systems 18-Apr-11 MP Fixed t_addr printouts for 64b big-endian systems
17-May-07 RMS CS1 DVA resides in device, not MBA 17-May-07 RMS CS1 DVA resides in device, not MBA
@ -501,6 +502,7 @@ switch (fnc) { /* case on function */
tufs = tufs & ~(FS_SAT | FS_SSC | FS_ID | FS_ERR); tufs = tufs & ~(FS_SAT | FS_SSC | FS_ID | FS_ERR);
sim_cancel (uptr); /* reset drive */ sim_cancel (uptr); /* reset drive */
uptr->USTAT = 0; uptr->USTAT = 0;
/* fall through */
case FNC_NOP: case FNC_NOP:
tucs1 = tucs1 & ~CS1_GO; /* no operation */ tucs1 = tucs1 & ~CS1_GO; /* no operation */
return SCPE_OK; return SCPE_OK;

View file

@ -1,6 +1,6 @@
/* pdp18b_lp.c: 18b PDP's line printer simulator /* pdp18b_lp.c: 18b PDP's line printer simulator
Copyright (c) 1993-2016, 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"),
@ -28,6 +28,7 @@
lp09 (PDP-9,15) LP09 line printer lp09 (PDP-9,15) LP09 line printer
lp15 (PDP-15) LP15 line printer lp15 (PDP-15) LP15 line printer
13-Mar-17 RMS Annotated fall throughs in switch
10-Mar-16 RMS Added 3-cycle databreak set/show entry 10-Mar-16 RMS Added 3-cycle databreak set/show entry
07-Mar-16 RMS Revised for dynamically allocated memory 07-Mar-16 RMS Revised for dynamically allocated memory
13-Sep-15 RMS Added APIVEC register 13-Sep-15 RMS Added APIVEC register
@ -356,13 +357,13 @@ if (pulse & 004) { /* LPDI */
lp647_buf[lp647_bp] = lp647_buf[lp647_bp] | ((dat >> 12) & 077); lp647_buf[lp647_bp] = lp647_buf[lp647_bp] | ((dat >> 12) & 077);
lp647_bp = lp647_bp + 1; lp647_bp = lp647_bp + 1;
} }
/* fall through */
case 020: /* LPB2 */ case 020: /* LPB2 */
if (lp647_bp < LP647_BSIZE) { if (lp647_bp < LP647_BSIZE) {
lp647_buf[lp647_bp] = lp647_buf[lp647_bp] | ((dat >> 6) & 077); lp647_buf[lp647_bp] = lp647_buf[lp647_bp] | ((dat >> 6) & 077);
lp647_bp = lp647_bp + 1; lp647_bp = lp647_bp + 1;
} }
/* fall through */
case 060: /* LPB1 */ case 060: /* LPB1 */
if (lp647_bp < LP647_BSIZE) { if (lp647_bp < LP647_BSIZE) {
lp647_buf[lp647_bp] = lp647_buf[lp647_bp] | (dat & 077); lp647_buf[lp647_bp] = lp647_buf[lp647_bp] | (dat & 077);

View file

@ -1,6 +1,6 @@
/* pdp8_pt.c: PDP-8 paper tape reader/punch simulator /* pdp8_pt.c: PDP-8 paper tape reader/punch simulator
Copyright (c) 1993-2013, 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 @@
ptr,ptp PC8E paper tape reader/punch ptr,ptp PC8E paper tape reader/punch
13-Mar-17 RMS Annotated fall through in switch
17-Mar-13 RMS Modified to use central set_bootpc routine 17-Mar-13 RMS Modified to use central set_bootpc routine
25-Apr-03 RMS Revised for extended file support 25-Apr-03 RMS Revised for extended file support
04-Oct-02 RMS Added DIBs 04-Oct-02 RMS Added DIBs
@ -136,7 +137,8 @@ switch (IR & 07) { /* decode IR<9:11> */
return (dev_done & INT_PTR)? IOT_SKP + AC: AC; return (dev_done & INT_PTR)? IOT_SKP + AC: AC;
case 6: /* RFC!RRB */ case 6: /* RFC!RRB */
sim_activate (&ptr_unit, ptr_unit.wait); sim_activate (&ptr_unit, ptr_unit.wait); /* activate */
/* fall through */
case 2: /* RRB */ case 2: /* RRB */
dev_done = dev_done & ~INT_PTR; /* clear flag */ dev_done = dev_done & ~INT_PTR; /* clear flag */
int_req = int_req & ~INT_PTR; /* clear int req */ int_req = int_req & ~INT_PTR; /* clear int req */