mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
test: update midifile library to ANSI C
The midifile library used by the playmidi1 program dates from 1989, and used pre-ANSI function definitions and prototypes. GCC 15 now defaults to C23 where () means the same as (void) in prototypes, which causes type mismatch errors. Update the code to use ANSI function definitions and prototypes, so it'll compile happily as anything from ANSI C to C23. This revealed that playmidi1's do_tempo had the wrong argument type, so correct that as well. Closes: https://github.com/alsa-project/alsa-lib/pull/463 Signed-off-by: Adam Sampson <ats@offog.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
782b0597c2
commit
3a97718124
3 changed files with 140 additions and 181 deletions
|
|
@ -243,14 +243,14 @@ static void alsa_stop_timer(void)
|
|||
}
|
||||
|
||||
/* change the tempo */
|
||||
static void do_tempo(int us)
|
||||
static void do_tempo(long us)
|
||||
{
|
||||
snd_seq_event_t ev;
|
||||
|
||||
if (verbose >= VERB_MUCH) {
|
||||
double bpm;
|
||||
bpm = 60.0E6 / (double) us;
|
||||
printf("Tempo %d us/beat, %.2f bpm\n", us, bpm);
|
||||
printf("Tempo %ld us/beat, %.2f bpm\n", us, bpm);
|
||||
}
|
||||
|
||||
/* store the new tempo and timestamp of the tempo change */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue