Author: ed
Date: Thu Feb 26 20:59:05 2009
New Revision: 189090
URL: http://svn.freebsd.org/changeset/base/189090

Log:
  Fix LLVM compiler errors related to K&R declarations with ANSI prototypes.
  
  Submitted by: Pawel Worach <pawel.wor...@gmail.com>

Modified:
  head/usr.sbin/makefs/ffs/ufs_bswap.h
  head/usr.sbin/pppd/cbcp.c
  head/usr.sbin/timed/timed/Makefile
  head/usr.sbin/timed/timed/networkdelta.c
  head/usr.sbin/timed/timedc/Makefile
  head/usr.sbin/trpt/trpt.c

Modified: head/usr.sbin/makefs/ffs/ufs_bswap.h
==============================================================================
--- head/usr.sbin/makefs/ffs/ufs_bswap.h        Thu Feb 26 20:54:43 2009        
(r189089)
+++ head/usr.sbin/makefs/ffs/ufs_bswap.h        Thu Feb 26 20:59:05 2009        
(r189090)
@@ -58,23 +58,17 @@ static __inline u_int32_t ufs_rw32 __P((
 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));
 }

Modified: head/usr.sbin/pppd/cbcp.c
==============================================================================
--- head/usr.sbin/pppd/cbcp.c   Thu Feb 26 20:54:43 2009        (r189089)
+++ head/usr.sbin/pppd/cbcp.c   Thu Feb 26 20:59:05 2009        (r189090)
@@ -76,8 +76,7 @@ static void cbcp_send(cbcp_state *us, u_
 
 /* 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");

Modified: head/usr.sbin/timed/timed/Makefile
==============================================================================
--- head/usr.sbin/timed/timed/Makefile  Thu Feb 26 20:54:43 2009        
(r189089)
+++ head/usr.sbin/timed/timed/Makefile  Thu Feb 26 20:59:05 2009        
(r189090)
@@ -11,5 +11,7 @@ SRCS= acksend.c candidate.c correct.c ma
 DPADD= ${LIBUTIL}
 LDADD= -lutil
 
+WARNS?=        1
+
 .include "../../Makefile.inc"
 .include <bsd.prog.mk>

Modified: head/usr.sbin/timed/timed/networkdelta.c
==============================================================================
--- head/usr.sbin/timed/timed/networkdelta.c    Thu Feb 26 20:54:43 2009        
(r189089)
+++ head/usr.sbin/timed/timed/networkdelta.c    Thu Feb 26 20:59:05 2009        
(r189090)
@@ -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 */

Modified: head/usr.sbin/timed/timedc/Makefile
==============================================================================
--- head/usr.sbin/timed/timedc/Makefile Thu Feb 26 20:54:43 2009        
(r189089)
+++ head/usr.sbin/timed/timedc/Makefile Thu Feb 26 20:59:05 2009        
(r189090)
@@ -9,5 +9,7 @@ SRCS=   cmds.c cmdtab.c timedc.c byteorder
 BINOWN=        root
 BINMODE= 4555
 
+WARNS?=        1
+
 .include "../../Makefile.inc"
 .include <bsd.prog.mk>

Modified: head/usr.sbin/trpt/trpt.c
==============================================================================
--- head/usr.sbin/trpt/trpt.c   Thu Feb 26 20:54:43 2009        (r189089)
+++ head/usr.sbin/trpt/trpt.c   Thu Feb 26 20:59:05 2009        (r189090)
@@ -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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to