]> git.saurik.com Git - bison.git/commitdiff
(_AT_DATA_CALC_Y): Make vars static instead of
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Nov 2002 07:52:13 +0000 (07:52 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Nov 2002 07:52:13 +0000 (07:52 +0000)
extern when possible.  Remove unused initializations.

tests/calc.at

index e79cdb2e5041a36b7e68beb8843e7ed9bea1f51b..d566c1dbd34168779fa6f2674c22111e353edbc1 100644 (file)
@@ -53,8 +53,8 @@ extern void perror (const char *s);
 /* Exercise pre-prologue dependency to %union.  */
 typedef int value_t;
 
 /* Exercise pre-prologue dependency to %union.  */
 typedef int value_t;
 
-value_t global_result = 0;
-int global_count = 0;
+static value_t global_result = 0;
+static int global_count = 0;
 
 %}
 
 
 %}
 
@@ -146,7 +146,7 @@ exp:
 ;
 %%
 /* The input. */
 ;
 %%
 /* The input. */
-FILE *yyin;
+static FILE *yyin;
 
 static void
 yyerror (]AT_YYERROR_ARG_LOC_IF([YYLTYPE *yylloc, ])[
 
 static void
 yyerror (]AT_YYERROR_ARG_LOC_IF([YYLTYPE *yylloc, ])[
@@ -291,8 +291,7 @@ main (int argc, const char **argv)
 {
   value_t result = 0;
   int count = 0;
 {
   value_t result = 0;
   int count = 0;
-  int status = 0;
-  yyin = NULL;
+  int status;
 
   if (argc == 2)
     yyin = fopen (argv[1], "r");
 
   if (argc == 2)
     yyin = fopen (argv[1], "r");