All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] git gst-plugins compiler warning fixes
@ 2016-02-10 22:05 Andre McCurdy
  2016-02-10 22:05 ` [PATCH 1/2] gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning Andre McCurdy
  2016-02-10 22:05 ` [PATCH 2/2] gstreamer1.0-plugins-bad_git: fix gst_structure_get() etc compiler warnings Andre McCurdy
  0 siblings, 2 replies; 3+ messages in thread
From: Andre McCurdy @ 2016-02-10 22:05 UTC (permalink / raw)
  To: openembedded-core

Andre McCurdy (2):
  gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning
  gstreamer1.0-plugins-bad_git: fix gst_structure_get() etc compiler warnings

 ...valid-sentinels-for-gst_structure_get-etc.patch | 67 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-plugins-bad_git.bb      |  1 +
 ...sure-valid-sentinel-for-gst_structure_get.patch | 40 +++++++++++++
 .../gstreamer/gstreamer1.0-plugins-good_git.bb     |  1 +
 4 files changed, 109 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch

-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning
  2016-02-10 22:05 [PATCH 0/2] git gst-plugins compiler warning fixes Andre McCurdy
@ 2016-02-10 22:05 ` Andre McCurdy
  2016-02-10 22:05 ` [PATCH 2/2] gstreamer1.0-plugins-bad_git: fix gst_structure_get() etc compiler warnings Andre McCurdy
  1 sibling, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2016-02-10 22:05 UTC (permalink / raw)
  To: openembedded-core

 | ../../../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>
---
 ...sure-valid-sentinel-for-gst_structure_get.patch | 40 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-plugins-good_git.bb     |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
new file mode 100644
index 0000000..bc7ac0b
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
@@ -0,0 +1,40 @@
+From 2169f2205c0205a220d826d7573e5a863bd36e0a Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Feb 2016 14:00:00 -0800
+Subject: [PATCH] ensure valid sentinal for gst_structure_get()
+
+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.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ ext/taglib/gstid3v2mux.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc
+index 8651e77..a87234f 100644
+--- a/ext/taglib/gstid3v2mux.cc
++++ b/ext/taglib/gstid3v2mux.cc
+@@ -465,7 +465,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
+ 
+           if (info_struct) {
+             if (gst_structure_get (info_struct, "image-type",
+-                    GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) {
++                    GST_TYPE_TAG_IMAGE_TYPE, &image_type, (void *) NULL)) {
+               if (image_type > 0 && image_type <= 18) {
+                 image_type += 2;
+               } else {
+-- 
+1.9.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
index 915be73..56631a5 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -11,6 +11,7 @@ SRC_URI = " \
     git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
     file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
     file://avoid-including-sys-poll.h-directly.patch \
+    file://ensure-valid-sentinel-for-gst_structure_get.patch \
 "
 
 PV = "1.7.1+git${SRCPV}"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] gstreamer1.0-plugins-bad_git: fix gst_structure_get() etc compiler warnings
  2016-02-10 22:05 [PATCH 0/2] git gst-plugins compiler warning fixes Andre McCurdy
  2016-02-10 22:05 ` [PATCH 1/2] gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning Andre McCurdy
@ 2016-02-10 22:05 ` Andre McCurdy
  1 sibling, 0 replies; 3+ messages in thread
From: Andre McCurdy @ 2016-02-10 22:05 UTC (permalink / raw)
  To: openembedded-core

 | ../../../gst-plugins-bad-1.7.1/sys/decklink/gstdecklinkaudiosrc.cpp: In function 'gboolean gst_decklink_audio_src_set_caps(GstBaseSrc*, GstCaps*)':
 | ../../../gst-plugins-bad-1.7.1/sys/decklink/gstdecklinkaudiosrc.cpp:315:59: error: missing sentinel in function call [-Werror=format=]
 |	    g_object_get (videosrc, "connection", &vconn, NULL);
 |							      ^
 | cc1plus: all warnings being treated as errors

For GStreamer functions declared with G_GNUC_NULL_TERMINATED,
ie __attribute__((__sentinel__)), 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 callers to such functions within gst-plugins-bad use the C NULL
definition (ie ((void*)0)), which is a valid sentinel.

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

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 ...valid-sentinels-for-gst_structure_get-etc.patch | 67 ++++++++++++++++++++++
 .../gstreamer/gstreamer1.0-plugins-bad_git.bb      |  1 +
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
new file mode 100644
index 0000000..8ccaaa0
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -0,0 +1,67 @@
+From 3164f23cd6ae338d0e423fccb4e11539cd220e2f Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Feb 2016 14:00:00 -0800
+Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc
+
+For GStreamer functions declared with G_GNUC_NULL_TERMINATED,
+ie __attribute__((__sentinel__)), 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 callers to such functions within gst-plugins-bad use the C NULL
+definition (ie ((void*)0)), which is a valid sentinel.
+
+However the C++ NULL definition (ie 0L), is not a valid sentinel
+without an explicit cast to a pointer type.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ sys/decklink/gstdecklink.cpp          | 2 +-
+ sys/decklink/gstdecklinkaudiosrc.cpp  | 2 +-
+ sys/decklink/gstdecklinkvideosink.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
+index c0d1128..6f2ef75 100644
+--- a/sys/decklink/gstdecklink.cpp
++++ b/sys/decklink/gstdecklink.cpp
+@@ -328,7 +328,7 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e)
+       "interlace-mode", G_TYPE_STRING,
+       mode->interlaced ? "interleaved" : "progressive", "pixel-aspect-ratio",
+       GST_TYPE_FRACTION, mode->par_n, mode->par_d, "colorimetry", G_TYPE_STRING,
+-      mode->colorimetry, "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
++      mode->colorimetry, "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL);
+ }
+ 
+ GstCaps *
+diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
+index e5ac8ae..a153851 100644
+--- a/sys/decklink/gstdecklinkaudiosrc.cpp
++++ b/sys/decklink/gstdecklinkaudiosrc.cpp
+@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+       g_mutex_unlock (&self->input->lock);
+ 
+       if (videosrc) {
+-        g_object_get (videosrc, "connection", &vconn, NULL);
++        g_object_get (videosrc, "connection", &vconn, (void *) NULL);
+         gst_object_unref (videosrc);
+ 
+         switch (vconn) {
+diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
+index 7111cb1..b958fda 100644
+--- a/sys/decklink/gstdecklinkvideosink.cpp
++++ b/sys/decklink/gstdecklinkvideosink.cpp
+@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
+     gpointer user_data)
+ {
+   gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
+-      G_MAXINT, 1, NULL);
++      G_MAXINT, 1, (void *) NULL);
+ 
+   return TRUE;
+ }
+-- 
+1.9.1
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
index 0ebf622..f5b2d70 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
@@ -13,6 +13,7 @@ SRC_URI = " \
     file://configure-allow-to-disable-libssh2.patch \
     file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
     file://avoid-including-sys-poll.h-directly.patch \
+    file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
 "
 
 PV = "1.7.1+git${SRCPV}"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-10 22:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-10 22:05 [PATCH 0/2] git gst-plugins compiler warning fixes Andre McCurdy
2016-02-10 22:05 ` [PATCH 1/2] gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning Andre McCurdy
2016-02-10 22:05 ` [PATCH 2/2] gstreamer1.0-plugins-bad_git: fix gst_structure_get() etc compiler warnings Andre McCurdy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.