]> code.ossystems Code Review - openembedded-core.git/commit
gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning
authorAndre McCurdy <armccurdy@gmail.com>
Wed, 10 Feb 2016 22:05:36 +0000 (14:05 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Feb 2016 22:32:17 +0000 (22:32 +0000)
commit91c4b8278da274a8bc1213b7cd51a1a372f218d3
tree3d42e201838671f970c921182acff2c0588e98c9
parent1348fe26a182330475ca163e87205dc162fb3f6a
gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning

 | ../../../gst-plugins-good-1.7.1/ext/taglib/gstid3v2mux.cc: In function 'void add_image_tag(TagLib::ID3v2::Tag*, const GstTagList*, const gchar*, guint, const gchar*)':
 | ../../../gst-plugins-good-1.7.1/ext/taglib/gstid3v2mux.cc:468:63: error: missing sentinel in function call [-Werror=format=]
 | GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) {
 |   ^
 | cc1plus: all warnings being treated as errors

gst_structure_get() is declared with G_GNUC_NULL_TERMINATED, ie
__attribute__((__sentinel__)), which means gcc will generate a
warning if the last parameter passed to the function is not NULL
(where a valid NULL in this context is defined as zero with any
pointer type).

The C code callers to gst_structure_get() within gst-plugins-good
use the C NULL definition (ie ((void*)0)), which is a valid sentinel.

However gstid3v2mux.cc uses the C++ NULL definition (ie 0L), which
is not a valid sentinel without an explicit cast to a pointer type.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch [new file with mode: 0644]
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb