From tim@X3000  Wed Jul 24 23:06:39 1996
Received: from X3000 (ppp1602.on.sympatico.ca [206.172.249.66])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA19616
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 24 Jul 1996 23:06:36 -0700 (PDT)
Received: (from tim@localhost) by X3000 (8.7.5/8.7.3) id GAA01061; Wed, 24 Jul 1996 06:02:51 -0400 (EDT)
Message-Id: <199607241002.GAA01061@X3000>
Date: Wed, 24 Jul 1996 06:02:51 -0400 (EDT)
From: tIM...HOEk@X3000 (Tim@Vanderhoek)
Reply-To: ac199@freenet.hamilton.on.ca
To: FreeBSD-gnats-submit@freebsd.org
Subject: yacc-generated parser generates warnings with -Wall
X-Send-Pr-Version: 3.2

>Number:         1427
>Category:       bin
>Synopsis:       yacc-generated parser generates warnings with -Wall
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    steve
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 24 23:10:02 PDT 1996
>Closed-Date:    Sat Sep 21 19:07:05 PDT 1996
>Last-Modified:  Sat Sep 21 19:09:37 PDT 1996
>Originator:     Tim Vanderhoek
>Release:        FreeBSD 2.2-960501-SNAP i386
>Organization:
Organization is evil.
>Environment:

	I don't believe there have been any changes to the yacc code
since June 20, 1996, the date of the diff mentioned in bin/1337.

>Description:

	This is a follow-up to bin/1337 since it seems I didn't quite
catch all of the warnings last time...

>How-To-Repeat:

	Compile a yacc-generated parser with #define YYDEBUG.

>Fix:
	
*** /devel/yacc/skeleton.c	Sat Jul  6 14:23:57 1996
--- /devel/yacc/oldskel.c	Thu Jun 20 19:07:52 1996
***************
*** 126,134 ****
      "    register int yym, yyn, yystate;",
      "#if YYDEBUG",
      "    register char *yys;",
!     "    extern char *getenv(const char * name);",
      "",
!     "    if ((yys = getenv(\"YYDEBUG\")))",
      "    {",
      "        yyn = *yys;",
      "        if (yyn >= '0' && yyn <= '9')",
--- 126,134 ----
      "    register int yym, yyn, yystate;",
      "#if YYDEBUG",
      "    register char *yys;",
!     "    extern char *getenv();",
      "",
!     "    if (yys = getenv(\"YYDEBUG\"))",
      "    {",
      "        yyn = *yys;",
      "        if (yyn >= '0' && yyn <= '9')",
***************
*** 145,151 ****
      "    *yyssp = yystate = 0;",
      "",
      "yyloop:",
!     "    if ((yyn = yydefred[yystate])) goto yyreduce;",
      "    if (yychar < 0)",
      "    {",
      "        if ((yychar = yylex()) < 0) yychar = 0;",
--- 145,151 ----
      "    *yyssp = yystate = 0;",
      "",
      "yyloop:",
!     "    if (yyn = yydefred[yystate]) goto yyreduce;",
      "    if (yychar < 0)",
      "    {",
      "        if ((yychar = yylex()) < 0) yychar = 0;",
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sat Sep 21 19:07:05 PDT 1996 
State-Changed-Why:  
Supplied patch applied.  Thanks! 
>Unformatted:
