Fix build failure with GCC 4.1.
authorTom Tromey <tom@tromey.com>
Wed, 18 May 2016 16:48:41 +0000 (10:48 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 18 May 2016 17:15:31 +0000 (11:15 -0600)
2016-05-18  Tom Tromey  <tom@tromey.com>

* rust-lang.c (rust_subscript): Initialize "high".

gdb/ChangeLog
gdb/rust-lang.c

index 188a2db7050075eb90e6fc1dec6a00e472be6b34..92024b6816f8ca757b900e0d5527d25c996c7dad 100644 (file)
@@ -1,3 +1,7 @@
+2016-05-18  Tom Tromey  <tom@tromey.com>
+
+       * rust-lang.c (rust_subscript): Initialize "high".
+
 2016-05-17  Simon Marchi  <simon.marchi@ericsson.com>
 
        PR gdb/20045
index b8af166ad928e90de7c3e455c8a9b12d1d0b4d91..5df99ced28d2883e0188260d0bff151b08b0a27f 100644 (file)
@@ -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;
This page took 0.030435 seconds and 4 git commands to generate.