Bug 967927 - Fix Clang build warning in gstreamer. r=eflores
☠☠ backed out by 5612a5999be3 ☠ ☠
authorAlex Xu <alex_y_xu@yahoo.ca>
Mon, 24 Feb 2014 10:22:59 -0500
changeset 170552 d22ac63d67f134fbaf49686ecd5c6754c58078f9
parent 170551 926a5f6d263c5eff796dec916ed65a1ba6e17a34
child 170553 9058ac74ec2839d134036156536e382d142acb3c
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 clang diagnostic push
+#pragma clang 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 clang 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 clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
 G_DEFINE_TYPE(GstMozVideoBuffer, gst_moz_video_buffer, GST_TYPE_BUFFER);
+#pragma clang 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);