[glade] Marked glade_http_request_send_async() as a G_GNUC_PRINTF() function. Fixed compile warning.
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Marked glade_http_request_send_async() as a G_GNUC_PRINTF() function. Fixed compile warning.
- Date: Wed, 16 Apr 2014 23:49:57 +0000 (UTC)
commit b66e15a50b00ca2f5af05f5ae227c4b10e78adf9
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 cdefd3e..9990b3c 100644
--- a/src/glade-registration.c
+++ b/src/glade-registration.c
@@ -163,6 +163,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;
@@ -268,7 +274,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]