]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: make value_subscripted_rvalue static
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 15 Oct 2021 14:14:58 +0000 (15:14 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 3 Dec 2021 11:00:37 +0000 (11:00 +0000)
The function value_subscripted_rvalue is only used in valarith.c, so
lets make it a static function.

There should be no user visible change after this commit.

gdb/valarith.c
gdb/value.h

index 140ef448137ec58fedb7297d59a144b90434e2f6..11acec6f1676894c5ea68078c5df01db305ea728 100644 (file)
 #include "gdbsupport/byte-vector.h"
 #include "gdbarch.h"
 
+/* Forward declarations.  */
+static struct value *value_subscripted_rvalue (struct value *array,
+                                              LONGEST index,
+                                              LONGEST lowerbound);
+
 /* Define whether or not the C operator '/' truncates towards zero for
    differently signed operands (truncation direction is undefined in C).  */
 
@@ -190,8 +195,9 @@ value_subscript (struct value *array, LONGEST index)
    (eg, a vector register).  This routine used to promote floats
    to doubles, but no longer does.  */
 
-struct value *
-value_subscripted_rvalue (struct value *array, LONGEST index, LONGEST lowerbound)
+static struct value *
+value_subscripted_rvalue (struct value *array, LONGEST index,
+                         LONGEST lowerbound)
 {
   struct type *array_type = check_typedef (value_type (array));
   struct type *elt_type = check_typedef (TYPE_TARGET_TYPE (array_type));
index aa105645034a0aa28c08af56633b22ecb94e63bd..6fa57e0da6036f8ef2e343e049a1d1835ab2e84d 100644 (file)
@@ -1165,10 +1165,6 @@ extern struct value *find_function_in_inferior (const char *,
 
 extern struct value *value_allocate_space_in_inferior (int);
 
-extern struct value *value_subscripted_rvalue (struct value *array,
-                                              LONGEST index,
-                                              LONGEST lowerbound);
-
 /* User function handler.  */
 
 typedef struct value *(*internal_function_fn) (struct gdbarch *gdbarch,