Commit 41da1a4b authored by Charles Anthony's avatar Charles Anthony

Gitlab issue #23 Minor readabilty and signedness fixes.

parent 377e49d6
Pipeline #188090248 failed with stages
in 8 minutes and 10 seconds
......@@ -1518,9 +1518,9 @@ static void panel_process_event (void)
}
#endif
#if defined(THREADZ) || defined(LOCKLESS)
bool bce_dis_called = false;
#if defined(THREADZ) || defined(LOCKLESS)
// The hypervisor CPU for the threadz model
t_stat sim_instr (void)
{
......@@ -2797,7 +2797,7 @@ sim_debug (DBG_TRACEEXT, & cpu_dev, "fetchCycle bit 29 sets XSF to 0\n");
// Checking for F(A)NP here is equivalent to checking that the
// last append cycle has made it as far as H/I without a fault.
// Also reset it on TRB fault. ISOLTS-870 05a
if (cpu.cu.APUCycleBits & 060 || cpu.secret_addressing_mode)
if ((cpu.cu.APUCycleBits & 060) || cpu.secret_addressing_mode)
set_apu_status (apuStatus_FABS);
// XXX the whole fault cycle should be rewritten as an xed
......
......@@ -919,7 +919,7 @@ void doG7Fault (bool allowTR)
doFault (FAULT_CON, cpu.g7SubFaults [FAULT_CON], "Connect");
}
if (allowTR && cpu . g7Faults & (1u << FAULT_TRO))
if (allowTR && (cpu.g7Faults & (1u << FAULT_TRO)))
{
cpu . g7Faults &= ~(1u << FAULT_TRO);
......
......@@ -440,7 +440,7 @@ sim_printf ("\n");
}
#endif
uint j = 0;
for (int i = 0; i < n_chars; i += 4, j++)
for (uint i = 0; i < n_chars; i += 4, j++)
{
word36 v = 0;
if (i < linep->nPos)
......@@ -962,7 +962,7 @@ static inline bool processInputCharacter (struct t_line * linep, unsigned char k
// XXX This code assumes that only 'frame_end' is in play, as in Kermit behavior
linep->buffer[linep->nPos++] = kar;
// Pad to frame size with nulls
int frsz = (int) linep->block_xfer_in_frame_sz;
uint frsz = linep->block_xfer_in_frame_sz;
while ((size_t) linep->nPos < sizeof (linep->buffer) && linep->nPos < frsz)
linep->buffer[linep->nPos++] = 0;
linep->accept_input = 1;
......@@ -1064,10 +1064,10 @@ static inline bool processInputCharacter (struct t_line * linep, unsigned char k
((linep->block_xfer_out_frame_sz != 0)
?
// block xfer buffer size met
(linep->nPos >= (int) linep->block_xfer_out_frame_sz)
(linep->nPos >= linep->block_xfer_out_frame_sz)
:
// 'listen' command buffer size met
(linep->inputBufferSize != 0 && linep->nPos >= (int) linep->inputBufferSize))
(linep->inputBufferSize != 0 && linep->nPos >= linep->inputBufferSize))
)
{
linep->accept_input = 1;
......@@ -2001,7 +2001,7 @@ static t_stat fnpSetFW (UNIT * uptr, UNUSED int32 value,
if (strcasecmp (tok, "LIST") == 0)
{
for (uint i = 0; i < n_fw_entries; i ++)
for (int i = 0; i < n_fw_entries; i ++)
{
struct fw_entry_s * p = fw_entries + i;
......
......@@ -1322,7 +1322,7 @@ sim_printf ("']\n");
#endif
//sim_printf ("long in; line %d tally %d\n", decoded_p->slot_no, linep->nPos);
uint n_chars_in_buf = min(n_chars-off, tally);
for (int i = 0; i < n_chars_in_buf; i += 4)
for (uint i = 0; i < n_chars_in_buf; i += 4)
{
word36 v = 0;
if (i < n_chars_in_buf)
......
......@@ -340,10 +340,8 @@ void iom_core_read (uint iom_unit_idx, word24 addr, word36 *data, UNUSED const c
void iom_core_read2 (uint iom_unit_idx, word24 addr, word36 *even, word36 *odd, UNUSED const char * ctx);
void iom_core_write (uint iom_unit_idx, word24 addr, word36 data, UNUSED const char * ctx);
void iom_core_write2 (uint iom_unit_idx, word24 addr, word36 even, word36 odd, UNUSED const char * ctx);
#ifdef LOCKLESS
void iom_core_read_lock (uint iom_unit_idx, word24 addr, word36 *data, UNUSED const char * ctx);
void iom_core_write_unlock (uint iom_unit_idx, word24 addr, word36 data, UNUSED const char * ctx);
#endif
t_stat boot2 (UNUSED int32 arg, UNUSED const char * buf);
t_stat iom_unit_reset_idx (uint iom_unit_idx);
......
......@@ -1036,7 +1036,7 @@ void fnpuv_dial_out (uint fnpno, uint lineno, word36 d1, word36 d2, word36 d3)
bool accept = true;
uint32_t ip_addr = (uint32_t) ((oct1 << 24) | (oct2 << 16) | (oct3 << 8) | oct4);
uint this_line = encodeline (fnpno, lineno);
for (uint i = 0; i < n_fw_entries; i ++)
for (int i = 0; i < n_fw_entries; i ++)
{
struct fw_entry_s * p = fw_entries + i;
if (this_line < p->line_0 || this_line > p->line_1)
......
......@@ -292,7 +292,7 @@ static INLINE int _check_telopt(telnet_t *telnet, unsigned char telopt,
static INLINE telnet_rfc1143_t _get_rfc1143(telnet_t *telnet,
unsigned char telopt) {
telnet_rfc1143_t empty;
int i;
uint i;
/* search for entry */
for (i = 0; i != telnet->q_cnt; ++i) {
......@@ -311,7 +311,7 @@ static INLINE telnet_rfc1143_t _get_rfc1143(telnet_t *telnet,
static INLINE void _set_rfc1143(telnet_t *telnet, unsigned char telopt,
unsigned char us, unsigned char him) {
telnet_rfc1143_t *qtmp;
int i;
uint i;
/* search for entry */
for (i = 0; i != telnet->q_cnt; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment