From owner-svn-src-projects@FreeBSD.ORG Sat Oct 4 17:21:31 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBC96C89; Sat, 4 Oct 2014 17:21:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDEACCF1; Sat, 4 Oct 2014 17:21:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s94HLVIf065451; Sat, 4 Oct 2014 17:21:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s94HLVrX065449; Sat, 4 Oct 2014 17:21:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201410041721.s94HLVrX065449@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 4 Oct 2014 17:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r272530 - projects/ipfw/sbin/ipfw X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2014 17:21:32 -0000 Author: melifaro Date: Sat Oct 4 17:21:30 2014 New Revision: 272530 URL: https://svnweb.freebsd.org/changeset/base/272530 Log: Fix GCC wardnings. Modified: projects/ipfw/sbin/ipfw/ipfw2.c projects/ipfw/sbin/ipfw/tables.c Modified: projects/ipfw/sbin/ipfw/ipfw2.c ============================================================================== --- projects/ipfw/sbin/ipfw/ipfw2.c Sat Oct 4 16:00:34 2014 (r272529) +++ projects/ipfw/sbin/ipfw/ipfw2.c Sat Oct 4 17:21:30 2014 (r272530) @@ -3599,7 +3599,7 @@ chkarg: errx(EX_USAGE, "missing argument for %s", *(av - 1)); if (isdigit(**av)) { action->arg1 = strtoul(*av, NULL, 10); - if (action->arg1 <= 0 || action->arg1 >= IP_FW_TARG) + if (action->arg1 <= 0 || action->arg1 >= IP_FW_TABLEARG) errx(EX_DATAERR, "illegal argument for %s", *(av - 1)); } else if (_substrcmp(*av, "tablearg") == 0) { Modified: projects/ipfw/sbin/ipfw/tables.c ============================================================================== --- projects/ipfw/sbin/ipfw/tables.c Sat Oct 4 16:00:34 2014 (r272529) +++ projects/ipfw/sbin/ipfw/tables.c Sat Oct 4 17:21:30 2014 (r272530) @@ -38,7 +38,6 @@ #include "ipfw2.h" -static void table_list(ipfw_xtable_info *i, int need_header); static void table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add, int quiet, int update, int atomic); static int table_flush(ipfw_obj_header *oh); @@ -1386,6 +1385,7 @@ tentry_fill_value(ipfw_obj_header *oh, i uint32_t a4, flag, val, vm; ipfw_table_value *v; uint32_t i; + int dval; char *comma, *e, *etype, *n, *p; v = &tent->v.value; @@ -1480,9 +1480,10 @@ tentry_fill_value(ipfw_obj_header *oh, i break; case IPFW_VTYPE_DSCP: if (isalpha(*n)) { - if ((v->dscp = match_token(f_ipdscp, n)) != -1) + if ((dval = match_token(f_ipdscp, n)) != -1) { + v->dscp = dval; break; - else + } else etype = "DSCP code"; } else { v->dscp = strtol(n, &e, 10);