Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2002 02:02:19 +0300
From:      Giorgos Keramidas <keramida@FreeBSD.org>
To:        audit@FreeBSD.org
Subject:   RFC: minor change in dd/conv.c
Message-ID:  <20020712230218.GA32122@hades.hell.gr>

next in thread | raw e-mail | index | archive | help
The following allows bin/dd to build with WARNS=5 on my CURRENT
machine at home.

I've verified that this generates the same object code without
optimizations, and with any level of optimizations up to -O3.
The script that I used to check this and details about the tests I did
can be found at http://www.FreeBSD.org/~keramida/dd.txt

I've mailed green@ on Jul 10, but haven't received any reply yet.
So, does this look OK to you all?  If yes, should I make the change?

%%%
Index: Makefile
===================================================================
RCS file: /home/ncvs/src/bin/dd/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	4 Feb 2002 02:49:18 -0000	1.10
+++ Makefile	9 Jul 2002 20:34:10 -0000
@@ -3,8 +3,8 @@
 
 PROG=	dd
 SRCS=	args.c conv.c conv_tab.c dd.c misc.c position.c
-WARNS=	0
-WFORMAT=0
+WARNS?=	5
+WFORMAT?=1
 
 MAINTAINER=	green@FreeBSD.org
 
Index: conv.c
===================================================================
RCS file: /home/ncvs/src/bin/dd/conv.c,v
retrieving revision 1.17
diff -u -r1.17 conv.c
--- conv.c	30 Jun 2002 05:13:52 -0000	1.17
+++ conv.c	3 Jul 2002 01:18:36 -0000
@@ -223,8 +223,10 @@
 
 	/* Translation and case conversion. */
 	if ((t = ctab) != NULL)
-		for (cnt = in.dbrcnt, inp = in.dbp; cnt--;)
-			*--inp = t[*inp];
+		for (cnt = in.dbrcnt, inp = in.dbp; cnt--;) {
+			--inp;
+			*inp = t[*inp];
+		}
 	/*
 	 * Copy records (max cbsz size chunks) into the output buffer.  The
 	 * translation has to already be done or we might not recognize the
%%%

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




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