GNOME Bugzilla – Bug 656264
tag: no-return-in-nonvoid-function compiler warning gstxmptag.c:178
Last modified: 2011-08-10 10:28:24 UTC
While building gstreamer 0.11.0 on the Open Build Service (*target openSUSE Factory/12.1), The build aborts with: I: Program returns random data in a function E: gstreamer-plugins-base no-return-in-nonvoid-function gstxmptag.c:178 The raised compiler warning from the build log is: gstxmptag.c: In function 'xmp_tag_type_get_name': gstxmptag.c:178:1: warning: control reaches end of non-void function [-Wreturn-type] The code fragment in question: static const gchar * xmp_tag_type_get_name (GstXmpTagType tagtype) { switch (tagtype) { case GstXmpTagTypeSeq: return "rdf:Seq"; case GstXmpTagTypeBag: return "rdf:Bag"; default: g_assert_not_reached (); } } ==> Thus: the 'default' path does not have a return value for the function. I assume returning NULL might be safe/sufficient?
I fixed this yesterday actually, but failed to push the fix: commit 2d1ffa68a9970e3f67233bfbeeb5baf1ed913b53 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Aug 9 16:41:01 2011 +0100 xmptag: fix compiler warning in release mode Fix compiler warning caused by g_assert_not_reached() being skipped because releases are compiled with -DG_DISABLE_ASSERT. https://bugzilla.gnome.org/show_bug.cgi?id=656264 It shouldn't abort the build though, our release tarballs shouldn't be using -Werror (unless OBS makes it stop on compiler warnings),
The build itself does pass, but there is a BRP (Build Root Policy) check flagging packages based on this.