From owner-svn-src-all@FreeBSD.ORG Wed Nov 5 11:37:26 2008 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 AD9BC106567B; Wed, 5 Nov 2008 11:37:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CDE38FC31; Wed, 5 Nov 2008 11:37:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA5BbQa9025702; Wed, 5 Nov 2008 11:37:26 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA5BbQ8S025701; Wed, 5 Nov 2008 11:37:26 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200811051137.mA5BbQ8S025701@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 5 Nov 2008 11:37:26 +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: r184678 - head/sys/net 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: Wed, 05 Nov 2008 11:37:26 -0000 Author: bz Date: Wed Nov 5 11:37:26 2008 New Revision: 184678 URL: http://svn.freebsd.org/changeset/base/184678 Log: Do only define the variable if either INET or INET6 is defined. To prevent it from compiling without INET and INET6 we should put an explicit #error in there like we have in other files, but not rely on an unused variable. MFC after: 2 months Modified: head/sys/net/if_gif.c Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Wed Nov 5 11:06:10 2008 (r184677) +++ head/sys/net/if_gif.c Wed Nov 5 11:37:26 2008 (r184678) @@ -207,7 +207,9 @@ static void gif_clone_destroy(ifp) struct ifnet *ifp; { +#if defined(INET) || defined(INET6) int err; +#endif struct gif_softc *sc = ifp->if_softc; mtx_lock(&gif_mtx);