From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 17:10:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1056E10656EA; Tue, 25 Oct 2011 17:10:16 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0050B8FC19; Tue, 25 Oct 2011 17:10:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9PHAFcS006641; Tue, 25 Oct 2011 17:10:15 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PHAFq7006638; Tue, 25 Oct 2011 17:10:15 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201110251710.p9PHAFq7006638@svn.freebsd.org> From: Ed Schouten Date: Tue, 25 Oct 2011 17:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226742 - head/sbin/swapon X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 17:10:16 -0000 Author: ed Date: Tue Oct 25 17:10:15 2011 New Revision: 226742 URL: http://svn.freebsd.org/changeset/base/226742 Log: Build swapon with WARNS=6. Don't use a variable called stat, because it collides with stat(2). Modified: head/sbin/swapon/Makefile head/sbin/swapon/swapon.c Modified: head/sbin/swapon/Makefile ============================================================================== --- head/sbin/swapon/Makefile Tue Oct 25 16:35:48 2011 (r226741) +++ head/sbin/swapon/Makefile Tue Oct 25 17:10:15 2011 (r226742) @@ -8,7 +8,6 @@ LINKS+= ${BINDIR}/swapon ${BINDIR}/swapc MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 -WARNS?= 3 DPADD= ${LIBUTIL} LDADD= -lutil Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Tue Oct 25 16:35:48 2011 (r226741) +++ head/sbin/swapon/swapon.c Tue Oct 25 17:10:15 2011 (r226742) @@ -67,7 +67,7 @@ main(int argc, char **argv) { struct fstab *fsp; char *ptr; - int stat; + int ret; int ch, doall; int sflag = 0, lflag = 0, hflag = 0, qflag = 0; const char *etc_fstab; @@ -144,7 +144,7 @@ main(int argc, char **argv) } argv += optind; - stat = 0; + ret = 0; if (etc_fstab != NULL) setfstab(etc_fstab); if (which_prog == SWAPON || which_prog == SWAPOFF) { @@ -155,7 +155,7 @@ main(int argc, char **argv) if (strstr(fsp->fs_mntops, "noauto")) continue; if (swap_on_off(fsp->fs_spec, 1)) { - stat = 1; + ret = 1; } else { if (!qflag) { printf("%s: %sing %s as swap device\n", @@ -170,7 +170,7 @@ main(int argc, char **argv) usage(); for (; *argv; ++argv) { if (swap_on_off(*argv, 0)) { - stat = 1; + ret = 1; } else if (orig_prog == SWAPCTL) { printf("%s: %sing %s as swap device\n", getprogname(), which_prog == SWAPOFF ? "remov" : "add", @@ -183,7 +183,7 @@ main(int argc, char **argv) else usage(); } - exit(stat); + exit(ret); } static int