Skip to content

Commit

Permalink
alsamidisrc: fix compiler warning with clang 10
Browse files Browse the repository at this point in the history
```
../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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/777>
  • Loading branch information
alatiera committed Aug 4, 2020
1 parent 0d246fb commit 31d683d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ext/alsa/gstalsamidisrc.c
Expand Up @@ -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)
Expand Down

0 comments on commit 31d683d

Please sign in to comment.