aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-05-18 10:48:41 -0600
committerTom Tromey <tom@tromey.com>2016-05-18 11:15:31 -0600
commit45f4ed92d14ddf891be1470556f53de6c94c8dc2 (patch)
treeaa3605101cd8a19a5975f15bc81f408dcd7dfaae /gdb/rust-lang.c
parentf507bebf459de9b145bd8ccfcfa2f5f6690adac4 (diff)
downloadgdb-45f4ed92d14ddf891be1470556f53de6c94c8dc2.zip
gdb-45f4ed92d14ddf891be1470556f53de6c94c8dc2.tar.gz
gdb-45f4ed92d14ddf891be1470556f53de6c94c8dc2.tar.bz2
Fix build failure with GCC 4.1.
2016-05-18 Tom Tromey <tom@tromey.com> * rust-lang.c (rust_subscript): Initialize "high".
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r--gdb/rust-lang.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index b8af166..5df99ce 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -1308,9 +1308,10 @@ rust_subscript (struct expression *exp, int *pos, enum noside noside,
{
struct value *lhs, *rhs, *result;
struct type *rhstype;
- LONGEST low, high, high_bound;
+ LONGEST low, high_bound;
/* Initialized to appease the compiler. */
enum range_type kind = BOTH_BOUND_DEFAULT;
+ LONGEST high = 0;
int want_slice = 0;
++*pos;