glib r6423 - in trunk/gio: . tests



Author: alexl
Date: Wed Jan 30 09:28:10 2008
New Revision: 6423
URL: http://svn.gnome.org/viewvc/glib?rev=6423&view=rev

Log:
2008-01-30  Alexander Larsson  <alexl redhat com>

        * tests/data-input-stream.c:
        * tests/data-output-stream.c:
	C89 fixes from Jens Granseuer (#512849)




Modified:
   trunk/gio/ChangeLog
   trunk/gio/tests/data-input-stream.c
   trunk/gio/tests/data-output-stream.c

Modified: trunk/gio/tests/data-input-stream.c
==============================================================================
--- trunk/gio/tests/data-input-stream.c	(original)
+++ trunk/gio/tests/data-input-stream.c	Wed Jan 30 09:28:10 2008
@@ -126,6 +126,7 @@
   GError *error = NULL;
   char *data;
   int line;
+  int i;
   
 #define REPEATS			10   //  number of rounds
 #define DATA_STRING		" part1 # part2 $ part3 % part4 ^"
@@ -136,7 +137,6 @@
   base_stream = g_memory_input_stream_new ();
   stream = G_INPUT_STREAM (g_data_input_stream_new (base_stream));
   
-  int i;
   for (i = 0; i < REPEATS; i++)
     g_memory_input_stream_add_data (G_MEMORY_INPUT_STREAM (base_stream), DATA_STRING, -1, NULL);
   

Modified: trunk/gio/tests/data-output-stream.c
==============================================================================
--- trunk/gio/tests/data-output-stream.c	(original)
+++ trunk/gio/tests/data-output-stream.c	Wed Jan 30 09:28:10 2008
@@ -38,7 +38,8 @@
   gpointer data;
   char *lines;
   int i;
-  
+  int size;
+
 #define TEST_STRING	"some_text"
   
   const char* endl[4] = {"\n", "\r", "\r\n", "\n"};
@@ -70,7 +71,7 @@
   g_assert_cmpint (g_data_output_stream_get_byte_order (G_DATA_OUTPUT_STREAM (stream)), ==, G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN);
   
   /*  compare data */
-  int size = strlen(data);
+  size = strlen(data);
   g_assert_cmpint (size, <, MAX_LINES_BUFF);
   g_assert_cmpstr ((char*)data, ==, lines);
   
@@ -252,12 +253,12 @@
 {
   GRand *rand;
   gpointer buffer;
+  int i;
   
   rand = g_rand_new ();
   buffer = g_malloc0(MAX_BYTES_BINARY);
   
   /*  Fill in some random data */
-  int i;
   for (i = 0; i < MAX_BYTES_BINARY; i++)
     {
       guchar x = 0;



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