mirror of
https://github.com/open-simh/simh.git
synced 2026-04-30 21:49:00 +00:00
PDP10, PDP11, PDP18B, PDP8: Annotate switch case fall through (COVERITY)
This commit is contained in:
committed by
Mark Pizzolato
parent
3aff340c17
commit
48a9b5b42b
@@ -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-2012, 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
|
||||||
17-Mar-13 RMS Fixed incorrect copy/paste from pdp11_rp.c
|
17-Mar-13 RMS Fixed incorrect copy/paste from pdp11_rp.c
|
||||||
08-Dec-12 RMS UNLOAD does not set ATTN (Mark Pizzolato)
|
08-Dec-12 RMS UNLOAD does not set ATTN (Mark Pizzolato)
|
||||||
12-Nov-05 RMS Fixed DCLR not to clear drive address
|
12-Nov-05 RMS Fixed DCLR not to clear drive address
|
||||||
@@ -937,7 +938,7 @@ switch (uptr->FUNC) { /* case on function */
|
|||||||
set_rper (ER1_WLE, drv); /* set drive error */
|
set_rper (ER1_WLE, drv); /* set drive error */
|
||||||
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 */
|
||||||
|
|||||||
@@ -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
|
||||||
08-Dec-12 RMS UNLOAD shouldn't set ATTN (Mark Pizzolato)
|
08-Dec-12 RMS UNLOAD shouldn't set ATTN (Mark Pizzolato)
|
||||||
17-May-07 RMS CS1 DVA resides in device, not MBA
|
17-May-07 RMS CS1 DVA resides in device, not MBA
|
||||||
@@ -827,7 +828,7 @@ switch (fnc) { /* case on function */
|
|||||||
mba_set_exc (rp_dib.ba); /* set exception */
|
mba_set_exc (rp_dib.ba); /* set exception */
|
||||||
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 */
|
||||||
|
|||||||
@@ -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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@
|
|||||||
|
|
||||||
#define UNIT_V_DTYPE (UNIT_V_UF + 0) /* disk type */
|
#define UNIT_V_DTYPE (UNIT_V_UF + 0) /* disk type */
|
||||||
#define RS03_DTYPE (0)
|
#define RS03_DTYPE (0)
|
||||||
#define RS04_DTYPE (1)
|
#define RS04_DTYPE (1)
|
||||||
#define UNIT_V_AUTO (UNIT_V_UF + 1) /* autosize */
|
#define UNIT_V_AUTO (UNIT_V_UF + 1) /* autosize */
|
||||||
#define UNIT_V_WLK (UNIT_V_UF + 2) /* write lock */
|
#define UNIT_V_WLK (UNIT_V_UF + 2) /* write lock */
|
||||||
#define UNIT_DTYPE (1 << UNIT_V_DTYPE)
|
#define UNIT_DTYPE (1 << UNIT_V_DTYPE)
|
||||||
@@ -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
|
||||||
@@ -347,7 +348,7 @@ switch (ofs) { /* decode PA<5:1> */
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RS_DA_OF: /* RSDA */
|
case RS_DA_OF: /* RSDA */
|
||||||
rsda[drv] = (uint16)data;
|
rsda[drv] = (uint16) data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RS_AS_OF: /* RSAS */
|
case RS_AS_OF: /* RSAS */
|
||||||
@@ -355,7 +356,7 @@ switch (ofs) { /* decode PA<5:1> */
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RS_MR_OF: /* RSMR */
|
case RS_MR_OF: /* RSMR */
|
||||||
rsmr[drv] = (uint16)data;
|
rsmr[drv] = (uint16) data;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RS_ER_OF: /* RSER */
|
case RS_ER_OF: /* RSER */
|
||||||
@@ -475,11 +476,11 @@ switch (fnc) { /* case on function */
|
|||||||
mba_set_exc (rs_dib.ba); /* set exception */
|
mba_set_exc (rs_dib.ba); /* set exception */
|
||||||
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? */
|
||||||
rs_set_er (ER_IAE, drv); /* set error */
|
rs_set_er (ER_IAE, drv); /* set error */
|
||||||
mba_set_exc (rs_dib.ba); /* set exception */
|
mba_set_exc (rs_dib.ba); /* set exception */
|
||||||
rs_update_ds (DS_ATA, drv); /* set attn */
|
rs_update_ds (DS_ATA, drv); /* set attn */
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -488,7 +489,7 @@ switch (fnc) { /* case on function */
|
|||||||
tutc = tutc & ~TC_FCS; /* clear fc status */
|
tutc = tutc & ~TC_FCS; /* clear fc status */
|
||||||
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;
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -358,13 +359,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);
|
||||||
|
|||||||
@@ -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,7 @@ 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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user