binutils-gdb/gdb/unittests
Tom Tromey b926417afa Simple -Wshadow=local fixes
This fixes all the straightforward -Wshadow=local warnings in gdb.  A
few standard approaches are used here:

* Renaming an inner (or outer, but more commonly inner) variable;
* Lowering a declaration to avoid a clash;
* Moving a declaration into a more inner scope to avoid a clash,
  including the special case of moving a declaration into a loop header.

I did not consider any of the changes in this patch to be particularly
noteworthy, though of course they should all still be examined.

gdb/ChangeLog
2018-10-04  Tom Tromey  <tom@tromey.com>

	* ctf.c (SET_ARRAY_FIELD): Rename "u32".
	* p-valprint.c (pascal_val_print): Split inner "i" variable.
	* xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
	header.
	* xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
	more inner scope.
	* xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
	* varobj.c (varobj_update): Rename inner "newobj",
	"type_changed".
	* valprint.c (generic_emit_char): Rename inner "buf".
	* valops.c (find_overload_match): Rename inner "temp".
	(value_struct_elt_for_reference): Declare "v" in more inner
	scope.
	* v850-tdep.c (v850_push_dummy_call): Rename "len".
	* unittests/array-view-selftests.c (run_tests): Rename inner
	"vec".
	* tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
	header.
	* tracepoint.c (merge_uploaded_trace_state_variables): Declare
	"tsv" in more inner scope.
	(print_one_static_tracepoint_marker): Rename inner
	"tuple_emitter".
	* tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
	(tic6x_push_dummy_call): Don't redeclare "addr".
	* target-float.c: Declare "dto" lower.
	* symtab.c (lookup_local_symbol): Rename inner "sym".
	(find_pc_sect_line): Rename inner "pc".
	* stack.c (print_frame): Don't redeclare "gdbarch".
	(return_command): Rename inner "gdbarch".
	* s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
	"sp".
	* rust-lang.c (rust_internal_print_type): Declare "i" in loop
	header.
	* rs6000-tdep.c (ppc_process_record): Rename inner "addr".
	* riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
	scope.
	* remote.c (remote_target::update_thread_list): Don't redeclare
	"tp".
	(remote_target::process_initial_stop_replies): Rename inner
	"thread".
	(remote_target::remote_parse_stop_reply): Don't redeclare "p".
	(remote_target::wait_as): Don't redeclare "stop_reply".
	(remote_target::get_thread_local_address): Rename inner
	"result".
	(remote_target::get_tib_address): Likewise.
2018-10-04 22:51:45 -06:00
..
basic_string_view Simple unused variable removals 2018-07-22 13:20:01 -06:00
optional Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
array-view-selftests.c Simple -Wshadow=local fixes 2018-10-04 22:51:45 -06:00
cli-utils-selftests.c Add a self-test for cli-utils.c 2018-07-12 23:10:56 +02:00
common-utils-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
environ-selftests.c Move gdb/common/diagnostics.h to include/diagnostics.h 2018-06-01 09:40:30 -07:00
format_pieces-selftests.c format_pieces-selftests.c: Silence ARI warnings 2018-05-18 15:47:56 -04:00
function-view-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
lookup_name_info-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memory-map-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memrange-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
observable-selftests.c Convert observers to C++ 2018-03-19 09:37:49 -06:00
offset-type-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
optional-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
parse-connection-spec-selftests.c Implement IPv6 support for GDB/gdbserver 2018-07-11 19:41:31 -04:00
ptid-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
rsp-low-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
scoped_fd-selftests.c Don't check HAVE_UNISTD_H 2018-10-01 02:58:23 -06:00
scoped_mmap-selftests.c Don't check HAVE_UNISTD_H 2018-10-01 02:58:23 -06:00
scoped_restore-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
string_view-selftests.c Define GNULIB_NAMESPACE in unittests/string_view-selftests.c 2018-05-08 16:45:02 -04:00
tracepoint-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
unpack-selftests.c Sign-extend non-bit-fields in unpack_bits_as_long 2018-02-26 09:21:08 -07:00
utils-selftests.c Add selftest for substitute_path_component 2018-03-15 22:04:42 -04:00
xml-utils-selftests.c Add xml_escape_text_append and use it 2018-03-08 18:04:46 -05:00