2003-06-12 Joel Sherrill <joel@OARcorp.com>

* psxchroot01/test.c, psxreaddir/test.c: Removed warnings.
This commit is contained in:
Joel Sherrill
2003-06-12 15:41:27 +00:00
parent 2ec764f84a
commit b9f0c834b2
2 changed files with 7 additions and 4 deletions

View File

@@ -28,6 +28,7 @@
#include <unistd.h>
#include <errno.h>
#include <rtems/libio.h>
#include <rtems/userenv.h>
#include <pmacros.h>
void touch( char *file )

View File

@@ -40,11 +40,13 @@ DIR *directory_not;
#define __P(args)()
#endif
/*
int scandir ( const char *dirname,
struct dirent *** namelist,
int (*select) __P((struct dirent *)),
int (*dcomp) __P((const void *, const void *))
int (*dcomp) __P((const struct dirent **, const struct dirent **))
);
*/
#if defined(__rtems__)
#define d_type d_reclen
@@ -168,13 +170,13 @@ int compare_ascending(const struct dirent **a, const struct dirent **b )
}
int compare_descending( struct dirent **a, struct dirent **b )
int compare_descending( const struct dirent **a, const struct dirent **b )
{
int i;
i = strcmp (
(char *)((struct dirent *)(*b)->d_name),
(char *)((struct dirent *)(*a)->d_name)
(char *)((const struct dirent *)(*b)->d_name),
(char *)((const struct dirent *)(*a)->d_name)
);
return i;