From 157663703656814c751998747faadf41711e51ec Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 8 Jul 2018 12:39:36 -0600 Subject: 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 * 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. --- gdb/inflow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gdb/inflow.c') diff --git a/gdb/inflow.c b/gdb/inflow.c index a3b5ba8..caff646 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -138,7 +138,9 @@ private: to SIG_IGN. */ static sighandler_t sigint_ours; +#ifdef SIGQUIT static sighandler_t sigquit_ours; +#endif /* The name of the tty (from the `tty' command) that we're giving to the inferior when starting it up. This is only (and should only @@ -825,11 +827,11 @@ check_syscall (const char *msg, int result) void new_tty (void) { - int tty; - if (inferior_thisrun_terminal == 0) return; #if !defined(__GO32__) && !defined(_WIN32) + int tty; + #ifdef TIOCNOTTY /* Disconnect the child process from our controlling terminal. On some systems (SVR4 for example), this may cause a SIGTTOU, so temporarily -- cgit v1.1