Unused variable fixes related to conditional compilation

This patch fixes various unused variable warnings that are related to
conditional compilation.  In these cases, either the variable is now
protected by the same #if as its uses, or the declaration is simply
lowered into the conditionally-compiled block.

gdb/ChangeLog
2018-07-22  Tom Tromey  <tom@tromey.com>

	* windows-nat.c (saved_context): Conditionally define.
	* remote.c (remote_target::remote_btrace_maybe_reopen):
	Conditionally declare "warned".
	* inflow.c (sigquit_ours): Conditionally define.
	(new_tty): Move "tty" declaration inside #if.
	* guile/guile.c (guile_datadir): Conditionally define.
	* charset.c (set_be_le_names): Move some declarations inside #if.
	* btrace.c (parse_xml_btrace): Move "errcode" declaration inside
	#if.
	(parse_xml_btrace_conf): Likewise.
This commit is contained in:
Tom Tromey
2018-07-08 12:39:36 -06:00
parent f4e80e1301
commit 1576637036
7 changed files with 28 additions and 9 deletions

View File

@@ -46,8 +46,10 @@ int gdbscm_guile_major_version;
int gdbscm_guile_minor_version;
int gdbscm_guile_micro_version;
#ifdef HAVE_GUILE
/* The guile subdirectory within gdb's data-directory. */
static const char *guile_datadir;
#endif
/* Declared constants and enum for guile exception printing. */
const char gdbscm_print_excp_none[] = "none";