Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2012 16:43:32 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        eadler@FreeBSD.org
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r231817 - head/usr.sbin/IPXrouted
Message-ID:  <20120216.164332.2209961872967607025.hrs@allbsd.org>
In-Reply-To: <201202160517.q1G5H6Z0000155@svn.freebsd.org> <201202160517.q1G5H14i000118@svn.freebsd.org>
References:  <201202160517.q1G5H6Z0000155@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Thu_Feb_16_16_43_32_2012_655)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Eitan Adler <eadler@FreeBSD.org> wrote
  in <201202160517.q1G5H6Z0000155@svn.freebsd.org>:

ea> Author: eadler
ea> Date: Thu Feb 16 05:17:06 2012
ea> New Revision: 231817
ea> URL: http://svn.freebsd.org/changeset/base/231817
ea>
ea> Log:
ea>   Fix warning when compiling with gcc46
ea>
ea>   Approved by:	cperciva
ea>   MFC after:	3 days
ea>
ea> Modified:
ea>   head/usr.sbin/IPXrouted/tables.c
(snip)
ea> @@ -213,7 +211,6 @@ rtchange(struct rt_entry *rt, struct soc
ea>      short ticks)
ea>  {
ea>  	int doioctl = 0, metricchanged = 0;
ea> -	struct rtuentry oldroute;
ea>
ea>  	FIXLEN(gate);
ea>  	/*
ea> @@ -281,7 +278,6 @@ rtchange(struct rt_entry *rt, struct soc
ea>  	if (doioctl || metricchanged) {
ea>  		TRACE_ACTION("CHANGE FROM", rt);
ea>  		if (doioctl) {
ea> -			oldroute = rt->rt_rt;
ea>  			rt->rt_router = *gate;
ea>  		}
ea>  		rt->rt_metric = metric;
ea>

 The oldroute is still used in the #ifdef section at the end of this
 function.

ea> Author: eadler
ea> Date: Thu Feb 16 05:17:01 2012
ea> New Revision: 231816
ea> URL: http://svn.freebsd.org/changeset/base/231816
ea>
ea> Log:
ea>   Removed unused code: fixes compiler warning with CC=gcc46
ea>   	error: parameter 'fd' set but not used
ea>
ea>   Approved by:	cperciva
ea>   MFC after:	1 week
ea>
ea> Modified:
ea>   head/usr.bin/gencat/gencat.c
ea>
ea> Modified: head/usr.bin/gencat/gencat.c
ea> ==============================================================================
ea> --- head/usr.bin/gencat/gencat.c	Thu Feb 16 05:16:55 2012	(r231815)
ea> +++ head/usr.bin/gencat/gencat.c	Thu Feb 16 05:17:01 2012	(r231816)
ea> @@ -462,89 +462,6 @@ MCParse(int fd)
ea>  	}
ea>  }
ea>
ea> -void
ea> -MCReadCat(int fd)
ea> -{
ea> -	fd = 0;

 This file was from NetBSD and this change just increased the diff.  I
 do not understand why the prototype declaration of MCReadCat() was
 left while the main body was removed.


 IMHO it is not a good idea to remove unused code partially like this
 or unused code in one from another project if you just want to
 suppress a compiler warning.  It may suppress the warning, but
 remaining bits in comments and/or conditional parts where the
 compiler does not complain make developers confused.  I think it is
 more harmful than the warning.

-- Hiroki

----Security_Multipart(Thu_Feb_16_16_43_32_2012_655)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEABECAAYFAk88s6QACgkQTyzT2CeTzy21+wCfZyyOVOnML3ry8ar7ff+Uuglv
Sb8AoJWdi+32rF/XOdo/MaGYxUYyoBZx
=ZzuH
-----END PGP SIGNATURE-----

----Security_Multipart(Thu_Feb_16_16_43_32_2012_655)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120216.164332.2209961872967607025.hrs>