Mercurial > nand-ecoscentric
changeset 1936:b58e464e09f8
* tests/jffs2_[123].c: Fixed compiler warnings for parameter
mismatch for diag_printf().
| author | asl |
|---|---|
| date | Sun, 27 Mar 2005 18:21:37 +0000 |
| parents | a2a0279312b0 |
| children | 105d86de5643 |
| files | packages/fs/jffs2/current/ChangeLog packages/fs/jffs2/current/tests/jffs2_1.c packages/fs/jffs2/current/tests/jffs2_2.c packages/fs/jffs2/current/tests/jffs2_3.c |
| diffstat | 4 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/fs/jffs2/current/ChangeLog +++ b/packages/fs/jffs2/current/ChangeLog @@ -1,3 +1,9 @@ +2005-03-27 Andrew Lunn <andrew.lunn@ascom.ch> + + * tests/jffs2_[123].c: Fixed compiler warnings for parameter + mismatch for diag_printf(). + + 2005-02-25 Andrew Lunn <andrew.lunn@ascom.ch> * src/fs-ecos.c (jffs2_truncate_file): Correctly truncate a file
--- a/packages/fs/jffs2/current/tests/jffs2_1.c +++ b/packages/fs/jffs2/current/tests/jffs2_1.c @@ -94,7 +94,8 @@ MTAB_ENTRY( jffs2_mte1, //========================================================================== #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 @@ static void listdir( char *name, int sta } 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 @@ static void checkfile( char *name ) 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"); }
--- a/packages/fs/jffs2/current/tests/jffs2_2.c +++ b/packages/fs/jffs2/current/tests/jffs2_2.c @@ -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):""); //==========================================================================
--- a/packages/fs/jffs2/current/tests/jffs2_3.c +++ b/packages/fs/jffs2/current/tests/jffs2_3.c @@ -68,8 +68,8 @@ #define NELEM(_x_) (sizeof(_x_)/sizeof(*(_x_))) #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", _res, \ + (unsigned long) _res<0?strerror(errno):""); //========================================================================== // file creation, deletion and testing functions
