[librest/ebassi/small-fixes] Fix the declaration of the RestOAuth2Error quark function




commit 36782cc6fd738eb7efeb5dd523e5e1fb21c68499
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Aug 19 17:42:05 2022 +0100

    Fix the declaration of the RestOAuth2Error quark function
    
    The missing `void` breaks the strict prototypes warning.
    
    In C, a function with no arguments and a function with `void` as an
    argument are fundamentally different; the former can be called with any
    argument, while the latter can only be called with no arguments.
    
    Since rest_oauth2_error_quark() is defined with `void` by the
    G_DEFINE_QUARK macro, its declaration should be made to match.

 rest/rest-oauth2-proxy.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rest/rest-oauth2-proxy.h b/rest/rest-oauth2-proxy.h
index c63d33e..71651ca 100644
--- a/rest/rest-oauth2-proxy.h
+++ b/rest/rest-oauth2-proxy.h
@@ -42,8 +42,8 @@ typedef enum {
   REST_OAUTH2_ERROR_ACCESS_TOKEN_EXPIRED,
 } RestOAuth2Error;
 
-#define REST_OAUTH2_ERROR rest_oauth2_error_quark ()
-GQuark rest_oauth2_error_quark ();
+#define REST_OAUTH2_ERROR (rest_oauth2_error_quark())
+GQuark rest_oauth2_error_quark (void);
 
 RestOAuth2Proxy *rest_oauth2_proxy_new                         (const gchar          *authurl,
                                                                 const gchar          *tokenurl,


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