aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-01-22 20:55:18 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-01-22 20:55:18 +0000
commitae5c839b0998385434e35d558408865cac67beb2 (patch)
tree6fc4d1e719fb35ad1588a74ef42e48af9b2cf1ed
parente8c3586ab810c1806d10074799514372ca29672c (diff)
downloadgcc-ae5c839b0998385434e35d558408865cac67beb2.zip
gcc-ae5c839b0998385434e35d558408865cac67beb2.tar.gz
gcc-ae5c839b0998385434e35d558408865cac67beb2.tar.bz2
fixincl.c: Move declarations of 'pz_fname' and 'pz_scan' into scope of entire function.
* fixinc/fixincl.c: Move declarations of 'pz_fname' and 'pz_scan' into scope of entire function. Only affects compiles with -DDEBUG. From-SVN: r31564
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/fixinc/fixincl.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cd0077c..e4393bd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c
index 9c40cde..23e738a 100644
--- a/gcc/fixinc/fixincl.c
+++ b/gcc/fixinc/fixincl.c
@@ -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] == '/'))