nightingale-media-player / nightingale-hacking

Working tree for the community fork of Songbird, Nightingale. If building, use the sb-trunk-oldxul (development) branch, with the tag 1.12.1 tag for stable, for now. The master-xul-9.0.1 branch is the current progress in building Nightingale with XULRunner 9 and builds, but is broken. All help in terms of patches and pull requests is welcome.
https://getnightingale.com
GNU General Public License v2.0
185 stars 41 forks source link

gcc W: missing sentinel in function call #373

Closed awissu closed 8 years ago

awissu commented 8 years ago

Hi! I get warnings after build: [ 1848s] I: Function call needs to pass NULL-pointer as last argument [ 1848s] E: nightingale missing-sentinel /home/abuild/rpmbuild/BUILD/nightingale-hacking-1.12.1+git.20151004.4e3f055/components/mediacore/gstreamer/src/sbGStreamerVideoTranscode.cpp:1358, 1367 See: https://build.opensuse.org/package/live_build_log/home:awissu:branches:home:awissu/nightingale/openSUSE_Leap_42.1/x86_64

freaktechnik commented 8 years ago

So I assume this is on OpenSUSE? Also, are you using the prebuilt deps, what gcc version are you using?

awissu commented 8 years ago

Also, are you using the prebuilt deps.. No. Here spec-file: https://build.opensuse.org/package/show/home:awissu:branches:home:awissu/nightingale

freaktechnik commented 8 years ago

The normal releases are (still) built against gstreamer0.10. The gstreamer-1.0 branch builds against gstreamer-1.0. EDIT: just checked the commit has (at least what I think is the commit hash) you build against, and it seems to be in the 1.0 branch.

awissu commented 8 years ago

I cloned a git repositories: git clone --branch gstreamer-1.0 https://github.com/nightingale-media-player/nightingale-hacking.git git clone --branch xul-192-new https://github.com/nightingale-media-player/nightingale-deps.git

freaktechnik commented 8 years ago

It seems according to the docs of gst, the last argument should indeed be null (this is linked from the docs of the called functions): http://gstreamer.freedesktop.org/data/doc/gstreamer/1.0/gstreamer/html/gstreamer-GstStructure.html#gst-structure-new. The lines in question are https://github.com/nightingale-media-player/nightingale-hacking/blob/gstreamer-1.0/components/mediacore/gstreamer/src/sbGStreamerVideoTranscode.cpp#L1358 and https://github.com/nightingale-media-player/nightingale-hacking/blob/gstreamer-1.0/components/mediacore/gstreamer/src/sbGStreamerVideoTranscode.cpp#L1367.

I am not sure about how rest arguments and all that work in C, so I'm not sure if it's just some compilers etc. that require the last argument to be NULL.

freaktechnik commented 8 years ago

It's funny - in older commits most of those varidic functions are actually NULL terminated. I'm running a testbuild with NULLs added to those two lines.

freaktechnik commented 8 years ago

Okay, I've pushed a patch that adds the NULLs to the argument list. It still compiles for me, but it always has, so all it says, is that nothing got broken.

awissu commented 8 years ago

Ok. Fixed.