CDC1700: Cleanup minor compiler warnings.

- Avoid macro name conflic REG_NONE changed to REG_NOREG
- Avoid a t_offset truncation assigning to a uint16 in drm_attach.
This commit is contained in:
Mark Pizzolato 2017-12-15 04:30:03 -08:00
parent a5feaf2815
commit 2260eee423
3 changed files with 14 additions and 14 deletions

View file

@ -392,7 +392,7 @@ enum IOstatus {
#define MOD_ENHRA 0x0038
#define MOD_ENHRB 0x0007
#define REG_NONE 0x0
#define REG_NOREG 0x0
#define REG_R1 0x1
#define REG_R2 0x2
#define REG_R3 0x3

View file

@ -270,28 +270,28 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
case OPC_STOSJMP:
if (enhMode == 0) {
enhValid = TRUE;
if (enhRB == REG_NONE)
if (enhRB == REG_NOREG)
strcpy(enhInstr, "SJE");
else sprintf(enhInstr, "SJ%c", enhRegChar[enhRB]);
}
break;
case OPC_STOADD:
if ((enhMode == 0) && (enhRB != REG_NONE)) {
if ((enhMode == 0) && (enhRB != REG_NOREG)) {
enhValid = TRUE;
sprintf(enhInstr, "AR%c", enhRegChar[enhRB]);
}
break;
case OPC_STOSUB:
if ((enhMode == 0) && (enhRB != REG_NONE)) {
if ((enhMode == 0) && (enhRB != REG_NOREG)) {
enhValid = TRUE;
sprintf(enhInstr, "SB%c", enhRegChar[enhRB]);
}
break;
case OPC_STOAND:
if (enhRB != REG_NONE)
if (enhRB != REG_NOREG)
switch (enhMode) {
case WORD_REG:
enhValid = TRUE;
@ -308,21 +308,21 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
case OPC_STOLOADST:
switch (enhMode) {
case WORD_REG:
if (enhRB != REG_NONE) {
if (enhRB != REG_NOREG) {
enhValid = TRUE;
sprintf(enhInstr, "LR%c", enhRegChar[enhRB]);
}
break;
case WORD_MEM:
if (enhRB != REG_NONE) {
if (enhRB != REG_NOREG) {
enhValid = TRUE;
sprintf(enhInstr, "SR%c", enhRegChar[enhRB]);
}
break;
case CHAR_REG:
if (enhRB != REG_NONE) {
if (enhRB != REG_NOREG) {
enhValid = TRUE;
enhChar = TRUE;
strcpy(enhInstr, "LCA");
@ -330,7 +330,7 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
break;
case CHAR_MEM:
if (enhRB != REG_NONE) {
if (enhRB != REG_NOREG) {
enhValid = TRUE;
enhChar = TRUE;
strcpy(enhInstr, "SCA");
@ -340,7 +340,7 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
break;
case OPC_STOOR:
if (enhRB != REG_NONE)
if (enhRB != REG_NOREG)
switch (enhMode) {
case WORD_REG:
enhValid = TRUE;
@ -357,14 +357,14 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
case OPC_STOCRE:
switch (enhMode) {
case WORD_REG:
if (enhRB != REG_NONE) {
if (enhRB != REG_NOREG) {
enhValid = TRUE;
sprintf(enhInstr, "C%cE", enhRegChar[enhRB]);
}
break;
case CHAR_REG:
if (enhRB != REG_NONE) {
if (enhRB != REG_NOREG) {
enhValid = TRUE;
enhChar = TRUE;
strcpy(enhInstr, "CCE");

View file

@ -715,7 +715,7 @@ t_stat drm_attach (UNIT *uptr, CONST char *cptr)
{
t_addr capac = uptr->capac;
t_stat r;
uint16 tracks;
t_offset tracks;
r = attach_unit(uptr, cptr);
if (r != SCPE_OK)
@ -744,7 +744,7 @@ t_stat drm_attach (UNIT *uptr, CONST char *cptr)
return sim_messagef(SCPE_OPENERR, "Invalid file size");
}
DRMdev.STATUS = IO_ST_READY | IO_ST_DATA;
DRMdev.iod_tracks = tracks;
DRMdev.iod_tracks = (uint16)tracks;
DRMdev.iod_event = Instructions;
return SCPE_OK;