diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cd0077cb225..e4393bde130 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2000-01-22 Zack Weinberg + + * 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 * config/elfos.h (UNIQUE_SECTION): Restore uninitialised data diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c index 9c40cde20e8..23e738a8e77 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] == '/'))