GNOME Bugzilla – Bug 644845
[alsa] Comparison of unsigned int < 0 always false in gstalsamixer.c
Last modified: 2011-03-15 18:49:19 UTC
rnfds is a guint, so in the following code from gstalsamixer.c, the error condition will never get triggered. {{{ rnfds = snd_mixer_poll_descriptors (mixer->handle, pfds, nfds); g_assert (rnfds <= nfds); if (rnfds < 0) { GST_ELEMENT_ERROR (mixer, RESOURCE, READ, (NULL), ("alsa error: %s", snd_strerror (rnfds))); }}}
commit 185a8ddcaa0caff36e5eb801a3347e1c849061df Author: Blaise Gassend <blaise@suitabletech.com> Date: Tue Mar 15 19:47:11 2011 +0100 alsamixer: Store return values of poll functions in a signed integer Negative return values are used for errors and storing them in an unsigned integer will make it impossible to detect the errors. Fixes bug #644845.