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:
parent
a5feaf2815
commit
2260eee423
3 changed files with 14 additions and 14 deletions
|
@ -392,7 +392,7 @@ enum IOstatus {
|
||||||
#define MOD_ENHRA 0x0038
|
#define MOD_ENHRA 0x0038
|
||||||
#define MOD_ENHRB 0x0007
|
#define MOD_ENHRB 0x0007
|
||||||
|
|
||||||
#define REG_NONE 0x0
|
#define REG_NOREG 0x0
|
||||||
#define REG_R1 0x1
|
#define REG_R1 0x1
|
||||||
#define REG_R2 0x2
|
#define REG_R2 0x2
|
||||||
#define REG_R3 0x3
|
#define REG_R3 0x3
|
||||||
|
|
|
@ -270,28 +270,28 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
|
||||||
case OPC_STOSJMP:
|
case OPC_STOSJMP:
|
||||||
if (enhMode == 0) {
|
if (enhMode == 0) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
if (enhRB == REG_NONE)
|
if (enhRB == REG_NOREG)
|
||||||
strcpy(enhInstr, "SJE");
|
strcpy(enhInstr, "SJE");
|
||||||
else sprintf(enhInstr, "SJ%c", enhRegChar[enhRB]);
|
else sprintf(enhInstr, "SJ%c", enhRegChar[enhRB]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPC_STOADD:
|
case OPC_STOADD:
|
||||||
if ((enhMode == 0) && (enhRB != REG_NONE)) {
|
if ((enhMode == 0) && (enhRB != REG_NOREG)) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
sprintf(enhInstr, "AR%c", enhRegChar[enhRB]);
|
sprintf(enhInstr, "AR%c", enhRegChar[enhRB]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPC_STOSUB:
|
case OPC_STOSUB:
|
||||||
if ((enhMode == 0) && (enhRB != REG_NONE)) {
|
if ((enhMode == 0) && (enhRB != REG_NOREG)) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
sprintf(enhInstr, "SB%c", enhRegChar[enhRB]);
|
sprintf(enhInstr, "SB%c", enhRegChar[enhRB]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPC_STOAND:
|
case OPC_STOAND:
|
||||||
if (enhRB != REG_NONE)
|
if (enhRB != REG_NOREG)
|
||||||
switch (enhMode) {
|
switch (enhMode) {
|
||||||
case WORD_REG:
|
case WORD_REG:
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
|
@ -308,21 +308,21 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
|
||||||
case OPC_STOLOADST:
|
case OPC_STOLOADST:
|
||||||
switch (enhMode) {
|
switch (enhMode) {
|
||||||
case WORD_REG:
|
case WORD_REG:
|
||||||
if (enhRB != REG_NONE) {
|
if (enhRB != REG_NOREG) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
sprintf(enhInstr, "LR%c", enhRegChar[enhRB]);
|
sprintf(enhInstr, "LR%c", enhRegChar[enhRB]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WORD_MEM:
|
case WORD_MEM:
|
||||||
if (enhRB != REG_NONE) {
|
if (enhRB != REG_NOREG) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
sprintf(enhInstr, "SR%c", enhRegChar[enhRB]);
|
sprintf(enhInstr, "SR%c", enhRegChar[enhRB]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHAR_REG:
|
case CHAR_REG:
|
||||||
if (enhRB != REG_NONE) {
|
if (enhRB != REG_NOREG) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
enhChar = TRUE;
|
enhChar = TRUE;
|
||||||
strcpy(enhInstr, "LCA");
|
strcpy(enhInstr, "LCA");
|
||||||
|
@ -330,7 +330,7 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHAR_MEM:
|
case CHAR_MEM:
|
||||||
if (enhRB != REG_NONE) {
|
if (enhRB != REG_NOREG) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
enhChar = TRUE;
|
enhChar = TRUE;
|
||||||
strcpy(enhInstr, "SCA");
|
strcpy(enhInstr, "SCA");
|
||||||
|
@ -340,7 +340,7 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPC_STOOR:
|
case OPC_STOOR:
|
||||||
if (enhRB != REG_NONE)
|
if (enhRB != REG_NOREG)
|
||||||
switch (enhMode) {
|
switch (enhMode) {
|
||||||
case WORD_REG:
|
case WORD_REG:
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
|
@ -357,14 +357,14 @@ int disassem(char *buf, uint16 addr, t_bool dbg, t_bool targ, t_bool exec)
|
||||||
case OPC_STOCRE:
|
case OPC_STOCRE:
|
||||||
switch (enhMode) {
|
switch (enhMode) {
|
||||||
case WORD_REG:
|
case WORD_REG:
|
||||||
if (enhRB != REG_NONE) {
|
if (enhRB != REG_NOREG) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
sprintf(enhInstr, "C%cE", enhRegChar[enhRB]);
|
sprintf(enhInstr, "C%cE", enhRegChar[enhRB]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHAR_REG:
|
case CHAR_REG:
|
||||||
if (enhRB != REG_NONE) {
|
if (enhRB != REG_NOREG) {
|
||||||
enhValid = TRUE;
|
enhValid = TRUE;
|
||||||
enhChar = TRUE;
|
enhChar = TRUE;
|
||||||
strcpy(enhInstr, "CCE");
|
strcpy(enhInstr, "CCE");
|
||||||
|
|
|
@ -715,7 +715,7 @@ t_stat drm_attach (UNIT *uptr, CONST char *cptr)
|
||||||
{
|
{
|
||||||
t_addr capac = uptr->capac;
|
t_addr capac = uptr->capac;
|
||||||
t_stat r;
|
t_stat r;
|
||||||
uint16 tracks;
|
t_offset tracks;
|
||||||
|
|
||||||
r = attach_unit(uptr, cptr);
|
r = attach_unit(uptr, cptr);
|
||||||
if (r != SCPE_OK)
|
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");
|
return sim_messagef(SCPE_OPENERR, "Invalid file size");
|
||||||
}
|
}
|
||||||
DRMdev.STATUS = IO_ST_READY | IO_ST_DATA;
|
DRMdev.STATUS = IO_ST_READY | IO_ST_DATA;
|
||||||
DRMdev.iod_tracks = tracks;
|
DRMdev.iod_tracks = (uint16)tracks;
|
||||||
DRMdev.iod_event = Instructions;
|
DRMdev.iod_event = Instructions;
|
||||||
|
|
||||||
return SCPE_OK;
|
return SCPE_OK;
|
||||||
|
|
Loading…
Add table
Reference in a new issue