13
0

fix optimized unused variable warnings

This commit is contained in:
Paul Davis 2022-06-21 18:40:11 -06:00
parent 45403dd2f1
commit ad8e1c1cfd

View File

@ -76,6 +76,8 @@ smf_new(void)
cantfail = smf_set_format(smf, 0);
assert(!cantfail);
(void) cantfail; /* keep gcc quiet */
smf_init_tempo(smf);
return (smf);
@ -168,9 +170,7 @@ smf_track_delete(smf_track_t *track)
void
smf_add_track(smf_t *smf, smf_track_t *track)
{
#ifndef NDEBUG
int cantfail;
#endif
assert(track->smf == NULL);
@ -181,11 +181,11 @@ smf_add_track(smf_t *smf, smf_track_t *track)
track->track_number = smf->number_of_tracks;
if (smf->number_of_tracks > 1) {
#ifndef NDEBUG
cantfail = smf_set_format(smf, 1);
#ifndef NDEBUG
assert(!cantfail);
#else
smf_set_format(smf, 1);
(void) cantfail;
#endif
}