Bug 967927 - Fix Clang build warning in gstreamer. r=eflores
authorAlex Xu <alex_y_xu@yahoo.ca>
Tue, 25 Feb 2014 08:40:54 -0500
changeset 170704 cc15ce931273d9aee9139490ca6b781ae4533c3f
parent 170703 0cea4bded6f8088096f07adbe26802b560559337
child 170705 b629a1dfd431259bbd1df621906858c2c477df6e
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewerseflores
bugs967927
milestone30.0a1
Bug 967927 - Fix Clang build warning in gstreamer. r=eflores
content/media/gstreamer/GStreamerAllocator.cpp
content/media/gstreamer/GStreamerMozVideoBuffer.cpp
--- a/content/media/gstreamer/GStreamerAllocator.cpp
+++ b/content/media/gstreamer/GStreamerAllocator.cpp
@@ -41,18 +41,22 @@ typedef struct
   GstVideoBufferPoolClass parent_class;
 } MozGfxBufferPoolClass;
 
 typedef struct
 {
   GstVideoBufferPool pool;
 } MozGfxBufferPool;
 
+// working around GTK+ bug https://bugzilla.gnome.org/show_bug.cgi?id=723899
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
 G_DEFINE_TYPE(MozGfxMemoryAllocator, moz_gfx_memory_allocator, GST_TYPE_ALLOCATOR);
 G_DEFINE_TYPE(MozGfxBufferPool, moz_gfx_buffer_pool, GST_TYPE_VIDEO_BUFFER_POOL);
+#pragma GCC diagnostic pop
 
 void
 moz_gfx_memory_reset(MozGfxMemory *mem)
 {
   if (mem->image)
     mem->image->Release();
 
   ImageContainer* container = ((MozGfxMemoryAllocator*) mem->memory.allocator)->reader->GetImageContainer();
--- a/content/media/gstreamer/GStreamerMozVideoBuffer.cpp
+++ b/content/media/gstreamer/GStreamerMozVideoBuffer.cpp
@@ -9,17 +9,21 @@
 #include "GStreamerMozVideoBuffer.h"
 #include "ImageContainer.h"
 
 namespace mozilla {
 
 static GstMozVideoBuffer *gst_moz_video_buffer_copy(GstMozVideoBuffer* self);
 static void gst_moz_video_buffer_finalize(GstMozVideoBuffer* self);
 
+// working around GTK+ bug https://bugzilla.gnome.org/show_bug.cgi?id=723899
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-function"
 G_DEFINE_TYPE(GstMozVideoBuffer, gst_moz_video_buffer, GST_TYPE_BUFFER);
+#pragma GCC diagnostic pop
 
 static void
 gst_moz_video_buffer_class_init(GstMozVideoBufferClass* klass)
 {
   g_return_if_fail(GST_IS_MOZ_VIDEO_BUFFER_CLASS(klass));
 
   GstMiniObjectClass *mo_class = GST_MINI_OBJECT_CLASS(klass);