changeset 1929:8b0de8223f33

* tests/testfs.c: Fixed compiler warnigs for passing wrong types to diag_printf. * tests/fileio1.c: Ditto * tests/select.c: Ditto
author asl
date Sun, 27 Mar 2005 17:36:28 +0000
parents 5445c3413b0f
children 4f6bcb240e17
files packages/io/fileio/current/ChangeLog packages/io/fileio/current/tests/fileio1.c packages/io/fileio/current/tests/select.c packages/io/fileio/current/tests/testfs.c
diffstat 4 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/fileio/current/ChangeLog
+++ b/packages/io/fileio/current/ChangeLog
@@ -1,3 +1,11 @@
+2005-03-27  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* tests/testfs.c: Fixed compiler warnigs for passing wrong types
+	to diag_printf.
+	* tests/fileio1.c: Ditto
+	* tests/select.c: Ditto
+
+
 2005-02-24  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* include/fileio.h: Only include kapi.h when
--- a/packages/io/fileio/current/tests/fileio1.c
+++ b/packages/io/fileio/current/tests/fileio1.c
@@ -83,7 +83,7 @@
 //==========================================================================
 
 #define SHOW_RESULT( _fn, _res ) \
-diag_printf("<INFO>: " #_fn "() returned %d %s\n", _res, _res<0?strerror(errno):"");
+diag_printf("<INFO>: " #_fn "() returned %ld %s\n", (long)_res, _res<0?strerror(errno):"");
 
 //==========================================================================
 
@@ -133,7 +133,7 @@ static void listdir( char *name, int sta
             }
             else
             {
-                diag_printf(" [mode %08x nlink %d size %d]",
+                diag_printf(" [mode %08x nlink %d size %ld]",
                             sbuf.st_mode,sbuf.st_nlink,sbuf.st_size);
             }
         }
--- a/packages/io/fileio/current/tests/select.c
+++ b/packages/io/fileio/current/tests/select.c
@@ -104,7 +104,7 @@
 //--------------------------------------------------------------------------
 
 #define SHOW_RESULT( _fn, _res ) \
-diag_printf("INFO: " #_fn "() returned %d %s\n", _res, _res<0?strerror(errno):"");
+diag_printf("INFO: " #_fn "() returned %ld %s\n", (long)_res, _res<0?strerror(errno):"");
 
 //--------------------------------------------------------------------------
 // Thread stack.
--- a/packages/io/fileio/current/tests/testfs.c
+++ b/packages/io/fileio/current/tests/testfs.c
@@ -1166,7 +1166,8 @@ void testfs_dump(void)
         {
             // Regular file
             int j;
-            diag_printf("f %8s %4d |",nd->name,nd->status.st_size);
+            diag_printf("f %8s %4ld |",nd->name,
+                        (unsigned long)nd->status.st_size);
             for( j = 0; j < TESTFS_FILEBLOCKS; j++ )
             {
                 testfs_block *b = nd->u.file.data[j];
@@ -1174,7 +1175,8 @@ void testfs_dump(void)
                 {
                     if( j > 0 && (j%4) == 0 )
                         diag_printf(indent);
-                    diag_printf(" %3d[%3d,%3d]",b-block,b->pos,b->size);
+                    diag_printf(" %3d[%3ld,%3d]",b-block,
+                                (unsigned long)b->pos,b->size);
                     if( b->u.file != nd )
                     {
                         errors++;
@@ -1226,7 +1228,7 @@ void testfs_dump(void)
         {
             int j;
             testfs_node *nd = b->u.file;
-            diag_printf(" %3d %3d %d[%7s]",b->pos,b->size,nd-node,nd->name);
+            diag_printf(" %3ld %3d %d[%7s]",b->pos,b->size,nd-node,nd->name);
             for( j = 0; j < TESTFS_FILEBLOCKS; j++ )
             {
                 if( nd->u.file.data[j] == b )