Index: ChangeLog =================================================================== RCS file: /cvs/ecos/ecos/packages/io/fileio/current/ChangeLog,v retrieving revision 1.59 diff -u -r1.59 ChangeLog --- ChangeLog 7 Jun 2005 10:07:04 -0000 1.59 +++ ChangeLog 3 Aug 2005 21:04:57 -0000 @@ -1,3 +1,10 @@ +2005-08-02 Andrew Lunn + + * tests/socket.c (SHOW_RESULT): Add a cast to avoid compiler + warnings about the format string not matching the parameters. + * tests/testfs.c: rename strcmp and strcpy to mystrcmp and + mystrcpy to avoid clashes with the normal implementations. + 2005-05-13 Peter Korsgaard * src/devfs.cxx (dev_stat, dev_fo_fstat): Corrected mode for block Index: tests/socket.c =================================================================== RCS file: /cvs/ecos/ecos/packages/io/fileio/current/tests/socket.c,v retrieving revision 1.6 diff -u -r1.6 socket.c --- tests/socket.c 26 May 2005 14:19:48 -0000 1.6 +++ tests/socket.c 3 Aug 2005 21:04:57 -0000 @@ -101,7 +101,7 @@ //-------------------------------------------------------------------------- #define SHOW_RESULT( _fn, _res ) \ -diag_printf(#_fn " returned %d %s\n", _res, _res<0?strerror(errno):""); +diag_printf(#_fn " returned %d %s\n", (int) _res, _res<0?strerror(errno):""); //-------------------------------------------------------------------------- // Thread stack. Index: tests/testfs.c =================================================================== RCS file: /cvs/ecos/ecos/packages/io/fileio/current/tests/testfs.c,v retrieving revision 1.5 diff -u -r1.5 testfs.c --- tests/testfs.c 27 Mar 2005 17:36:28 -0000 1.5 +++ tests/testfs.c 3 Aug 2005 21:04:59 -0000 @@ -257,7 +257,7 @@ // ------------------------------------------------------------------------- // Local strcmp() and strcpy() -static int strcmp( const char *s1, const char *s2 ) +static int mystrcmp( const char *s1, const char *s2 ) { while( *s1 == *s2 && *s1 != '\0' && *s2 != '\0' ) s1++, s2++; @@ -265,7 +265,7 @@ return (*s2)-(*s1); } -static char *strcpy( char *s1, const char *s2 ) +static char *mystrcpy( char *s1, const char *s2 ) { char *s = s1; while( (*s1++ = *s2++) != 0); @@ -325,7 +325,7 @@ if( n == NULL ) continue; - if( strcmp( name, n->name ) == 0 ) + if( mystrcmp( name, n->name ) == 0 ) { nd1 = n; break; @@ -448,7 +448,7 @@ root->next = root; // form circular list root->parent = root; // I'm my own parent! root->refcnt = 1; // don't want to ever lose root - strcpy( root->name, "root"); + mystrcpy( root->name, "root"); root->status.st_mode = __stat_mode_DIR; root->status.st_ino = root-&node[0]; root->status.st_dev = 0; @@ -529,7 +529,7 @@ // Fill in details nd->parent = parent; nd->refcnt = 1; // 1 for directory reference - strcpy( nd->name, name); + mystrcpy( nd->name, name); nd->status.st_mode = __stat_mode_REG; nd->status.st_ino = nd-&node[0]; nd->status.st_dev = 0; @@ -647,7 +647,7 @@ // Fill in details nd->parent = parent; nd->refcnt = 1; // 1 for directory reference - strcpy( nd->name, name); + mystrcpy( nd->name, name); nd->status.st_mode = __stat_mode_DIR; nd->status.st_ino = nd-&node[0]; nd->status.st_dev = 0; @@ -762,7 +762,7 @@ nd1->parent = parent2; // And give it a new name. - strcpy( nd1->name, name2 ); + mystrcpy( nd1->name, name2 ); return err; } @@ -1121,7 +1121,7 @@ if( nd->u.dir.nodes[pos] != NULL ) { struct dirent *ent = (struct dirent *)buf; - strcpy( ent->d_name, nd->u.dir.nodes[pos]->name ); + mystrcpy( ent->d_name, nd->u.dir.nodes[pos]->name ); uio->uio_resid -= sizeof(struct dirent); break; }