Fix LLVM compiler errors related to K&R declarations with ANSI prototypes.
Submitted by: Pawel Worach <pawel.worach@gmail.com>
This commit is contained in:
parent
1c3b754343
commit
a9d25ec695
@ -58,23 +58,17 @@ static __inline u_int32_t ufs_rw32 __P((u_int32_t, int));
|
||||
static __inline u_int64_t ufs_rw64 __P((u_int64_t, int));
|
||||
|
||||
static __inline u_int16_t
|
||||
ufs_rw16(a, ns)
|
||||
u_int16_t a;
|
||||
int ns;
|
||||
ufs_rw16(u_int16_t a, int ns)
|
||||
{
|
||||
return ((ns) ? bswap16(a) : (a));
|
||||
}
|
||||
static __inline u_int32_t
|
||||
ufs_rw32(a, ns)
|
||||
u_int32_t a;
|
||||
int ns;
|
||||
ufs_rw32(u_int32_t a, int ns)
|
||||
{
|
||||
return ((ns) ? bswap32(a) : (a));
|
||||
}
|
||||
static __inline u_int64_t
|
||||
ufs_rw64(a, ns)
|
||||
u_int64_t a;
|
||||
int ns;
|
||||
ufs_rw64(u_int64_t a, int ns)
|
||||
{
|
||||
return ((ns) ? bswap64(a) : (a));
|
||||
}
|
||||
|
@ -76,8 +76,7 @@ static void cbcp_send(cbcp_state *us, u_char code, u_char *buf, int len);
|
||||
|
||||
/* init state */
|
||||
static void
|
||||
cbcp_init(iface)
|
||||
int iface;
|
||||
cbcp_init(int iface)
|
||||
{
|
||||
cbcp_state *us;
|
||||
|
||||
@ -89,8 +88,7 @@ cbcp_init(iface)
|
||||
|
||||
/* lower layer is up */
|
||||
static void
|
||||
cbcp_lowerup(iface)
|
||||
int iface;
|
||||
cbcp_lowerup(int iface)
|
||||
{
|
||||
cbcp_state *us = &cbcp[iface];
|
||||
|
||||
@ -102,18 +100,14 @@ cbcp_lowerup(iface)
|
||||
}
|
||||
|
||||
static void
|
||||
cbcp_open(unit)
|
||||
int unit;
|
||||
cbcp_open(int unit)
|
||||
{
|
||||
syslog(LOG_DEBUG, "cbcp_open");
|
||||
}
|
||||
|
||||
/* process an incomming packet */
|
||||
static void
|
||||
cbcp_input(unit, inpacket, pktlen)
|
||||
int unit;
|
||||
u_char *inpacket;
|
||||
int pktlen;
|
||||
cbcp_input(int unit, u_char *inpacket, int pktlen)
|
||||
{
|
||||
u_char *inp;
|
||||
u_char code, id;
|
||||
@ -180,11 +174,8 @@ char *cbcp_optionnames[] = {
|
||||
|
||||
/* pretty print a packet */
|
||||
static int
|
||||
cbcp_printpkt(p, plen, printer, arg)
|
||||
u_char *p;
|
||||
int plen;
|
||||
void (*printer)(void *, char *, ...);
|
||||
void *arg;
|
||||
cbcp_printpkt(u_char *p, int plen, void (*printer)(void *, char *, ...),
|
||||
void *arg)
|
||||
{
|
||||
int code, opt, id, len, olen, delay;
|
||||
u_char *pstart;
|
||||
@ -258,10 +249,7 @@ cbcp_printpkt(p, plen, printer, arg)
|
||||
|
||||
/* received CBCP request */
|
||||
static void
|
||||
cbcp_recvreq(us, pckt, pcktlen)
|
||||
cbcp_state *us;
|
||||
char *pckt;
|
||||
int pcktlen;
|
||||
cbcp_recvreq(cbcp_state *us, char *pckt, int pcktlen)
|
||||
{
|
||||
u_char type, opt_len, delay, addr_type;
|
||||
char address[256];
|
||||
@ -313,8 +301,7 @@ cbcp_recvreq(us, pckt, pcktlen)
|
||||
}
|
||||
|
||||
static void
|
||||
cbcp_resp(us)
|
||||
cbcp_state *us;
|
||||
cbcp_resp(cbcp_state *us)
|
||||
{
|
||||
u_char cb_type;
|
||||
u_char buf[256];
|
||||
@ -363,11 +350,7 @@ cbcp_resp(us)
|
||||
}
|
||||
|
||||
static void
|
||||
cbcp_send(us, code, buf, len)
|
||||
cbcp_state *us;
|
||||
u_char code;
|
||||
u_char *buf;
|
||||
int len;
|
||||
cbcp_send(cbcp_state *us, u_char code, u_char *buf, int len)
|
||||
{
|
||||
u_char *outp;
|
||||
int outlen;
|
||||
@ -389,10 +372,7 @@ cbcp_send(us, code, buf, len)
|
||||
}
|
||||
|
||||
static void
|
||||
cbcp_recvack(us, pckt, len)
|
||||
cbcp_state *us;
|
||||
char *pckt;
|
||||
int len;
|
||||
cbcp_recvack(cbcp_state *us, char *pckt, int len)
|
||||
{
|
||||
u_char type, delay, addr_type;
|
||||
int opt_len;
|
||||
@ -424,8 +404,7 @@ extern int persist;
|
||||
|
||||
/* ok peer will do callback */
|
||||
static void
|
||||
cbcp_up(us)
|
||||
cbcp_state *us;
|
||||
cbcp_up(cbcp_state *us)
|
||||
{
|
||||
persist = 0;
|
||||
lcp_close(0, "Call me back, please");
|
||||
|
@ -11,5 +11,7 @@ SRCS= acksend.c candidate.c correct.c master.c networkdelta.c readmsg.c \
|
||||
DPADD= ${LIBUTIL}
|
||||
LDADD= -lutil
|
||||
|
||||
WARNS?= 1
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -152,11 +152,11 @@ networkdelta()
|
||||
* in <<Numerical Recipes>>.
|
||||
*/
|
||||
static long
|
||||
median(a, eps_ptr, x, xlim, gnuf)
|
||||
float a; /* initial guess for the median */
|
||||
float *eps_ptr; /* spacing near the median */
|
||||
long *x, *xlim; /* the data */
|
||||
unsigned int gnuf; /* good enough estimate */
|
||||
median(float a, float *eps_ptr, long *x, long *xlim, unsigned int gnuf)
|
||||
/* float a; */ /* initial guess for the median */
|
||||
/* float *eps_ptr; */ /* spacing near the median */
|
||||
/* long *x, *xlim; */ /* the data */
|
||||
/* unsigned int gnuf; */ /* good enough estimate */
|
||||
{
|
||||
long *xptr;
|
||||
float ap = LONG_MAX; /* bounds on the median */
|
||||
|
@ -9,5 +9,7 @@ SRCS= cmds.c cmdtab.c timedc.c byteorder.c measure.c cksum.c
|
||||
BINOWN= root
|
||||
BINMODE= 4555
|
||||
|
||||
WARNS?= 1
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -301,17 +301,8 @@ done: if (follow) {
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
tcp_trace(act, ostate, tp, family, ip, th, req)
|
||||
short act, ostate;
|
||||
struct tcpcb *tp;
|
||||
#ifdef INET6
|
||||
int family;
|
||||
#else
|
||||
int family __unused;
|
||||
#endif
|
||||
void *ip;
|
||||
struct tcphdr *th;
|
||||
int req;
|
||||
tcp_trace(short act, short ostate, struct tcpcb *tp, int family __unused,
|
||||
void *ip, struct tcphdr *th, int req)
|
||||
{
|
||||
tcp_seq seq, ack;
|
||||
int flags, len, win, timer;
|
||||
|
Loading…
Reference in New Issue
Block a user