summaryrefslogtreecommitdiff
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
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
-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
-rw-r--r--rest-extras/test-runner.c2
-rw-r--r--rest/test-runner.c2
-rw-r--r--tests/custom-serialize.c2
-rw-r--r--tests/flickr.c2
-rw-r--r--tests/lastfm.c2
-rw-r--r--tests/oauth-async.c2
-rw-r--r--tests/oauth.c2
-rw-r--r--tests/oauth2.c2
-rw-r--r--tests/proxy-continuous.c2
-rw-r--r--tests/proxy.c2
-rw-r--r--tests/threaded.c2
-rw-r--r--tests/xml.c2
21 files changed, 42 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);
diff --git a/rest-extras/test-runner.c b/rest-extras/test-runner.c
index 52ca1b1..1702e2c 100644
--- a/rest-extras/test-runner.c
+++ b/rest-extras/test-runner.c
@@ -26,7 +26,9 @@
int
main (int argc, char *argv[])
{
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
test_add ("/flickr/error", test_flickr_error);
diff --git a/rest/test-runner.c b/rest/test-runner.c
index 0baa243..2f51043 100644
--- a/rest/test-runner.c
+++ b/rest/test-runner.c
@@ -26,7 +26,9 @@
int
main (int argc, char *argv[])
{
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
g_test_init (&argc, &argv, NULL);
test_add ("/oauth/param-encoding", test_param_encoding);
diff --git a/tests/custom-serialize.c b/tests/custom-serialize.c
index c6b801f..c5443b7 100644
--- a/tests/custom-serialize.c
+++ b/tests/custom-serialize.c
@@ -125,7 +125,9 @@ main (int argc, char **argv)
int i;
GError *error;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
session = soup_session_sync_new ();
diff --git a/tests/flickr.c b/tests/flickr.c
index a34025e..1befe72 100644
--- a/tests/flickr.c
+++ b/tests/flickr.c
@@ -36,7 +36,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 = flickr_proxy_new (API_KEY, SHARED_SECRET);
diff --git a/tests/lastfm.c b/tests/lastfm.c
index ab86575..4b281ae 100644
--- a/tests/lastfm.c
+++ b/tests/lastfm.c
@@ -37,7 +37,9 @@ main (int argc, char **argv)
RestXmlParser *parser;
RestXmlNode *root, *u_node, *node;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Create the proxy */
proxy = lastfm_proxy_new (API_KEY, SECRET);
diff --git a/tests/oauth-async.c b/tests/oauth-async.c
index a258127..a8fcdbb 100644
--- a/tests/oauth-async.c
+++ b/tests/oauth-async.c
@@ -119,7 +119,9 @@ main (int argc, char **argv)
OAuthProxy *oproxy;
GError *error = NULL;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Install a timeout so that we don't hang or infinite loop */
g_timeout_add_seconds (10, on_timeout, NULL);
diff --git a/tests/oauth.c b/tests/oauth.c
index c1db284..639060d 100644
--- a/tests/oauth.c
+++ b/tests/oauth.c
@@ -33,7 +33,9 @@ main (int argc, char **argv)
RestProxyCall *call;
GError *error = NULL;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
/* Create the proxy */
proxy = oauth_proxy_new ("key", "secret",
diff --git a/tests/oauth2.c b/tests/oauth2.c
index f4819ff..7bb1561 100644
--- a/tests/oauth2.c
+++ b/tests/oauth2.c
@@ -47,7 +47,9 @@ test_extract_token ()
int
main (int argc, char **argv)
{
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
test_extract_token ();
diff --git a/tests/proxy-continuous.c b/tests/proxy-continuous.c
index 2141dab..a739fac 100644
--- a/tests/proxy-continuous.c
+++ b/tests/proxy-continuous.c
@@ -168,7 +168,9 @@ main (int argc, char **argv)
char *url;
RestProxy *proxy;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
loop = g_main_loop_new (NULL, FALSE);
session = soup_session_async_new ();
diff --git a/tests/proxy.c b/tests/proxy.c
index 6e630ff..36414de 100644
--- a/tests/proxy.c
+++ b/tests/proxy.c
@@ -283,7 +283,9 @@ main (int argc, char **argv)
char *url;
RestProxy *proxy;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
session = soup_session_async_new ();
diff --git a/tests/threaded.c b/tests/threaded.c
index a0f5f0e..6283c9c 100644
--- a/tests/threaded.c
+++ b/tests/threaded.c
@@ -85,7 +85,9 @@ main (int argc, char **argv)
char *url;
int i;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
session = soup_session_sync_new ();
diff --git a/tests/xml.c b/tests/xml.c
index 85af973..161b56e 100644
--- a/tests/xml.c
+++ b/tests/xml.c
@@ -33,7 +33,9 @@ main (int argc, char **argv)
RestXmlNode *root, *node;
char *xml;
+#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
+#endif
parser = rest_xml_parser_new ();