[Midnightbsd-cvs] src [7109] trunk/usr.bin/mkesdb: replace line numbers to avoid shadow declaration warnings after lex/ yacc update

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jul 18 16:55:32 EDT 2015


Revision: 7109
          http://svnweb.midnightbsd.org/src/?rev=7109
Author:   laffer1
Date:     2015-07-18 16:55:30 -0400 (Sat, 18 Jul 2015)
Log Message:
-----------
replace line numbers to avoid shadow declaration warnings after lex/yacc update

Modified Paths:
--------------
    trunk/usr.bin/mkesdb/Makefile
    trunk/usr.bin/mkesdb/Makefile.inc
    trunk/usr.bin/mkesdb/ldef.h
    trunk/usr.bin/mkesdb/lex.l
    trunk/usr.bin/mkesdb/mkesdb.1
    trunk/usr.bin/mkesdb/yacc.y

Modified: trunk/usr.bin/mkesdb/Makefile
===================================================================
--- trunk/usr.bin/mkesdb/Makefile	2015-07-18 19:58:54 UTC (rev 7108)
+++ trunk/usr.bin/mkesdb/Makefile	2015-07-18 20:55:30 UTC (rev 7109)
@@ -1,4 +1,5 @@
 # $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/mkesdb/Makefile 250938 2013-05-23 18:07:01Z ed $
 
 .PATH: ${.CURDIR}/../../lib/libc/iconv
 
@@ -5,5 +6,7 @@
 PROG=	mkesdb
 LDFLAGS+= -L${.OBJDIR}/../../lib/libc
 
+NO_WMISSING_VARIABLE_DECLARATIONS=
+
 .include "${.CURDIR}/Makefile.inc"
 .include <bsd.prog.mk>

Modified: trunk/usr.bin/mkesdb/Makefile.inc
===================================================================
--- trunk/usr.bin/mkesdb/Makefile.inc	2015-07-18 19:58:54 UTC (rev 7108)
+++ trunk/usr.bin/mkesdb/Makefile.inc	2015-07-18 20:55:30 UTC (rev 7109)
@@ -1,4 +1,5 @@
 # $MidnightBSD$
+# $FreeBSD: stable/10/usr.bin/mkesdb/Makefile.inc 228766 2011-12-21 12:07:14Z gabor $
 
 SRCS+=	lex.l yacc.y
 CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkesdb \

Modified: trunk/usr.bin/mkesdb/ldef.h
===================================================================
--- trunk/usr.bin/mkesdb/ldef.h	2015-07-18 19:58:54 UTC (rev 7108)
+++ trunk/usr.bin/mkesdb/ldef.h	2015-07-18 20:55:30 UTC (rev 7109)
@@ -1,4 +1,5 @@
 /* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.bin/mkesdb/ldef.h 250984 2013-05-25 15:36:15Z ed $ */
 /* $NetBSD: ldef.h,v 1.2 2005/06/27 01:23:59 fvdl Exp $	*/
 
 /*-
@@ -27,10 +28,9 @@
  * SUCH DAMAGE.
  */
 
-extern int	 line_number;
+extern int	 linenumber;
 extern int	 yyerror(const char *);
 extern int	 yylex(void);
-extern int	 yyparse(void);
 
 struct named_csid {
 	STAILQ_ENTRY(named_csid)	 ci_entry;

Modified: trunk/usr.bin/mkesdb/lex.l
===================================================================
--- trunk/usr.bin/mkesdb/lex.l	2015-07-18 19:58:54 UTC (rev 7108)
+++ trunk/usr.bin/mkesdb/lex.l	2015-07-18 20:55:30 UTC (rev 7109)
@@ -1,4 +1,5 @@
 /* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.bin/mkesdb/lex.l 252582 2013-07-03 18:25:27Z peter $ */
 /* $NetBSD: lex.l,v 1.3 2006/02/09 22:03:15 dogcow Exp $	*/
 
 %{
@@ -43,8 +44,11 @@
 #include "ldef.h"
 #include "yacc.h"
 
-int line_number = 1;
+#define YY_DECL int yylex(void)
+
+int linenumber = 1;
 %}
+%option	noinput
 %option	nounput
 
 %x	COMMENT
@@ -52,14 +56,14 @@
 %%
 
 [ \t]+	{ }
-#.*[\n]|"//".*[\n]|[\n]	{ line_number++; return (R_LN); }
+#.*[\n]|"//".*[\n]|[\n]	{ linenumber++; return (R_LN); }
 
 "/*"		{ BEGIN COMMENT; }
 <COMMENT>"*/"	{ BEGIN 0; }
-<COMMENT>[\n]	{ line_number++; }
+<COMMENT>[\n]	{ linenumber++; }
 <COMMENT>.	{ }
 <COMMENT><<EOF>>	{
-		yyerror("unexpected file end (unterminate comment)\n");
+		yyerror("unexpected file end (unterminated comment)\n");
 		exit(1);
 	}
 

Modified: trunk/usr.bin/mkesdb/mkesdb.1
===================================================================
--- trunk/usr.bin/mkesdb/mkesdb.1	2015-07-18 19:58:54 UTC (rev 7108)
+++ trunk/usr.bin/mkesdb/mkesdb.1	2015-07-18 20:55:30 UTC (rev 7109)
@@ -32,6 +32,7 @@
 .\" the referee document.  The original Standard can be obtained online at
 .\"     http://www.opengroup.org/unix/online.html.
 .\"
+.\" $FreeBSD: stable/10/usr.bin/mkesdb/mkesdb.1 222286 2011-05-25 14:13:53Z ru $
 .\" $MidnightBSD$
 .\"
 .Dd November 1, 2009

Modified: trunk/usr.bin/mkesdb/yacc.y
===================================================================
--- trunk/usr.bin/mkesdb/yacc.y	2015-07-18 19:58:54 UTC (rev 7108)
+++ trunk/usr.bin/mkesdb/yacc.y	2015-07-18 20:55:30 UTC (rev 7109)
@@ -1,4 +1,5 @@
 /* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.bin/mkesdb/yacc.y 250984 2013-05-25 15:36:15Z ed $ */
 /* $NetBSD: yacc.y,v 1.4 2005/06/02 02:09:25 lukem Exp $	*/
 
 %{
@@ -114,7 +115,7 @@
 yyerror(const char *s)
 {
 
-	fprintf(stderr, "%s in %d\n", s, line_number);
+	fprintf(stderr, "%s in %d\n", s, linenumber);
 
 	return (0);
 }



More information about the Midnightbsd-cvs mailing list