Compiler suggested cleanups
This commit is contained in:
parent
223e3e0254
commit
c6c66487ac
9 changed files with 21 additions and 20 deletions
|
@ -366,7 +366,7 @@ int32 sim_instr (void)
|
|||
if ((OP & 0xCF) == 0x01) { /* LXI */
|
||||
DAR = M[PC] & 0x00ff;
|
||||
PC++;
|
||||
DAR = DAR | (M[PC] <<8) & 0xFF00;;
|
||||
DAR = DAR | ((M[PC] <<8) & 0xFF00);
|
||||
putpair((OP >> 4) & 0x03, DAR);
|
||||
PC++;
|
||||
continue;
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
||||
#pragma GCC diagnostic ignored "-Wlogical-op-parentheses"
|
||||
#pragma GCC diagnostic ignored "-Wbitwise-op-parentheses"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -768,7 +768,7 @@ t_stat sim_instr (void)
|
|||
CCC--;
|
||||
}
|
||||
C = (CCC != 0);
|
||||
WriteIndex(TAG, ReadIndex(TAG) & 0xFF00 | CCC); /* put 6 bits back into low byte of index register */
|
||||
WriteIndex(TAG, (ReadIndex(TAG) & 0xFF00) | CCC); /* put 6 bits back into low byte of index register */
|
||||
break;
|
||||
}
|
||||
/* if TAG == 0, fall through and treat like normal shift SLT */
|
||||
|
@ -814,8 +814,8 @@ t_stat sim_instr (void)
|
|||
while (CCC > 0) {
|
||||
xbit = (ACC & 0x0001) << 15;
|
||||
abit = (ACC & 0x8000);
|
||||
ACC = (ACC >> 1) & 0x7FFF | abit;
|
||||
EXT = (EXT >> 1) & 0x7FFF | xbit;
|
||||
ACC = ((ACC >> 1) & 0x7FFF) | abit;
|
||||
EXT = ((EXT >> 1) & 0x7FFF) | xbit;
|
||||
CCC--;
|
||||
}
|
||||
break;
|
||||
|
@ -824,8 +824,8 @@ t_stat sim_instr (void)
|
|||
while (CCC > 0) {
|
||||
abit = (EXT & 0x0001) << 15;
|
||||
xbit = (ACC & 0x0001) << 15;
|
||||
ACC = (ACC >> 1) & 0x7FFF | abit;
|
||||
EXT = (EXT >> 1) & 0x7FFF | xbit;
|
||||
ACC = ((ACC >> 1) & 0x7FFF) | abit;
|
||||
EXT = ((EXT >> 1) & 0x7FFF) | xbit;
|
||||
CCC--;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -222,7 +222,7 @@ DEVICE qty_dev =
|
|||
#define QTY_LINE_RX_CHAR( line ) (qty_status[ (line) ] & QTY_S_DMASK)
|
||||
#define QTY_UNIT_ACTIVE( unitp ) ( (unitp)->conn )
|
||||
|
||||
#define QTY_LINE_BITS( line, bits ) qty_status[ (line) ] & bits
|
||||
#define QTY_LINE_BITS( line, bits ) (qty_status[ (line) ] & bits)
|
||||
|
||||
#define QTY_LINE_SET_BIT( line, bit ) qty_status[ (line) ] |= (bit) ;
|
||||
#define QTY_LINE_CLEAR_BIT( line, bit ) qty_status[ (line) ] &= ~(bit) ;
|
||||
|
|
|
@ -994,7 +994,7 @@ if (pulse & 001) { /* KSF */
|
|||
}
|
||||
if (pulse & 002) { /* KRS/KRB */
|
||||
CLR_INT (TTI); /* clear flag */
|
||||
dat = dat | tti_unit.buf & TTI_MASK; /* return buffer */
|
||||
dat = dat | (tti_unit.buf & TTI_MASK); /* return buffer */
|
||||
#if defined (PDP15)
|
||||
if (pulse & 020) /* KRS? */
|
||||
tti_fdpx = 1;
|
||||
|
|
|
@ -1341,7 +1341,7 @@ if (sc >= 24) {
|
|||
A = sgn;
|
||||
}
|
||||
else {
|
||||
B = ((B >> sc) | (A << (24 - sc)) & DMASK);
|
||||
B = ((B >> sc) | (A << (24 - sc))) & DMASK;
|
||||
A = ((A >> sc) | (sgn << (24 - sc))) & DMASK;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -1766,7 +1766,7 @@ if (tcsetattr (0, TCSAFLUSH, &runtty) < 0)
|
|||
return SCPE_TTIERR;
|
||||
if (prior_norm) { /* at normal pri? */
|
||||
errno = 0;
|
||||
nice (10); /* try to lower pri */
|
||||
(void)nice (10); /* try to lower pri */
|
||||
prior_norm = errno; /* if no error, done */
|
||||
}
|
||||
return SCPE_OK;
|
||||
|
@ -1778,7 +1778,7 @@ if (!isatty (fileno (stdin))) /* skip if !tty */
|
|||
return SCPE_OK;
|
||||
if (!prior_norm) { /* priority down? */
|
||||
errno = 0;
|
||||
nice (-10); /* try to raise pri */
|
||||
(void)nice (-10); /* try to raise pri */
|
||||
prior_norm = (errno == 0); /* if no error, done */
|
||||
}
|
||||
if (tcsetattr (0, TCSAFLUSH, &cmdtty) < 0)
|
||||
|
@ -1829,7 +1829,7 @@ t_stat sim_os_putchar (int32 out)
|
|||
char c;
|
||||
|
||||
c = out;
|
||||
write (1, &c, 1);
|
||||
(void)write (1, &c, 1);
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1406,7 +1406,7 @@ static void eth_get_nic_hw_addr(ETH_DEV* dev, char *devname)
|
|||
memset(command, 0, sizeof(command));
|
||||
for (i=0; patterns[i] && (0 == dev->have_host_nic_phy_addr); ++i) {
|
||||
snprintf(command, sizeof(command)-1, "ifconfig %s | %s >NIC.hwaddr", devname, patterns[i]);
|
||||
system(command);
|
||||
(void)system(command);
|
||||
if (NULL != (f = fopen("NIC.hwaddr", "r"))) {
|
||||
while (0 == dev->have_host_nic_phy_addr) {
|
||||
if (fgets(command, sizeof(command)-1, f)) {
|
||||
|
|
14
sim_serial.c
14
sim_serial.c
|
@ -996,10 +996,10 @@ if (tcgetattr (port, &tio)) { /* get the terminal attr
|
|||
|
||||
#if 1
|
||||
|
||||
tio.c_iflag = tio.c_iflag & ~i_clear | i_set; /* configure the serial line for raw mode */
|
||||
tio.c_oflag = tio.c_oflag & ~o_clear | o_set;
|
||||
tio.c_cflag = tio.c_cflag & ~c_clear | c_set;
|
||||
tio.c_lflag = tio.c_lflag & ~l_clear | l_set;
|
||||
tio.c_iflag = (tio.c_iflag & ~i_clear) | i_set; /* configure the serial line for raw mode */
|
||||
tio.c_oflag = (tio.c_oflag & ~o_clear) | o_set;
|
||||
tio.c_cflag = (tio.c_cflag & ~c_clear) | c_set;
|
||||
tio.c_lflag = (tio.c_lflag & ~l_clear) | l_set;
|
||||
|
||||
#elif 0
|
||||
|
||||
|
@ -1079,15 +1079,15 @@ for (i = 0; i < baud_count; i++) /* assign baud rate */
|
|||
if (i == baud_count) /* baud rate assigned? */
|
||||
return SCPE_ARG; /* invalid rate specified */
|
||||
|
||||
if (config.charsize >= 5 && config.charsize <= 8) /* character size OK? */
|
||||
tio.c_cflag = tio.c_cflag & ~CSIZE | /* replace character size code */
|
||||
if ((config.charsize >= 5) && (config.charsize <= 8)) /* character size OK? */
|
||||
tio.c_cflag = (tio.c_cflag & ~CSIZE) | /* replace character size code */
|
||||
charsize_map [config.charsize - 5];
|
||||
else
|
||||
return SCPE_ARG; /* not a valid size */
|
||||
|
||||
switch (config.parity) { /* assign parity */
|
||||
case 'E':
|
||||
tio.c_cflag = tio.c_cflag & ~PARODD | PARENB; /* set for even parity */
|
||||
tio.c_cflag = (tio.c_cflag & ~PARODD) | PARENB; /* set for even parity */
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
|
|
Loading…
Add table
Reference in a new issue