fixincl.c: Move declarations of 'pz_fname' and 'pz_scan' into scope of entire function.
authorZack Weinberg <zack@wolery.cumb.org>
Sat, 22 Jan 2000 20:55:18 +0000 (20:55 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sat, 22 Jan 2000 20:55:18 +0000 (20:55 +0000)
  * fixinc/fixincl.c: Move declarations of 'pz_fname' and
'pz_scan' into scope of entire function.  Only affects
compiles with -DDEBUG.

From-SVN: r31564

gcc/ChangeLog
gcc/fixinc/fixincl.c

index cd0077cb22544c9bf758473d3ee51d76914e752b..e4393bde130ad06b628d98878e287b7c5171d8d4 100644 (file)
@@ -1,3 +1,9 @@
+2000-01-22  Zack Weinberg  <zack@wolery.cumb.org>
+
+       * fixinc/fixincl.c: Move declarations of 'pz_fname' and
+       'pz_scan' into scope of entire function.  Only affects
+       compiles with -DDEBUG.
+
 2000-01-22  Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
 
         * config/elfos.h (UNIQUE_SECTION): Restore uninitialised data
index 9c40cde20e8d38264f6c6c9018fa992f0fb27124..23e738a8e77b330e4dd263c8cc171198db61fb4e 100644 (file)
@@ -1089,6 +1089,8 @@ fix_applies (p_fixd)
 #ifdef DEBUG
   static const char z_failed[] = "not applying %s to %s - test %d failed\n";
 #endif
+  const char *pz_fname = pz_curr_file;
+  const char *pz_scan = p_fixd->file_list;
   int test_ct;
   tTestDesc *p_test;
 
@@ -1098,10 +1100,8 @@ fix_applies (p_fixd)
   /*  IF there is a file name restriction,
       THEN ensure the current file name matches one in the pattern  */
 
-  if (p_fixd->file_list != (char *) NULL)
+  if (pz_scan != (char *) NULL)
     {
-      const char *pz_fname = pz_curr_file;
-      const char *pz_scan = p_fixd->file_list;
       size_t name_len;
 
       while ((pz_fname[0] == '.') && (pz_fname[1] == '/'))