From 9c1e305a597428c9a9fafa6e0a11d864c77ce80a Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Sun, 27 Feb 2011 22:11:06 +0000 Subject: [PATCH] 2011-02-27 Michael Snyder * symtab.c (rbreak_command): Move variable 'file_name' to outer scope. --- gdb/ChangeLog | 3 +++ gdb/symtab.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a2d9a053175..a87cfc872ae 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2011-02-27 Michael Snyder + * symtab.c (rbreak_command): Move variable 'file_name' to + outer scope. + * d-valprint.c (dynamic_array_type): Avoid shadowing a function param with a local variable of the same name. diff --git a/gdb/symtab.c b/gdb/symtab.c index 3105327bba7..60bc585fcc4 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -3403,7 +3403,7 @@ rbreak_command (char *regexp, int from_tty) struct cleanup *old_chain; char *string = NULL; int len = 0; - char **files = NULL; + char **files = NULL, *file_name; int nfiles = 0; if (regexp) @@ -3413,7 +3413,6 @@ rbreak_command (char *regexp, int from_tty) if (colon && *(colon + 1) != ':') { int colon_index; - char * file_name; colon_index = colon - regexp; file_name = alloca (colon_index + 1); -- 2.30.2