From a2ebf5b60d94ffeacbb37d77d399c7910fab1942 Mon Sep 17 00:00:00 2001 From: Quipyowert2 <38995150+Quipyowert2@users.noreply.github.com> Date: Sun, 17 Feb 2019 04:51:22 -0800 Subject: [PATCH] Printf unsigned longs with %lu instead of %li (midifile.c) Signed-off-by: Nathan Mills Signed-off-by: Jaroslav Kysela --- test/midifile.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/midifile.c b/test/midifile.c index 8d6ba902..3d72b9f9 100644 --- a/test/midifile.c +++ b/test/midifile.c @@ -295,14 +295,14 @@ find_tempo() } if (i > tempo_history_count || tempo_history_time[i] > Mf_currtime) { #ifdef DEBUG_TIMES -printf("[past %d, old_tempo %d]\n", tempo_history_time[i], old_tempo); +printf("[past %lu, old_tempo %lu]\n", tempo_history_time[i], old_tempo); #endif revised_time = Mf_currtime; return(old_tempo); } tempo_change_time = revised_time = tempo_history_time[i]; #ifdef DEBUG_TIMES -printf("[revised_time %d, new_tempo %d]\n", revised_time, new_tempo); +printf("[revised_time %lu, new_tempo %lu]\n", revised_time, new_tempo); #endif return(new_tempo); } @@ -376,13 +376,13 @@ readtrack () /* read a track chunk */ } delta_secs = mf_ticks2sec (revised_time-old_currtime, Mf_division, save_tempo); #ifdef DEBUG_TIMES -printf("d(rev %d - old %d, div %d, tempo %d) = %.3f\n", +printf("d(rev %lu - old %lu, div %d, tempo %lu) = %.3f\n", revised_time, old_currtime, Mf_division, save_tempo, delta_secs * 1600.0); #endif Mf_f_realtime = old_f_realtime + delta_secs * 1600.0; Mf_realtime = (unsigned long)(0.5 + Mf_f_realtime); #ifdef DEBUG_TIMES -printf("\tt=%d ticks ( = %d csec/16 < old %.2f + %.2f)\n", Mf_currtime, Mf_realtime, +printf("\tt=%lu ticks ( = %lu csec/16 < old %.2f + %.2f)\n", Mf_currtime, Mf_realtime, old_f_realtime, delta_secs * 1600.0); #endif if (revised_time == tempo_change_time) { @@ -393,13 +393,13 @@ old_f_realtime, delta_secs * 1600.0); else { delta_secs = mf_ticks2sec (revised_time-old_currtime, Mf_division, Mf_currtempo); #ifdef DEBUG_TIMES -printf("d(rev %d - old %d, div %d, tempo %d) = %.3f\n", +printf("d(rev %lu - old %lu, div %d, tempo %lu) = %.3f\n", revised_time, old_currtime, Mf_division, Mf_currtempo, delta_secs * 1600.0); #endif Mf_f_realtime = old_f_realtime + delta_secs * 1600.0; Mf_realtime = (unsigned long)(0.5 + Mf_f_realtime); #ifdef DEBUG_TIMES -printf("\tt=%d ticks ( = %d csec/16 < old %.2f + %.2f)\n", Mf_currtime, Mf_realtime, +printf("\tt=%lu ticks ( = %lu csec/16 < old %.2f + %.2f)\n", Mf_currtime, Mf_realtime, old_f_realtime, delta_secs * 1600.0); #endif } -- 2.47.1