Skip to content
Browse files

Fix LLVM compiler errors related to K&R declarations with ANSI protot…

…ypes.

Submitted by:	Pawel Worach <pawel.worach@gmail.com>
  • Loading branch information...
1 parent cc6d3f6 commit 96b52610815af4f3df898fb27cce6588bdda9322 @EdSchouten EdSchouten committed
View
12 usr.sbin/makefs/ffs/ufs_bswap.h
@@ -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));
}
View
43 usr.sbin/pppd/cbcp.c
@@ -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");
View
2 usr.sbin/timed/timed/Makefile
@@ -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>
View
10 usr.sbin/timed/timed/networkdelta.c
@@ -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 */
View
2 usr.sbin/timed/timedc/Makefile
@@ -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>
View
13 usr.sbin/trpt/trpt.c
@@ -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;

0 comments on commit 96b5261

Please sign in to comment.
Something went wrong with that request. Please try again.