After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613663 - New warnings in osx plugins
New warnings in osx plugins
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Mac OS
: Normal blocker
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-23 06:53 UTC by Tristan Matthews
Modified: 2010-04-12 23:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes compilation warnings for os x plugins (1.53 KB, patch)
2010-03-23 06:53 UTC, Tristan Matthews
none Details | Review

Description Tristan Matthews 2010-03-23 06:53:05 UTC
Created attachment 156833 [details] [review]
fixes compilation warnings for os x plugins

Because of the added warnings from commit 4f5a49a4c7f36b822dd43cce339b066bbf0a7d47 , plugins-good compilation now outputs these warnings:

cc1: warnings being treated as errors
gstosxaudioelement.c: In function ‘gst_osx_audio_element_get_type’:
gstosxaudioelement.c:57: warning: old-style function definition
make[3]: *** [libgstosxaudio_la-gstosxaudioelement.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f .deps/libgstosxaudio_la-gstosxaudiosrc.Tpo .deps/libgstosxaudio_la-gstosxaudiosrc.Plo
make[3]: Leaving directory `/Users/tristanmatthews/gst-plugins-good/sys/osxaudio'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/Users/tristanmatthews/gst-plugins-good/sys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/tristanmatthews/gst-plugins-good'
make: *** [all] Error 2


cc1obj: warnings being treated as errors
cocoawindow.m: In function ‘-[GstGLView reshape]’:
cocoawindow.m:161: warning: function call has aggregate value
cocoawindow.m: In function ‘-[GstGLView displayTexture]’:
cocoawindow.m:289: warning: function call has aggregate value
make[3]: *** [libgstosxvideosink_la-cocoawindow.lo] Error 1
make[3]: Leaving directory `/Users/tristanmatthews/gst-plugins-good/sys/osxvideo'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/Users/tristanmatthews/gst-plugins-good/sys'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Users/tristanmatthews/gst-plugins-good'
make: *** [all] Error 2
Comment 1 Benjamin Otte (Company) 2010-03-23 07:30:53 UTC
I applied the patch to get the code compiling again, but we need a proper fix for the aggregate return warning, so I'm leaving this open.
We shouldn't use -Waggregate-return for Objective C, but there is no OBJCFLAGS in our configure machinery. I see 3 options but am not sure about which are best:
1) Remove -Waggregate-return from the CFLAGS
2) Use the CXXFLAGS, they don't include that warning
3) Add OBJCFLAGS

Opinions?
Comment 2 Tristan Matthews 2010-03-23 07:33:27 UTC
OBJCFLAGS seems like "the right thing", it was the first thing i looked for when i patched this.
Comment 3 Tim-Philipp Müller 2010-03-23 08:38:09 UTC
What's the point of -Waggregate-return? (I understand what it does, but I don't understand why that needs to be avoided/warned about)
Comment 4 Benjamin Otte (Company) 2010-03-23 15:25:16 UTC
I always used it to ensure consistency - All GNOME/GStreamer code avoids aggregate retuns so it's always been good idea.
And I assumed the gcc developers had a good reason to add it (You don't want to add warnings that are useless) but all I could find so far were issues with compilers and platforms that were probably last used in the last century.

So there's definitely no very good reason for this warning.
Comment 5 Tim-Philipp Müller 2010-04-09 11:49:17 UTC
Marking as blocker, should do something about this for the release.

I guess we can pretty much assume that the compiler will be gcc on OSX, can't we? In which case hard-coding -Wno-aggregate-return would seem ok as quickfix.

Or we could just remove that warning in configure..
Comment 6 Benjamin Otte (Company) 2010-04-09 13:36:52 UTC
Sooner or later people will start compiling with llvm/clang, but until that happens, we can probably keep the current hardcoded -Wno-aggregate-return.
Comment 7 Tim-Philipp Müller 2010-04-12 23:20:55 UTC
commit f30f907c37c86df0e24fc96d4b43a3d8f4acdc23
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Tue Apr 13 00:14:46 2010 +0100

    configure: also remove -Waggregate-return from warning flags
    
    It causes problems with Objective-C code like in osxvideosink.
    
    Fixes #613663.