]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove two unnecessary casts
authorTom Tromey <tromey@adacore.com>
Mon, 26 Feb 2024 20:50:54 +0000 (13:50 -0700)
committerTom Tromey <tromey@adacore.com>
Mon, 26 Feb 2024 20:50:54 +0000 (13:50 -0700)
I noticed a spot in ada-lang.c where the return value of
value_as_address was cast to CORE_ADDR -- a no-op cast.  I searched
and found another.  This patch fixes both.

gdb/ada-lang.c
gdb/eval.c

index 3f3985400104fb90e8db96687b99715cdfa8a82a..1c26ebf7b30a511611a5cbccb598138249b80530 100644 (file)
@@ -10993,7 +10993,7 @@ ada_unop_ind_operation::evaluate (struct type *expect_type,
                                          arg1));
       else
        return value_at_lazy (builtin_type (exp->gdbarch)->builtin_int,
-                             (CORE_ADDR) value_as_address (arg1));
+                             value_as_address (arg1));
     }
 
   if (ada_is_array_descriptor_type (type))
index 4c438f927c044ff790dbaedef7a2b1a6e6cba1c2..2759b46a5dff15d070d88656193c6845c92c63a6 100644 (file)
@@ -1685,7 +1685,7 @@ eval_op_ind (struct type *expect_type, struct expression *exp,
      BUILTIN_TYPE_LONGEST would seem to be a mistake.  */
   if (type->code () == TYPE_CODE_INT)
     return value_at_lazy (builtin_type (exp->gdbarch)->builtin_int,
-                         (CORE_ADDR) value_as_address (arg1));
+                         value_as_address (arg1));
   return value_ind (arg1);
 }