[totem] build: Fix compile-time warnings related to mime-types



commit cfda44db905f7fb2839ac3208cb152c4b7d41164
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 7 01:54:35 2013 +0100

    build: Fix compile-time warnings related to mime-types

 data/mime-type-include.sh   |    7 ++++++-
 src/totem-audio-preview.c   |    2 ++
 src/totem-object.c          |    1 +
 src/totem-properties-main.c |    1 +
 src/totem-uri.c             |    3 +++
 5 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/data/mime-type-include.sh b/data/mime-type-include.sh
index 36eb4d0..27b84bb 100755
--- a/data/mime-type-include.sh
+++ b/data/mime-type-include.sh
@@ -26,6 +26,7 @@ fi
 MIMETYPES=`grep -v '^#' $1 | grep -v x-content/ | grep -v x-scheme-handler/`
 
 echo "/* generated with mime-types-include.sh, don't edit */"
+echo "#ifdef WANT_MIME_TYPES"
 echo "static const gchar *mime_types[] = {"
 
 for i in $MIMETYPES ; do
@@ -34,9 +35,11 @@ done
 
 echo "NULL"
 echo "};"
+echo "#endif"
 
 get_audio_mimetypes $1;
 
+echo "#ifdef WANT_AUDIO_MIME_TYPES"
 echo "static const gchar *audio_mime_types[] = {"
 for i in $MIMETYPES ; do
        echo_mime;
@@ -44,9 +47,11 @@ done
 
 echo "NULL"
 echo "};"
+echo "#endif"
 
 get_video_mimetypes $1;
 
+echo "#ifdef WANT_VIDEO_MIME_TYPES"
 echo "static const gchar *video_mime_types[] = {"
 for i in $MIMETYPES ; do
        echo_mime;
@@ -54,4 +59,4 @@ done
 
 echo "NULL"
 echo "};"
-
+echo "#endif"
diff --git a/src/totem-audio-preview.c b/src/totem-audio-preview.c
index ee80bbf..219fc19 100644
--- a/src/totem-audio-preview.c
+++ b/src/totem-audio-preview.c
@@ -39,6 +39,8 @@
 
 #include "totem-gst-helpers.h"
 #include "totem-resources.h"
+#define WANT_MIME_TYPES 1
+#define WANT_AUDIO_MIME_TYPES 1
 #include "totem-mime-types.h"
 
 static gboolean show_mimetype = FALSE;
diff --git a/src/totem-object.c b/src/totem-object.c
index 824b86a..4ccc3e8 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -63,6 +63,7 @@
 #include "totem-dnd-menu.h"
 #include "totem-preferences.h"
 
+#define WANT_MIME_TYPES 1
 #include "totem-mime-types.h"
 #include "totem-uri-schemes.h"
 
diff --git a/src/totem-properties-main.c b/src/totem-properties-main.c
index 7d6a948..4b61917 100644
--- a/src/totem-properties-main.c
+++ b/src/totem-properties-main.c
@@ -34,6 +34,7 @@
 #include <libnautilus-extension/nautilus-extension-types.h>
 #include <libnautilus-extension/nautilus-property-page-provider.h>
 
+#define WANT_MIME_TYPES 1
 #include "totem-mime-types.h"
 
 static GType tpp_type = 0;
diff --git a/src/totem-uri.c b/src/totem-uri.c
index d293a50..0a59c03 100644
--- a/src/totem-uri.c
+++ b/src/totem-uri.c
@@ -30,6 +30,9 @@
 #include <unistd.h>
 #include <gio/gio.h>
 
+#define WANT_MIME_TYPES 1
+#define WANT_AUDIO_MIME_TYPES 1
+#define WANT_VIDEO_MIME_TYPES 1
 #include "totem-mime-types.h"
 #include "totem-uri.h"
 #include "totem-private.h"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]