[libepc] Fix several compiler warnings



commit 689421aa5c35871d3dd125734419076fe8b4e45d
Author: David King <davidk openismus com>
Date:   Tue Mar 23 12:14:13 2010 +0100

    Fix several compiler warnings
    
    * libepc/publisher.c:
    * examples/lookup-resource.c:
    * examples/consumer-ui.c: Use G_GSIZE_FORMAT for a gsize parameter in
    printf format strings.
    
    * libepc/tls.c: Use gsize* as third parameter to g_file_get_contents().
    
    * examples/publisher-ui.c: Add prototypes for GtkBuilder callbacks.

 ChangeLog                  |   13 +++++++++++++
 examples/consumer-ui.c     |    2 +-
 examples/lookup-resource.c |    2 +-
 examples/publisher-ui.c    |   11 +++++++++++
 libepc/publisher.c         |    2 +-
 libepc/tls.c               |    4 ++--
 6 files changed, 29 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f9b81dd..e56e21a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2010-03-23  David King  <davidk openismus com>
 
+	Fix several compiler warnings
+
+	* libepc/publisher.c:
+	* examples/lookup-resource.c:
+	* examples/consumer-ui.c: Use G_GSIZE_FORMAT for a gsize parameter in
+	printf format strings.
+
+	* libepc/tls.c: Use gsize* as third parameter to g_file_get_contents().
+
+	* examples/publisher-ui.c: Add prototypes for GtkBuilder callbacks.
+
+2010-03-23  David King  <davidk openismus com>
+
 	Modernise autotools configuration
 
 	* configure.ac: Require autoconf 2.63 and automake 1.10.3. Change bug
diff --git a/examples/consumer-ui.c b/examples/consumer-ui.c
index 7fbe615..66d15f5 100644
--- a/examples/consumer-ui.c
+++ b/examples/consumer-ui.c
@@ -81,7 +81,7 @@ keys_combo_changed_cb (GtkComboBox *combo_box,
       /* display the resource content */
 
       markup = g_markup_printf_escaped (
-        "Length of <b>%s</b>: %d %s", key, length,
+        "Length of <b>%s</b>: %" G_GSIZE_FORMAT " %s", key, length,
         ngettext ("byte", "bytes", length));
 
       gtk_text_buffer_set_text (buffer, value, length);
diff --git a/examples/lookup-resource.c b/examples/lookup-resource.c
index 2dbe64e..5eacf29 100644
--- a/examples/lookup-resource.c
+++ b/examples/lookup-resource.c
@@ -23,7 +23,7 @@ lookup (EpcConsumer *consumer,
   /* print the retreived value */
 
   if (value)
-    g_print ("%s\n%d byte(s)\n", value, length);
+    g_print ("%s\n%" G_GSIZE_FORMAT " byte(s)\n", value, length);
   else
     g_print ("%s: %s\n", key, error->message);
 
diff --git a/examples/publisher-ui.c b/examples/publisher-ui.c
index 14e8892..314938d 100644
--- a/examples/publisher-ui.c
+++ b/examples/publisher-ui.c
@@ -37,6 +37,17 @@ static guint auto_save_id = 0;
 static GtkBuilder *builder = NULL;
 static GtkWidget *item_view = NULL;
 
+void about_button_clicked_cb (GtkWidget *widget);
+void add_item_clicked_cb (void);
+void remove_item_clicked_cb (void);
+void username_changed_cb (GtkEntry *entry);
+void password_changed_cb (GtkEntry *entry);
+void bookmark_changed_cb (GtkEntry *entry);
+void service_name_changed_cb (GtkEntry *entry);
+void publish_state_toggled_cb (GtkToggleToolButton *button);
+void encryption_state_toggled_cb (GtkToggleToolButton *button);
+void main_window_destroy_cb (void);
+
 static EpcDemoItem*
 epc_demo_item_new (const gchar *name,
                    const gchar *text)
diff --git a/libepc/publisher.c b/libepc/publisher.c
index 6baaf30..df0b169 100644
--- a/libepc/publisher.c
+++ b/libepc/publisher.c
@@ -372,7 +372,7 @@ epc_publisher_chunk_cb (SoupMessage *message,
   if (chunk && length)
     {
       if (EPC_DEBUG_LEVEL (1))
-        g_debug ("%s: writing %d bytes", G_STRLOC, length);
+        g_debug ("%s: writing %" G_GSIZE_FORMAT " bytes", G_STRLOC, length);
 
 #ifdef HAVE_LIBSOUP22
       soup_message_add_chunk (message, SOUP_MEMORY_COPY, chunk, length);
diff --git a/libepc/tls.c b/libepc/tls.c
index c4518b4..8796c02 100644
--- a/libepc/tls.c
+++ b/libepc/tls.c
@@ -226,7 +226,7 @@ epc_tls_private_key_load (const gchar *filename,
 
   g_return_val_if_fail (NULL != filename, NULL);
 
-  if (g_file_get_contents (filename, &contents, &buffer.size, error))
+  if (g_file_get_contents (filename, &contents, (gsize*) &buffer.size, error))
     {
       if (EPC_DEBUG_LEVEL (1))
         g_debug ("%s: Loading private key `%s'", G_STRLOC, filename);
@@ -452,7 +452,7 @@ epc_tls_certificate_load (const gchar *filename,
 
   g_return_val_if_fail (NULL != filename, NULL);
 
-  if (g_file_get_contents (filename, &contents, &buffer.size, error))
+  if (g_file_get_contents (filename, &contents, (gsize*) &buffer.size, error))
     {
       if (EPC_DEBUG_LEVEL (1))
         g_debug ("%s: Loading server certificate `%s'", G_STRLOC, filename);



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