less warnings
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@908 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -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;
|
||||
|
@@ -660,8 +660,6 @@ cmd
|
||||
rcmd
|
||||
: RNFR check_login_no_guest SP pathname CRLF
|
||||
{
|
||||
char *renamefrom();
|
||||
|
||||
restart_point = (off_t) 0;
|
||||
if ($2 && $4) {
|
||||
fromname = renamefrom($4);
|
||||
@@ -699,8 +697,6 @@ host_port
|
||||
: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA
|
||||
NUMBER COMMA NUMBER
|
||||
{
|
||||
char *a;
|
||||
|
||||
data_dest.sin_family = AF_INET;
|
||||
data_dest.sin_port = htons($9 * 256 + $11);
|
||||
data_dest.sin_addr.s_addr =
|
||||
|
@@ -370,7 +370,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
#ifdef IP_TOS
|
||||
tos = IPTOS_LOWDELAY;
|
||||
if (setsockopt(0, IPPROTO_IP, IP_TOS, (char *)&tos, sizeof(int)) < 0)
|
||||
if (setsockopt(0, IPPROTO_IP, IP_TOS, (void *)&tos, sizeof(int)) < 0)
|
||||
syslog(LOG_WARNING, "setsockopt (IP_TOS): %m");
|
||||
#endif
|
||||
data_source.sin_port = htons(ntohs(ctrl_addr.sin_port) - 1);
|
||||
@@ -383,14 +383,14 @@ main(int argc, char **argv)
|
||||
/* (void) freopen(_PATH_DEVNULL, "w", stderr); */
|
||||
signal(SIGPIPE, lostconn);
|
||||
signal(SIGCHLD, SIG_IGN);
|
||||
if ((int)signal(SIGURG, myoob) < 0)
|
||||
if (signal(SIGURG, myoob) == SIG_ERR)
|
||||
syslog(LOG_ERR, "signal: %m");
|
||||
|
||||
auth_init();
|
||||
|
||||
/* Try to handle urgent data inline */
|
||||
#ifdef SO_OOBINLINE
|
||||
if (setsockopt(0, SOL_SOCKET, SO_OOBINLINE, (char *)&on,
|
||||
if (setsockopt(0, SOL_SOCKET, SO_OOBINLINE, (void *)&on,
|
||||
sizeof(on)) < 0)
|
||||
syslog(LOG_ERR, "setsockopt: %m");
|
||||
#endif
|
||||
@@ -822,7 +822,7 @@ set_buffer_size(int fd, int read)
|
||||
size_t size = 1048576;
|
||||
while(size >= 131072 &&
|
||||
setsockopt(fd, SOL_SOCKET, read ? SO_RCVBUF : SO_SNDBUF,
|
||||
(char*)&size, sizeof(size)) < 0)
|
||||
(void *)&size, sizeof(size)) < 0)
|
||||
size /= 2;
|
||||
#endif
|
||||
}
|
||||
@@ -1056,7 +1056,7 @@ getdatasock(char *mode)
|
||||
if (s < 0)
|
||||
goto bad;
|
||||
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
|
||||
(char *) &on, sizeof(on)) < 0)
|
||||
(void *) &on, sizeof(on)) < 0)
|
||||
goto bad;
|
||||
/* anchor socket to avoid multi-homing problems */
|
||||
data_source.sin_family = AF_INET;
|
||||
@@ -1072,7 +1072,7 @@ getdatasock(char *mode)
|
||||
(void) seteuid((uid_t)pw->pw_uid);
|
||||
#ifdef IP_TOS
|
||||
on = IPTOS_THROUGHPUT;
|
||||
if (setsockopt(s, IPPROTO_IP, IP_TOS, (char *)&on, sizeof(int)) < 0)
|
||||
if (setsockopt(s, IPPROTO_IP, IP_TOS, (void *)&on, sizeof(int)) < 0)
|
||||
syslog(LOG_WARNING, "setsockopt (IP_TOS): %m");
|
||||
#endif
|
||||
return (fdopen(s, mode));
|
||||
@@ -1113,7 +1113,7 @@ dataconn(char *name, off_t size, char *mode)
|
||||
pdata = s;
|
||||
#ifdef IP_TOS
|
||||
tos = IPTOS_THROUGHPUT;
|
||||
(void) setsockopt(s, IPPROTO_IP, IP_TOS, (char *)&tos,
|
||||
(void) setsockopt(s, IPPROTO_IP, IP_TOS, (void *)&tos,
|
||||
sizeof(int));
|
||||
#endif
|
||||
reply(150, "Opening %s mode data connection for '%s'%s.",
|
||||
|
@@ -41,9 +41,15 @@
|
||||
RCSID("$Id$");
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_h
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
@@ -54,6 +60,7 @@ RCSID("$Id$");
|
||||
#include "base64.h"
|
||||
#include "extern.h"
|
||||
#include "auth.h"
|
||||
#include "krb4.h"
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
|
@@ -193,13 +193,13 @@ connect_host (char *host, des_cblock *key, des_key_schedule schedule,
|
||||
return -1;
|
||||
}
|
||||
sscanf (tmp, "%u", &display_num);
|
||||
if (krb_net_read (s, xauthfile, sizeof(xauthfile)) != sizeof(xauthfile)) {
|
||||
if (krb_net_read (s, xauthfile, xauthfile_size) != xauthfile_size) {
|
||||
fprintf (stderr, "%s: read: %s\n", prog,
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(key, &cred.session, sizeof(des_cblock));
|
||||
memcpy(key, cred.session, sizeof(des_cblock));
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ doit (char *host, int passivep, int debugp, int tcpp)
|
||||
tcpp ? &rendez_vous2 : NULL);
|
||||
if (display_num < 0)
|
||||
return 1;
|
||||
strncpy(xauthfile, tempnam("/tmp", NULL), sizeof(xauthfile));
|
||||
strncpy(xauthfile, tempnam("/tmp", NULL), xauthfile_size);
|
||||
if (create_and_write_cookie (xauthfile, cookie, cookie_len))
|
||||
return 1;
|
||||
|
||||
|
@@ -71,7 +71,7 @@ fatal (int fd, char *s)
|
||||
}
|
||||
|
||||
static void
|
||||
cleanup()
|
||||
cleanup(void)
|
||||
{
|
||||
if(xauthfile[0])
|
||||
unlink(xauthfile);
|
||||
@@ -202,7 +202,7 @@ doit_conn (int fd, struct sockaddr_in *thataddr,
|
||||
*/
|
||||
|
||||
static int
|
||||
check_user_console ()
|
||||
check_user_console (void)
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
@@ -320,7 +320,7 @@ doit(int sock, int tcpp)
|
||||
}
|
||||
|
||||
static void
|
||||
usage ()
|
||||
usage (void)
|
||||
{
|
||||
fprintf (stderr, "Usage: %s [-i] [-t]\n", prog);
|
||||
exit (1);
|
||||
|
@@ -43,7 +43,7 @@ RCSID("$Id$");
|
||||
char *prog;
|
||||
|
||||
static void
|
||||
usage ()
|
||||
usage (void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Usage: %s [-h] [-r] [-s] [-n count] [-f alg] num seed\n",
|
||||
|
@@ -173,32 +173,6 @@ typedef enum { /* POP processing states */
|
||||
bad happened */
|
||||
} state;
|
||||
|
||||
typedef struct { /* State information for
|
||||
each POP command */
|
||||
state ValidCurrentState; /* The operating state of
|
||||
the command */
|
||||
char * command; /* The POP command */
|
||||
int min_parms; /* Minimum number of parms
|
||||
for the command */
|
||||
int max_parms; /* Maximum number of parms
|
||||
for the command */
|
||||
int (*function) (); /* The function that process
|
||||
the command */
|
||||
state result[2]; /* The resulting state after
|
||||
command processing */
|
||||
#define success_state result[0] /* State when a command
|
||||
succeeds */
|
||||
} state_table;
|
||||
|
||||
typedef struct { /* Table of extensions */
|
||||
char * subcommand; /* The POP XTND subcommand */
|
||||
int min_parms; /* Minimum number of parms for
|
||||
the subcommand */
|
||||
int max_parms; /* Maximum number of parms for
|
||||
the subcommand */
|
||||
int (*function) (); /* The function that processes
|
||||
the subcommand */
|
||||
} xtnd_table;
|
||||
|
||||
typedef struct { /* Message information */
|
||||
int number; /* Message number relative to
|
||||
@@ -264,6 +238,33 @@ typedef struct { /* POP parameter block */
|
||||
#endif
|
||||
} POP;
|
||||
|
||||
typedef struct { /* State information for
|
||||
each POP command */
|
||||
state ValidCurrentState; /* The operating state of
|
||||
the command */
|
||||
char * command; /* The POP command */
|
||||
int min_parms; /* Minimum number of parms
|
||||
for the command */
|
||||
int max_parms; /* Maximum number of parms
|
||||
for the command */
|
||||
int (*function) (); /* The function that process
|
||||
the command */
|
||||
state result[2]; /* The resulting state after
|
||||
command processing */
|
||||
#define success_state result[0] /* State when a command
|
||||
succeeds */
|
||||
} state_table;
|
||||
|
||||
typedef struct { /* Table of extensions */
|
||||
char * subcommand; /* The POP XTND subcommand */
|
||||
int min_parms; /* Minimum number of parms for
|
||||
the subcommand */
|
||||
int max_parms; /* Maximum number of parms for
|
||||
the subcommand */
|
||||
int (*function) (); /* The function that processes
|
||||
the subcommand */
|
||||
} xtnd_table;
|
||||
|
||||
int pop_dele(POP *p);
|
||||
int pop_dropcopy(POP *p, struct passwd *pwp);
|
||||
int pop_dropinfo(POP *p);
|
||||
|
@@ -241,7 +241,7 @@ static void talk(int force_erase);
|
||||
static unsigned long look(void);
|
||||
|
||||
static int
|
||||
zrefresh()
|
||||
zrefresh(void)
|
||||
{
|
||||
switch (fork()) {
|
||||
case -1:
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -44,7 +44,7 @@ RCSID("$Id$");
|
||||
#include "otp_locl.h"
|
||||
|
||||
void *
|
||||
otp_db_open ()
|
||||
otp_db_open (void)
|
||||
{
|
||||
int lock;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -41,6 +41,8 @@
|
||||
RCSID("$Id$");
|
||||
#endif
|
||||
|
||||
#include "roken.h"
|
||||
|
||||
int
|
||||
strnlen(char *s, int len)
|
||||
{
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user