[gnio: 2/7] Don't cast gssize to int, use G_GSSIZE_FORMAT



commit 22bb6ec314e93771ad84dd0f6cb82ce3b0933e29
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Tue Mar 24 10:35:21 2009 +0000

    Don't cast gssize to int, use G_GSSIZE_FORMAT
---
 examples/client.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/client.c b/examples/client.c
index 158a34f..39b67b5 100644
--- a/examples/client.c
+++ b/examples/client.c
@@ -25,14 +25,14 @@ ready (GObject *obj,
 
   bytes = g_input_stream_read (input, buffer, sizeof buffer, NULL, NULL);
   buffer[bytes] = '\0';
-  g_print ("%d bytes read: %s\n", (int)bytes, buffer);
+  g_print ("%"G_GSSIZE_FORMAT" bytes read: %s\n", bytes, buffer);
 
 
   g_output_stream_write (output, "a starttls\n", 11, NULL, NULL);
 
   bytes = g_input_stream_read (input, buffer, sizeof buffer, NULL, NULL);
   buffer[bytes] = '\0';
-  g_print ("%d bytes read: %s\n", (int)bytes, buffer);
+  g_print ("%"G_GSSIZE_FORMAT" bytes read: %s\n", bytes, buffer);
 
   sess = g_object_new (G_TYPE_TLS_SESSION, "base-stream", connection, NULL);
   tcon = g_tls_session_handshake (sess, NULL, &error);
@@ -49,7 +49,7 @@ ready (GObject *obj,
   bytes = g_input_stream_read (input, buffer, sizeof buffer, NULL, NULL);
 
   buffer[bytes] = '\0';
-  g_print ("%d bytes read: %s\n", (int)bytes, buffer);
+  g_print ("%"G_GSSIZE_FORMAT" bytes read: %s\n", bytes, buffer);
 }
 
 int
@@ -82,7 +82,7 @@ main (void)
                                    sizeof buffer,
                                    NULL, NULL);
 
-      g_print ("%d bytes read\n",(int) bytes);
+      g_print ("%"G_GSSIZE_FORMAT" bytes read\n", bytes);
     }
 }
 



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