From: Jordan Petridis Date: Tue, 4 Aug 2020 12:17:35 +0000 (+0300) Subject: alsamidisrc: fix compiler warning with clang 10 X-Git-Tag: 1.19.3~511^2~476 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31d683d59e4b48401b915c90588afa0fed20f029;p=platform%2Fupstream%2Fgstreamer.git alsamidisrc: fix compiler warning with clang 10 ``` ../subprojects/gst-plugins-base/ext/alsa/gstalsamidisrc.c:201:54: error: converting the result of '<<' to a boolean always evaluates to false [-Werror,-Wtautological-constant-compare] snd_seq_ev_schedule_real (&ev, alsamidisrc->queue, SND_SEQ_TIME_MODE_ABS, ^ /usr/include/alsa/seq_event.h:215:34: note: expanded from macro 'SND_SEQ_TIME_MODE_ABS' ``` The ALSA API expects 0 or 1 here and will then add the flags accordingly, and that's also what other code using this API does. Part-of: --- diff --git a/ext/alsa/gstalsamidisrc.c b/ext/alsa/gstalsamidisrc.c index 0e6b076..d7cc619 100644 --- a/ext/alsa/gstalsamidisrc.c +++ b/ext/alsa/gstalsamidisrc.c @@ -198,8 +198,7 @@ schedule_next_tick (GstAlsaMidiSrc * alsamidisrc) GST_TIME_TO_TIMESPEC (alsamidisrc->tick * MIDI_TICK_PERIOD_MS * GST_MSECOND, time); - snd_seq_ev_schedule_real (&ev, alsamidisrc->queue, SND_SEQ_TIME_MODE_ABS, - &time); + snd_seq_ev_schedule_real (&ev, alsamidisrc->queue, 0, &time); ret = snd_seq_event_output (alsamidisrc->seq, &ev); if (ret < 0)