summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-09-02 13:47:09 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-09-03 10:23:44 +0200
commitc81d89c4f0d5f0458f4794125999014657ba0eb1 (patch)
tree8bf04d4487bfdfd0fad1b73c096bed09658998af /examples
parent19c5f952e9e30790795f3548c125e53392e8bb14 (diff)
downloadlibrest-c81d89c4f0d5f0458f4794125999014657ba0eb1.tar.gz
tests: Don't call g_type_init() on newer glib
This is deprecated and causes a compile warning https://bugzilla.gnome.org/show_bug.cgi?id=735921
Diffstat (limited to 'examples')
-rw-r--r--examples/continuous-twitter.c2
-rw-r--r--examples/dump-xml.c2
-rw-r--r--examples/get-fireeagle-location.c2
-rw-r--r--examples/get-flickr-favorites.c2
-rw-r--r--examples/lastfm-shout.c2
-rw-r--r--examples/post-twitter-media.c2
-rw-r--r--examples/post-twitter.c2
-rw-r--r--examples/test-raw.c2
-rw-r--r--examples/test-xml.c2
9 files changed, 18 insertions, 0 deletions
diff --git a/examples/continuous-twitter.c b/examples/continuous-twitter.c
index 712aa07..dc06bde 100644
--- a/examples/continuous-twitter.c
+++ b/examples/continuous-twitter.c
@@ -43,7 +43,9 @@ main (int argc, char **argv)
char pin[256];
GMainLoop *loop;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
loop = g_main_loop_new (NULL, FALSE);
diff --git a/examples/dump-xml.c b/examples/dump-xml.c
index f9ee2b1..f574cb5 100644
--- a/examples/dump-xml.c
+++ b/examples/dump-xml.c
@@ -94,7 +94,9 @@ main (int argc, char **argv)
return 1;
}
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
if (!g_file_get_contents (argv[1], &data, &length, &error)) {
g_printerr ("%s\n", error->message);
diff --git a/examples/get-fireeagle-location.c b/examples/get-fireeagle-location.c
index 664f264..101aa75 100644
--- a/examples/get-fireeagle-location.c
+++ b/examples/get-fireeagle-location.c
@@ -34,7 +34,9 @@ main (int argc, char **argv)
RestXmlParser *parser;
RestXmlNode *root, *node;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Create the proxy */
proxy = oauth_proxy_new (/* Consumer Key */
diff --git a/examples/get-flickr-favorites.c b/examples/get-flickr-favorites.c
index 956789b..59ca7d4 100644
--- a/examples/get-flickr-favorites.c
+++ b/examples/get-flickr-favorites.c
@@ -106,7 +106,9 @@ main (int argc, char **argv)
char *frob, *url;
const char *token;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
proxy = flickr_proxy_new ("cf4e02fc57240a9b07346ad26e291080", "cdfa2329cb206e50");
diff --git a/examples/lastfm-shout.c b/examples/lastfm-shout.c
index f1e5f69..02894a4 100644
--- a/examples/lastfm-shout.c
+++ b/examples/lastfm-shout.c
@@ -87,7 +87,9 @@ main (int argc, char **argv)
{ NULL }
};
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
context = g_option_context_new ("- send a shout to a Last.fm user");
g_option_context_add_main_entries (context, entries, NULL);
diff --git a/examples/post-twitter-media.c b/examples/post-twitter-media.c
index cfe118a..c4e2af3 100644
--- a/examples/post-twitter-media.c
+++ b/examples/post-twitter-media.c
@@ -33,7 +33,9 @@ main (int argc, char **argv)
GError *error = NULL;
char pin[256];
+#if !GLIB_CHECK_VERSION (2, 36 ,0)
g_type_init ();
+#endif
if (argc != 2) {
g_printerr ("$ post-twitter-media \"message\"\n");
diff --git a/examples/post-twitter.c b/examples/post-twitter.c
index 3f9cc73..061221f 100644
--- a/examples/post-twitter.c
+++ b/examples/post-twitter.c
@@ -31,7 +31,9 @@ main (int argc, char **argv)
GError *error = NULL;
char pin[256];
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
if (argc != 2) {
g_printerr ("$ post-twitter \"message\"\n");
diff --git a/examples/test-raw.c b/examples/test-raw.c
index ed8af75..ae9b016 100644
--- a/examples/test-raw.c
+++ b/examples/test-raw.c
@@ -47,7 +47,9 @@ main (gint argc, gchar **argv)
const gchar *payload;
gssize len;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
loop = g_main_loop_new (NULL, FALSE);
diff --git a/examples/test-xml.c b/examples/test-xml.c
index 5e81625..6e132f9 100644
--- a/examples/test-xml.c
+++ b/examples/test-xml.c
@@ -113,7 +113,9 @@ main (gint argc, gchar **argv)
RestProxyCall *call;
GMainLoop *loop;
+#if !GLIB_CHECK_VERSION (2, 36 ,0)
g_type_init ();
+#endif
loop = g_main_loop_new (NULL, FALSE);