less warnings

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@908 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-10-27 23:52:16 +00:00
parent 75340efd5a
commit b5852d51fe
17 changed files with 80 additions and 55 deletions

View File

@@ -573,7 +573,7 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
* and dirent.h as taking pointers to differently typed opaque
* structures.
*/
struct dirent *(*readdirfunc)();
struct dirent *(*readdirfunc)(void *);
*pathend = EOS;
errno = 0;
@@ -595,7 +595,7 @@ glob3(Char *pathbuf, Char *pathend, Char *pattern, Char *restpattern,
if (pglob->gl_flags & GLOB_ALTDIRFUNC)
readdirfunc = pglob->gl_readdir;
else
readdirfunc = readdir;
readdirfunc = (struct dirent *(*)(void *))readdir;
while ((dp = (*readdirfunc)(dirp))) {
register u_char *sc;
register Char *dc;

View File

@@ -43,8 +43,12 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include "protos.h"
@@ -83,6 +87,10 @@ SigAction signal(int iSig, SigAction pAction); /* BSD compatible */
#endif
#endif
#ifndef SIG_ERR
#define SIG_ERR ((RETSIGTYPE (*)())-1)
#endif
#if !defined(HAVE_STRERROR) && !defined(strerror)
char *strerror(int eno);
#endif

View File

@@ -43,8 +43,12 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include "protos.h"
@@ -83,6 +87,10 @@ SigAction signal(int iSig, SigAction pAction); /* BSD compatible */
#endif
#endif
#ifndef SIG_ERR
#define SIG_ERR ((RETSIGTYPE (*)())-1)
#endif
#if !defined(HAVE_STRERROR) && !defined(strerror)
char *strerror(int eno);
#endif

View File

@@ -41,6 +41,8 @@
RCSID("$Id$");
#endif
#include "roken.h"
int
strnlen(char *s, int len)
{

View File

@@ -42,7 +42,10 @@ RCSID("$Id$");
#endif
#include <time.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include "roken.h"
time_t
tm2time (struct tm tm, int local)