From owner-freebsd-bugs@FreeBSD.ORG Thu Oct 29 11:30:06 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69D111065692 for ; Thu, 29 Oct 2009 11:30:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 407458FC24 for ; Thu, 29 Oct 2009 11:30:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9TBU6q5009177 for ; Thu, 29 Oct 2009 11:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9TBU6V7009171; Thu, 29 Oct 2009 11:30:06 GMT (envelope-from gnats) Resent-Date: Thu, 29 Oct 2009 11:30:06 GMT Resent-Message-Id: <200910291130.n9TBU6V7009171@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ulrich Spörlein Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 613F610656A4 for ; Thu, 29 Oct 2009 11:27:40 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id C8D5A8FC26 for ; Thu, 29 Oct 2009 11:27:39 +0000 (UTC) Received: from roadrunner.spoerlein.net (pD9E5C041.dip.t-dialin.net [217.229.192.65]) by acme.spoerlein.net (8.14.3/8.14.3) with ESMTP id n9TBRbUW043405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 29 Oct 2009 12:27:38 +0100 (CET) (envelope-from uqs@spoerlein.net) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n9TBOo1h004111 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Oct 2009 12:24:51 +0100 (CET) (envelope-from uqs@roadrunner.spoerlein.net) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n9TBOoEs004110; Thu, 29 Oct 2009 12:24:50 +0100 (CET) (envelope-from uqs) Message-Id: <200910291124.n9TBOoEs004110@roadrunner.spoerlein.net> Date: Thu, 29 Oct 2009 12:24:50 +0100 (CET) From: Ulrich Spörlein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/140078: route(8) increase to WARNS=3 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2009 11:30:06 -0000 >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: