Skip to content

Commit a171bb6

Browse files
committed
TIMER: Reduce signed/unsigned warnings
1 parent 95f1e9f commit a171bb6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

sim_timer.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ uint32 new_rtime, delta_rtime, last_idle_pct, catchup_ticks_curr;
980980
int32 delta_vtime;
981981
double new_gtime;
982982
int32 new_currd;
983-
int32 itmr;
983+
size_t itmr;
984984
RTC *rtc;
985985

986986
if (tmr == SIM_INTERNAL_CLK)
@@ -1255,7 +1255,8 @@ return (sim_idle_rate_ms != 0);
12551255
/* sim_show_timers - show running timer information */
12561256
t_stat sim_show_timers(FILE *st, DEVICE *dptr, UNIT *uptr, int32 val, CONST char *desc)
12571257
{
1258-
int tmr, clocks;
1258+
size_t tmr;
1259+
int clocks;
12591260
struct timespec now;
12601261
time_t time_t_now;
12611262
size_t calb_tmr = (sim_calb_tmr == INVALID_TIMER) ? sim_calb_tmr_last : sim_calb_tmr;
@@ -1308,7 +1309,8 @@ t_stat sim_show_timers(FILE *st, DEVICE *dptr, UNIT *uptr, int32 val, CONST char
13081309
sim_uname(rtc->clock_unit), (tmr == SIM_NTIMERS) ? ")" : "");
13091310
}
13101311

1311-
fprintf(st, "%s%sTimer %d:\n", sim_asynch_timer ? "Asynchronous " : "", rtc->hz ? "Calibrated " : "Uncalibrated ", tmr);
1312+
fprintf(st, "%s%sTimer %" SIZE_T_FMT "d:\n",
1313+
sim_asynch_timer ? "Asynchronous " : "", rtc->hz ? "Calibrated " : "Uncalibrated ", tmr);
13121314
if (rtc->hz) {
13131315
fprintf(st, " Running at: %d Hz\n", rtc->hz);
13141316
fprintf(st, " Tick Size: %s\n", (rtc->clock_tick_size > 0.0 ? sim_fmt_secs(rtc->clock_tick_size) : "0"));

0 commit comments

Comments
 (0)