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

@@ -48,7 +48,7 @@ RCSID("$Id$");
#include <sha.h>
int
md4_tests ()
md4_tests (void)
{
struct test {
char *str;
@@ -90,7 +90,7 @@ md4_tests ()
}
int
md5_tests ()
md5_tests (void)
{
struct test {
char *str;
@@ -124,7 +124,7 @@ md5_tests ()
}
int
sha_tests ()
sha_tests (void)
{
struct test {
char *str;
@@ -158,7 +158,7 @@ sha_tests ()
}
int
main ()
main (void)
{
return md4_tests() + md5_tests() + sha_tests();
}

View File

@@ -81,7 +81,7 @@ int otp_challenge (OtpContext *ctx, char *user, char *str, size_t len);
int otp_verify_user (OtpContext *ctx, char *passwd);
int otp_verify_user_1 (OtpContext *ctx, char *passwd);
void *otp_db_open ();
void *otp_db_open (void);
void otp_db_close (void *);
int otp_put (void *, OtpContext *ctx);
int otp_get (void *, OtpContext *ctx);

View File

@@ -44,7 +44,7 @@ RCSID("$Id$");
#include "otp_locl.h"
void *
otp_db_open ()
otp_db_open (void)
{
int lock;

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)