SCP: Fix Coverity flagged issues

This commit is contained in:
Mark Pizzolato 2017-06-13 04:32:18 -07:00
parent 13dbe1e322
commit d9e7afc92f
3 changed files with 3 additions and 3 deletions

2
scp.c
View file

@ -10876,7 +10876,7 @@ int32 offset = 0;
if (dptr->debflags == 0)
return debtab_none;
dbits &= dptr->dctrl; /* Look for just the bits tha matched */
dbits &= dptr->dctrl; /* Look for just the bits that matched */
/* Find matching words for bitmask */

2
scp.h
View file

@ -256,7 +256,7 @@ void sim_debug_bits (uint32 dbits, DEVICE* dptr, BITFIELD* bitdefs,
void sim_debug (uint32 dbits, void* dptr, const char *fmt, ...) GCC_FMT_ATTR(3, 4);
#else
void _sim_debug (uint32 dbits, void* dptr, const char *fmt, ...) GCC_FMT_ATTR(3, 4);
#define sim_debug(dbits, dptr, ...) do { if (sim_deb && dptr && ((dptr)->dctrl & dbits)) _sim_debug (dbits, dptr, __VA_ARGS__);} while (0)
#define sim_debug(dbits, dptr, ...) do { if (sim_deb && dptr && ((dptr)->dctrl & (dbits))) _sim_debug (dbits, dptr, __VA_ARGS__);} while (0)
#endif
#else
#ifdef CANT_USE_MACRO_VA_ARGS

View file

@ -1784,7 +1784,7 @@ switch (sim_throt_state) {
}
else { /* record instruction rate */
sim_throt_cps = (int32)a_cps;
sim_debug (DBG_THR, &sim_timer_dev, "sim_throt_svc() Recalibrating Special %d/%d Cycles Per Second of %d\n",
sim_debug (DBG_THR, &sim_timer_dev, "sim_throt_svc() Recalibrating Special %d/%u Cycles Per Second of %f\n",
sim_throt_wait, sim_throt_sleep_time, sim_throt_cps);
}
sim_throt_ms_start = sim_os_msec ();