[glade/glade-3-18] Marked glade_http_request_send_async() as a G_GNUC_PRINTF() function. Fixed compile warning.



commit 21eb9583b70e07dab6f0cef68e77eb0d4dbab86e
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Wed Apr 16 20:19:40 2014 -0300

    Marked glade_http_request_send_async() as a G_GNUC_PRINTF() function.
    Fixed compile warning.

 src/glade-http.c         |    2 +-
 src/glade-http.h         |    2 +-
 src/glade-registration.c |    8 +++++++-
 3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/glade-http.c b/src/glade-http.c
index 3e1a187..e645327 100644
--- a/src/glade-http.c
+++ b/src/glade-http.c
@@ -377,7 +377,7 @@ glade_http_get_host (GladeHTTP *http)
 gint
 glade_http_get_port (GladeHTTP *http)
 {
-  g_return_val_if_fail (GLADE_IS_HTTP (http), NULL);
+  g_return_val_if_fail (GLADE_IS_HTTP (http), 0);
   return http->priv->port;
 }
 
diff --git a/src/glade-http.h b/src/glade-http.h
index 8eb4f0c..05b450c 100644
--- a/src/glade-http.h
+++ b/src/glade-http.h
@@ -82,7 +82,7 @@ gint         glade_http_get_port         (GladeHTTP    *http);
 void         glade_http_request_send_async (GladeHTTP    *http,
                                             GCancellable *cancellable,
                                             const gchar  *format,
-                                            ...);
+                                            ...) G_GNUC_PRINTF (3, 4);
 G_END_DECLS
 
 #endif /* _GLADE_HTTP_H_ */
diff --git a/src/glade-registration.c b/src/glade-registration.c
index 0845a57..22c76dd 100644
--- a/src/glade-registration.c
+++ b/src/glade-registration.c
@@ -153,6 +153,12 @@ static void
 glade_registration_show_message (GladeRegistration *registration,
                                  GtkMessageType     type,
                                  const gchar       *format,
+                                 ...) G_GNUC_PRINTF (3, 4);
+
+static void
+glade_registration_show_message (GladeRegistration *registration,
+                                 GtkMessageType     type,
+                                 const gchar       *format,
                                  ...)
 {
   GladeRegistrationPrivate *priv = registration->priv;
@@ -258,7 +264,7 @@ glade_registration_http_post (GladeRegistration *registration,
                                  "Accept: text/plain\r\n"
                                  "Accept-Language: %s\r\n"
                                  "Content-Type: application/x-www-form-urlencoded\r\n"
-                                 "Content-Length: %d\r\n"
+                                 "Content-Length: %"G_GSIZE_FORMAT"\r\n"
                                  "\r\n%s",
                                  url,                                                       /* POST url */
                                  glade_http_get_host (http),                                /* Host */


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