[gstreamer-bugs] [Bug 462805] New: [alsa] compilation fails with gcc 4.2

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Thu Aug 2 07:31:30 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=462805

  GStreamer | gst-plugins-base | Ver: HEAD CVS
           Summary: [alsa] compilation fails with gcc 4.2
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: bilboed at bilboed.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


When using gcc 4.2, build the alsa plugin raises the following warning:

gstalsadeviceprobe.c:64: warning: the address of 'info' will always evaluate as
'true'

The reason is because that line is : 
snd_ctl_card_info_alloca (&info);

and snd_ctl_card_info_alloca is in fact a macro which would expand as follow
(based on the above line):
  assert(&info);
  info = (snd_ctl_card_info_t *) alloca(snd_ctl_card_info_sizeof());
  memset(info, 0, snd_ctl_card_info_sizeof());

The problem is the assert(&info); since info was defined just above, it's
guaranteed that the address  of 'info' will always evaluate as 'true'.

To fix that:
* either fix the alsa headers to have 'hassert (ptr != NULL);'
* Add -Wno-address to the CFLAGS


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=462805.




More information about the Gstreamer-bugs mailing list