bin/140078: route(8) increase to WARNS=3

Ulrich Spörlein uqs at spoerlein.net
Thu Oct 29 11:30:06 UTC 2009


>Number:         140078
>Category:       bin
>Synopsis:       route(8) increase to WARNS=3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 29 11:30:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spörlein
>Release:        FreeBSD 9.0-CURRENT i386
>Organization:
>Environment:
	
>Description:
- Fixes taken from DragonflyBSD
>How-To-Repeat:
	
>Fix:

	

--- route.diff begins here ---
diff -r 4e35b87f9d20 -r 603a0689809d sbin/route/Makefile
--- a/sbin/route/Makefile	Wed Oct 28 20:19:29 2009 +0100
+++ b/sbin/route/Makefile	Thu Oct 29 12:23:33 2009 +0100
@@ -6,7 +6,7 @@
 PROG=	route
 MAN=	route.8
 SRCS=	route.c keywords.h
-WARNS?=	0
+WARNS?=	3
 CLEANFILES+=keywords.h _keywords.tmp
 
 CFLAGS+= -DNS
diff -r 4e35b87f9d20 -r 603a0689809d sbin/route/route.c
--- a/sbin/route/route.c	Wed Oct 28 20:19:29 2009 +0100
+++ b/sbin/route/route.c	Thu Oct 29 12:23:33 2009 +0100
@@ -125,7 +125,7 @@
 void	set_metric(char *, int);
 void	sockaddr(char *, struct sockaddr *);
 void	sodump(sup, char *);
-extern	char *iso_ntoa();
+extern	char *iso_ntoa(void);
 
 void usage(const char *) __dead2;
 
@@ -753,7 +753,8 @@
 		if (af == AF_INET && *gateway && hp && hp->h_addr_list[1]) {
 			hp->h_addr_list++;
 			memmove(&so_gate.sin.sin_addr, hp->h_addr_list[0],
-			    MIN(hp->h_length, sizeof(so_gate.sin.sin_addr)));
+			    MIN((size_t)hp->h_length,
+			    sizeof(so_gate.sin.sin_addr)));
 		} else
 			break;
 	}
@@ -1069,7 +1070,7 @@
 		*hpp = hp;
 		su->sin.sin_family = hp->h_addrtype;
 		memmove((char *)&su->sin.sin_addr, hp->h_addr,
-		    MIN(hp->h_length, sizeof(su->sin.sin_addr)));
+		    MIN((size_t)hp->h_length, sizeof(su->sin.sin_addr)));
 		return (1);
 	}
 	errx(EX_NOHOST, "bad address: %s", s);
--- route.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list