mtd/fs/jffs2/ecos/tests jffs2_1.c, 1.1, 1.2 jffs2_2.c, 1.1, 1.2 jffs2_3.c, 1.1, 1.2

lunn at infradead.org lunn at infradead.org
Sat Jul 30 11:25:49 EDT 2005


Update of /home/cvs/mtd/fs/jffs2/ecos/tests
In directory phoenix.infradead.org:/tmp/cvs-serv8934/tests

Modified Files:
	jffs2_1.c jffs2_2.c jffs2_3.c 
Log Message:
Merge with eCos sources and clean up some compiler warnings.


Index: jffs2_1.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/tests/jffs2_1.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jffs2_1.c	15 Dec 2004 12:10:45 -0000	1.1
+++ jffs2_1.c	30 Jul 2005 15:25:46 -0000	1.2
@@ -94,7 +94,8 @@
 //==========================================================================
 
 #define SHOW_RESULT( _fn, _res ) \
-diag_printf("<FAIL>: " #_fn "() returned %d %s\n", _res, _res<0?strerror(errno):"");
+diag_printf("<FAIL>: " #_fn "() returned %ld %s\n",  \
+            (unsigned long)_res, _res<0?strerror(errno):"");
 
 //==========================================================================
 
@@ -163,8 +164,9 @@
             }
             else
             {
-                diag_printf(" [mode %08x ino %08x nlink %d size %d]",
-                            sbuf.st_mode,sbuf.st_ino,sbuf.st_nlink,sbuf.st_size);
+                diag_printf(" [mode %08x ino %08x nlink %d size %ld]",
+                            sbuf.st_mode,sbuf.st_ino,sbuf.st_nlink,
+                            (unsigned long) sbuf.st_size);
             }
         }
 
@@ -281,7 +283,8 @@
         for( i = 0; i < done; i++ )
             if( buf[i] != i%256 )
             {
-                diag_printf("buf[%d+%d](%02x) != %02x\n",pos,i,buf[i],i%256);
+                diag_printf("buf[%ld+%d](%02x) != %02x\n",
+                            (unsigned long)pos,i,buf[i],i%256);
                 CYG_TEST_FAIL("Data read not equal to data written\n");
             }
         

Index: jffs2_2.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/tests/jffs2_2.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jffs2_2.c	15 Dec 2004 12:10:45 -0000	1.1
+++ jffs2_2.c	30 Jul 2005 15:25:46 -0000	1.2
@@ -71,7 +71,8 @@
 //==========================================================================
 
 #define SHOW_RESULT( _fn, _res ) \
-diag_printf("FAIL: " #_fn "() returned %d %s\n", _res, _res<0?strerror(errno):"");
+diag_printf("FAIL: " #_fn "() returned %ld %s\n", \
+           (unsigned long)_res, _res<0?strerror(errno):"");
 
 //==========================================================================
 

Index: jffs2_3.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/tests/jffs2_3.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- jffs2_3.c	22 Jan 2005 16:56:23 -0000	1.1
+++ jffs2_3.c	30 Jul 2005 15:25:46 -0000	1.2
@@ -69,7 +69,7 @@
 
 #define SHOW_RESULT( _fn, _res ) \
 diag_printf("FAIL: " #_fn "() returned %d %s\n", _res, \
-            _res<0?strerror(errno):"");
+            (unsigned long) _res<0?strerror(errno):"");
 
 //==========================================================================
 // file creation, deletion and testing functions
@@ -91,7 +91,7 @@
   }
   
   buffer[0] = 0;
-  buffer[0] = cyg_posix_crc32((char *)buffer, sizeof(buffer));
+  buffer[0] = cyg_posix_crc32((unsigned char *)buffer, sizeof(buffer));
   
   err = write(fd, buffer, sizeof(buffer));
   if (err == -1) SHOW_RESULT( write, err );
@@ -129,7 +129,7 @@
   crc = buffer[0];
   buffer[0] = 0;
   
-  if (crc != cyg_posix_crc32((char *)buffer, sizeof(buffer))) {
+  if (crc != cyg_posix_crc32((unsigned char *)buffer, sizeof(buffer))) {
     CYG_TEST_FAIL("File corrupt");
   }
 
@@ -144,7 +144,6 @@
 int main( int argc, char **argv )
 {
     int err, iteration;
-    cyg_tick_count_t ticks;
     struct mallinfo minfo
 ;
     CYG_TEST_INIT();





More information about the linux-mtd-cvs mailing list