[gupnp-tools] Disable deprecation warning



commit 8d1aa2437a8dcda43707f508e0e1142d9a074eb0
Author: Jens Georg <mail jensge org>
Date:   Fri Dec 21 13:28:41 2012 +0100

    Disable deprecation warning

 src/av-cp/main.c              |    2 ++
 src/discover/gssdp-discover.c |    2 ++
 src/universal-cp/main.c       |    2 ++
 src/upload/main.c             |    4 ++--
 4 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/av-cp/main.c b/src/av-cp/main.c
index 67c458c..b8b1fc0 100644
--- a/src/av-cp/main.c
+++ b/src/av-cp/main.c
@@ -106,7 +106,9 @@ on_context_available (GUPnPContextManager *context_manager,
 static gboolean
 init_upnp (void)
 {
+#if !GLIB_CHECK_VERSION(2, 35, 0)
         g_type_init ();
+#endif
 
         context_manager = gupnp_context_manager_new (NULL, 0);
         g_assert (context_manager != NULL);
diff --git a/src/discover/gssdp-discover.c b/src/discover/gssdp-discover.c
index 0aabe8c..e97c0fa 100644
--- a/src/discover/gssdp-discover.c
+++ b/src/discover/gssdp-discover.c
@@ -73,7 +73,9 @@ int main (int argc, char *argv[]) {
         GOptionContext *context;
         GSSDPDiscover discover;
 
+#if !GLIB_CHECK_VERSION(2, 35, 0)
         g_type_init ();
+#endif
 
         context = g_option_context_new ("- discover devices using SSDP");
         g_option_context_add_main_entries (context, entries, NULL);
diff --git a/src/universal-cp/main.c b/src/universal-cp/main.c
index 20edb63..a31c8ac 100644
--- a/src/universal-cp/main.c
+++ b/src/universal-cp/main.c
@@ -72,7 +72,9 @@ on_context_available (GUPnPContextManager *context_manager,
 static gboolean
 init_upnp (void)
 {
+#if !GLIB_CHECK_VERSION(2, 35, 0)
         g_type_init ();
+#endif
 
         context_manager = gupnp_context_manager_new (NULL, 0);
         g_assert (context_manager != NULL);
diff --git a/src/upload/main.c b/src/upload/main.c
index 6381c79..ca6a816 100644
--- a/src/upload/main.c
+++ b/src/upload/main.c
@@ -136,7 +136,9 @@ main (gint   argc,
         error = NULL;
         GOptionContext *context;
 
+#if !GLIB_CHECK_VERSION(2, 35, 0)
         g_type_init ();
+#endif
 
         context = g_option_context_new ("- Upload file to UPnP MediaServer");
         g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
@@ -169,8 +171,6 @@ main (gint   argc,
                 return -5;
         }
 
-        g_type_init ();
-
         error = NULL;
         upnp_context = gupnp_context_new (NULL, interface, 0, &error);
         if (error) {



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