[gst-cvs] gst-plugins-bad: opencv: avoid 'unused' compiler warnings with inline functions in opencv headers

Tim Müller tpm at kemper.freedesktop.org
Thu Sep 9 08:05:20 PDT 2010


Module: gst-plugins-bad
Branch: master
Commit: 41b9b76fa53c890ed674aa46890b5335edafe602
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=41b9b76fa53c890ed674aa46890b5335edafe602

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Thu Sep  9 11:07:47 2010 +0100

opencv: avoid 'unused' compiler warnings with inline functions in opencv headers

Override CV_INLINE to avoid 'unused' gcc warnings. GLib will take care of defining
'inline' sufficiently and OpenCV's define isn't good enough to avoid 'unused'
compiler warnings (at least in version 2.1.0).

---

 ext/opencv/Makefile.am |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ext/opencv/Makefile.am b/ext/opencv/Makefile.am
index 954db8f..feed68e 100644
--- a/ext/opencv/Makefile.am
+++ b/ext/opencv/Makefile.am
@@ -20,8 +20,11 @@ libgstopencv_la_SOURCES = gstopencv.c \
 
 # flags used to compile this facedetect
 # add other _CFLAGS and _LIBS as needed
+#
+# override CV_INLINE: GLib will take care of defining 'inline' sufficiently and
+# OpenCV's define isn't good enough to avoid 'unused' gcc warnings (at v2.1.0)
 libgstopencv_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(OPENCV_CFLAGS) \
-			$(GST_PLUGINS_BASE_CFLAGS)
+	$(GST_PLUGINS_BASE_CFLAGS) -DCV_INLINE="static inline"
 
 libgstopencv_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \
 			$(GSTPB_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR)





More information about the Gstreamer-commits mailing list