diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-25 15:12:08 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-25 15:12:08 +0000 |
commit | 8ed7d0a645ea55ae58fed83a61149697aa306c37 (patch) | |
tree | bbf48817140e31ede60ff464e2109c4edeca4717 /testsuites/psxtests/psxreaddir | |
parent | 1293540857b0a2b9ed205e7bd9ab49db9a127caa (diff) |
2011-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxreaddir/test.c: Remove bogus casts.
Fix fprintf format strings.
Diffstat (limited to 'testsuites/psxtests/psxreaddir')
-rw-r--r-- | testsuites/psxtests/psxreaddir/test.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c index c6df81205d..e3b30822c9 100644 --- a/testsuites/psxtests/psxreaddir/test.c +++ b/testsuites/psxtests/psxreaddir/test.c @@ -65,8 +65,8 @@ void printdir( DIR *directory ) d = readdir(directory); while (d) { - printf( "%-20s %8d %8d %6d 0x%04x\n", - d->d_name, (int)d->d_ino, (int)d->d_off, d->d_reclen, d->d_type ); + printf( "%-20s %8ld %8" PRIdoff_t " %6d 0x%04x\n", + d->d_name, d->d_ino, d->d_off, d->d_reclen, d->d_type ); d = readdir(directory); } @@ -420,15 +420,15 @@ int main( printf( "\nSeek directory\n" ); printf( "telldir() should report only sizeof(struct dirent) increments \n" ); - printf( "in position. Sizeof(struct dirent): %ld\n", - (unsigned long) sizeof(struct dirent) ); + printf( "in position. Sizeof(struct dirent): %zd\n", + sizeof(struct dirent) ); rewinddir( directory ); for( off=0 ; off<=200 ; off=off + sizeof(struct dirent) / 4 ) { seekdir( directory, off ); printf( - "seeked to %2d -- currently at %2d\n", - (int)off, - (int)telldir(directory) + "seeked to %2" PRIdoff_t " -- currently at %2ld\n", + off, + telldir(directory) ); } |