[librest/gwagner/deprecated: 14/14] tests: fix warnings




commit 025e53c313850501500048cbc3c44d80a4f8cbec
Author: Günther Wagner <info gunibert de>
Date:   Wed Jan 12 20:04:33 2022 +0100

    tests: fix warnings

 rest/rest-oauth2-proxy-call.c |  3 +--
 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");


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