summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoss Burton <ross@linux.intel.com>2009-10-12 13:42:32 +0100
committerRoss Burton <ross@linux.intel.com>2009-10-12 13:42:32 +0100
commit18bce68c8e54032f2d7e78a8484ac892ba3ebd5a (patch)
treedc4ca333f70c5a5031949c151216278f8aa210bd /tests
parent1c50ef35392b06a187b252d1976e662af3e7f6be (diff)
downloadlibrest-18bce68c8e54032f2d7e78a8484ac892ba3ebd5a.tar.gz
Fix compile warnings with const error
Diffstat (limited to 'tests')
-rw-r--r--tests/oauth-async.c26
-rw-r--r--tests/threaded.c2
2 files changed, 15 insertions, 13 deletions
diff --git a/tests/oauth-async.c b/tests/oauth-async.c
index 330d2f8..51c8546 100644
--- a/tests/oauth-async.c
+++ b/tests/oauth-async.c
@@ -63,13 +63,13 @@ make_calls (OAuthProxy *oproxy)
}
static void
-access_token_cb (OAuthProxy *proxy,
- GError *error,
- GObject *weak_object,
- gpointer user_data)
+access_token_cb (OAuthProxy *proxy,
+ const GError *error,
+ GObject *weak_object,
+ gpointer user_data)
{
OAuthProxyPrivate *priv = PROXY_GET_PRIVATE (proxy);
- g_assert_no_error (error);
+ g_assert_no_error ((GError *)error);
g_assert_cmpstr (priv->token, ==, "accesskey");
g_assert_cmpstr (priv->token_secret, ==, "accesssecret");
@@ -78,21 +78,23 @@ access_token_cb (OAuthProxy *proxy,
}
static void
-request_token_cb (OAuthProxy *proxy,
- GError *error,
- GObject *weak_object,
- gpointer user_data)
+request_token_cb (OAuthProxy *proxy,
+ const GError *error,
+ GObject *weak_object,
+ gpointer user_data)
{
OAuthProxyPrivate *priv = PROXY_GET_PRIVATE (proxy);
- g_assert_no_error (error);
+ GError *err = NULL;
+
+ g_assert_no_error ((GError *)error);
g_assert_cmpstr (priv->token, ==, "requestkey");
g_assert_cmpstr (priv->token_secret, ==, "requestsecret");
/* Second stage authentication, this gets an access token */
oauth_proxy_access_token_async (proxy, "access_token.php", NULL,
- access_token_cb, NULL, NULL, &error);
- g_assert_no_error (error);
+ access_token_cb, NULL, NULL, &err);
+ g_assert_no_error (err);
}
int
diff --git a/tests/threaded.c b/tests/threaded.c
index ea086e4..1bc050e 100644
--- a/tests/threaded.c
+++ b/tests/threaded.c
@@ -90,7 +90,7 @@ main (int argc, char **argv)
server = soup_server_new (NULL);
soup_server_add_handler (server, NULL, server_callback, NULL, NULL);
- g_thread_create (soup_server_run, server, FALSE, NULL);
+ g_thread_create ((GThreadFunc)soup_server_run, server, FALSE, NULL);
url = g_strdup_printf ("http://127.0.0.1:%d/", soup_server_get_port (server));