summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Pablo Ugarte <juanpablougarte@gmail.com>2014-04-16 20:19:40 -0300
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2014-04-16 20:49:30 -0300
commit21eb9583b70e07dab6f0cef68e77eb0d4dbab86e (patch)
tree2e98d9376cf373c93d4fe96c47fff0d4ece59477
parentf3f4420e9895d9952c4bfe539b38692eae324ebc (diff)
downloadglade-21eb9583b70e07dab6f0cef68e77eb0d4dbab86e.tar.gz
Marked glade_http_request_send_async() as a G_GNUC_PRINTF() function.
Fixed compile warning.
-rw-r--r--src/glade-http.c2
-rw-r--r--src/glade-http.h2
-rw-r--r--src/glade-registration.c8
3 files changed, 9 insertions, 3 deletions
diff --git a/src/glade-http.c b/src/glade-http.c
index 3e1a187a..e6453270 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 8eb4f0cf..05b450c1 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 0845a57a..22c76ddb 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 */