diff options
author | Günther Wagner <info@gunibert.de> | 2022-01-12 20:04:33 +0100 |
---|---|---|
committer | Günther Wagner <info@gunibert.de> | 2022-01-12 20:04:33 +0100 |
commit | 025e53c313850501500048cbc3c44d80a4f8cbec (patch) | |
tree | e21e069019d003978fba09e127c979fbd0b7ebb2 | |
parent | b6b20dae6f06a3badc6be09532d735a375b62e19 (diff) | |
download | librest-025e53c313850501500048cbc3c44d80a4f8cbec.tar.gz |
tests: fix warnings
-rw-r--r-- | rest/rest-oauth2-proxy-call.c | 3 | ||||
-rw-r--r-- | tests/proxy.c | 18 |
2 files changed, 13 insertions, 8 deletions
diff --git a/rest/rest-oauth2-proxy-call.c b/rest/rest-oauth2-proxy-call.c index cbea6f5..88840b3 100644 --- a/rest/rest-oauth2-proxy-call.c +++ b/rest/rest-oauth2-proxy-call.c @@ -1,6 +1,6 @@ /* rest-oauth2-proxy-call.c * - * Copyright 2021 Günther Wagner <info@gunibert.de> + * Copyright 2021-2022 Günther Wagner <info@gunibert.de> * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, @@ -24,7 +24,6 @@ static gboolean rest_oauth2_proxy_call_prepare (RestProxyCall *call, GError **error) { - RestOAuth2ProxyCall *self = (RestOAuth2ProxyCall *)call; RestOAuth2Proxy *proxy = NULL; g_autoptr(GDateTime) now = NULL; GDateTime *expiration_date = NULL; diff --git a/tests/proxy.c b/tests/proxy.c index fc77869..a6d034a 100644 --- a/tests/proxy.c +++ b/tests/proxy.c @@ -174,8 +174,9 @@ server_callback (SoupServer *server, static void -ping_test (RestProxy *proxy) +ping_test (gconstpointer data) { + RestProxy *proxy = (RestProxy *)data; g_autoptr(RestProxyCall) call; GError *error = NULL; @@ -197,8 +198,9 @@ ping_test (RestProxy *proxy) } static void -echo_test (RestProxy *proxy) +echo_test (gconstpointer data) { + RestProxy *proxy = (RestProxy *)data; g_autoptr(RestProxyCall) call; GError *error = NULL; @@ -213,8 +215,9 @@ echo_test (RestProxy *proxy) } static void -reverse_test (RestProxy *proxy) +reverse_test (gconstpointer data) { + RestProxy *proxy = (RestProxy *)data; g_autoptr(RestProxyCall) call; GError *error = NULL; @@ -245,8 +248,9 @@ status_ok_test (RestProxy *proxy, guint status) } static void -status_test (RestProxy *proxy) +status_test (gconstpointer data) { + RestProxy *proxy = (RestProxy *)data; status_ok_test (proxy, SOUP_STATUS_OK); status_ok_test (proxy, SOUP_STATUS_NO_CONTENT); } @@ -268,8 +272,9 @@ status_error_test (RestProxy *proxy, guint status) } static void -status_test_error (RestProxy *proxy) +status_test_error (gconstpointer data) { + RestProxy *proxy = (RestProxy *)data; status_error_test (proxy, SOUP_STATUS_BAD_REQUEST); status_error_test (proxy, SOUP_STATUS_NOT_IMPLEMENTED); } @@ -288,8 +293,9 @@ test_status_ok (RestProxy *proxy, const char *function) } static void -test_user_agent (RestProxy *proxy) +test_user_agent (gconstpointer data) { + RestProxy *proxy = (RestProxy *)data; test_status_ok (proxy, "useragent/none"); rest_proxy_set_user_agent (proxy, "TestSuite-1.0"); test_status_ok (proxy, "useragent/testsuite"); |