diff options
author | Tom Tromey <tom@tromey.com> | 2018-07-08 12:39:36 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-22 13:20:02 -0600 |
commit | 157663703656814c751998747faadf41711e51ec (patch) | |
tree | 5a70fe3d56d57cc18207ff3577ad2c3c5e435446 /gdb/btrace.c | |
parent | f4e80e1301f916ae7952abaf4ff1ebeac00951b3 (diff) | |
download | gdb-157663703656814c751998747faadf41711e51ec.zip gdb-157663703656814c751998747faadf41711e51ec.tar.gz gdb-157663703656814c751998747faadf41711e51ec.tar.bz2 |
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.
Diffstat (limited to 'gdb/btrace.c')
-rw-r--r-- | gdb/btrace.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/btrace.c b/gdb/btrace.c index 35dc90e..e25f047 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -2202,10 +2202,9 @@ static const struct gdb_xml_element btrace_elements[] = { void parse_xml_btrace (struct btrace_data *btrace, const char *buffer) { - int errcode; - #if defined (HAVE_LIBEXPAT) + int errcode; btrace_data result; result.format = BTRACE_FORMAT_NONE; @@ -2303,10 +2302,9 @@ static const struct gdb_xml_element btrace_conf_elements[] = { void parse_xml_btrace_conf (struct btrace_config *conf, const char *xml) { - int errcode; - #if defined (HAVE_LIBEXPAT) + int errcode; errcode = gdb_xml_parse_quick (_("btrace-conf"), "btrace-conf.dtd", btrace_conf_elements, xml, conf); if (errcode != 0) |