[Swfdec] [PATCH] fix issues from latest commits

Benjamin Otte otte at gnome.org
Sun Jun 8 05:23:57 PDT 2008


Which gcc version are you using? The one I'm using does not have this
problem. Also, does anybody else have this problem?

For me, the following program does not cause a warning:
void foo (void);
void bar (int foo);

while this one causes a warning:
void foo (void);
void bar (int foo) {}

Which makes sense, because in the first case, it's just a prototype
where the names don't matter while the second case is the actual
function, where the name does matter.
GStreamer headers however are just declarations, so they are part of
the first case and shouldn't cause a warning.
Which gets me back to the first problem: Why does it cause a warning for you?

I have disabled -Wshadow now, but I want to reenable this, as it has
saved me two or three times on Swfdec already. So I'd love if somebody
could investigate this.

Cheers,
Benjamin


On Sat, Jun 7, 2008 at 12:00 PM, Riccardo Magliocchetti
<riccardo.magliocchetti at gmail.com> wrote:
> Riccardo Magliocchetti wrote:
>> Still not able to compile swfdec (shadow warnings), will follow other
>> patches if you don't beat me to it.
>
> ouch, the problem is in gstreamer (0.10.19) vs time.h (clock, time) and
> stdlib.h (free) :|
>
> In file included from /usr/include/gstreamer-0.10/gst/gstbuffer.h:28,
>                  from /usr/include/gstreamer-0.10/gst/gstpad.h:30,
>                  from /usr/include/gstreamer-0.10/gst/gstelement.h:53,
>                  from /usr/include/gstreamer-0.10/gst/gstbin.h:27,
>                  from /usr/include/gstreamer-0.10/gst/gst.h:34,
>                  from /usr/include/gstreamer-0.10/gst/pbutils/pbutils.h:23,
>                  from swfdec_audio_decoder_gst.c:24:
> /usr/include/gstreamer-0.10/gst/gstclock.h:248: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:248: warning: declaration of
> 'time' shadows a global declaration
> /usr/include/time.h:187: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:472: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:475: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:477: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:480: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:481: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:482: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:485: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:493: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:495: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:497: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:498: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:502: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:508: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:509: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:510: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:515: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:516: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:517: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:521: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:522: warning: declaration of
> 'time' shadows a global declaration
> /usr/include/time.h:187: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstclock.h:523: warning: declaration of
> 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> In file included from /usr/include/gstreamer-0.10/gst/gstformat.h:30,
>                  from /usr/include/gstreamer-0.10/gst/gstevent.h:29,
>                  from /usr/include/gstreamer-0.10/gst/gstpad.h:32,
>                  from /usr/include/gstreamer-0.10/gst/gstelement.h:53,
>                  from /usr/include/gstreamer-0.10/gst/gstbin.h:27,
>                  from /usr/include/gstreamer-0.10/gst/gst.h:34,
>                  from /usr/include/gstreamer-0.10/gst/pbutils/pbutils.h:23,
>                  from swfdec_audio_decoder_gst.c:24:
> /usr/include/gstreamer-0.10/gst/gstiterator.h:219: warning: declaration
> of 'free' shadows a global declaration
> /usr/include/stdlib.h:488: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstiterator.h:227: warning: declaration
> of 'free' shadows a global declaration
> /usr/include/stdlib.h:488: warning: shadowed declaration is here
> In file included from /usr/include/gstreamer-0.10/gst/gstbus.h:29,
>                  from /usr/include/gstreamer-0.10/gst/gstelement.h:54,
>                  from /usr/include/gstreamer-0.10/gst/gstbin.h:27,
>                  from /usr/include/gstreamer-0.10/gst/gst.h:34,
>                  from /usr/include/gstreamer-0.10/gst/pbutils/pbutils.h:23,
>                  from swfdec_audio_decoder_gst.c:24:
> /usr/include/gstreamer-0.10/gst/gstmessage.h:282: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstmessage.h:283: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstmessage.h:284: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstmessage.h:304: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstmessage.h:305: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstmessage.h:306: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> In file included from /usr/include/gstreamer-0.10/gst/gstbin.h:27,
>                  from /usr/include/gstreamer-0.10/gst/gst.h:34,
>                  from /usr/include/gstreamer-0.10/gst/pbutils/pbutils.h:23,
>                  from swfdec_audio_decoder_gst.c:24:
> /usr/include/gstreamer-0.10/gst/gstelement.h:515: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstelement.h:586: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstelement.h:587: warning: declaration
> of 'time' shadows a global declaration
> /usr/include/time.h:187: warning: shadowed declaration is here
> In file included from /usr/include/gstreamer-0.10/gst/gst.h:55,
>                  from /usr/include/gstreamer-0.10/gst/pbutils/pbutils.h:23,
>                  from swfdec_audio_decoder_gst.c:24:
> /usr/include/gstreamer-0.10/gst/gstpipeline.h:95: warning: declaration
> of 'time' shadows a global declaration
> /usr/include/time.h:187: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstpipeline.h:98: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstpipeline.h:99: warning: declaration
> of 'clock' shadows a global declaration
> /usr/include/time.h:184: warning: shadowed declaration is here
> In file included from /usr/include/gstreamer-0.10/gst/gst.h:60,
>                  from /usr/include/gstreamer-0.10/gst/pbutils/pbutils.h:23,
>                  from swfdec_audio_decoder_gst.c:24:
> /usr/include/gstreamer-0.10/gst/gstsegment.h:91: warning: declaration of
> 'time' shadows a global declaration
> /usr/include/time.h:187: warning: shadowed declaration is here
> /usr/include/gstreamer-0.10/gst/gstsegment.h:94: warning: declaration of
> 'time' shadows a global declaration
> /usr/include/time.h:187: warning: shadowed declaration is here
>
> thanks,
> rm
> _______________________________________________
> Swfdec mailing list
> Swfdec at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/swfdec
>


More information about the Swfdec mailing list