gdb: fix shellcheck warnings SC2154 (referenced but not assigned) in gdbarch.sh
[deliverable/binutils-gdb.git] / gdb / rust-exp.y
index bf6566b8d2954aa7a5ae034c8322e735f6496580..de4a8161635de4200d3d78de9810dc56500d0d82 100644 (file)
@@ -1,5 +1,5 @@
 /* Bison parser for Rust expressions, for GDB.
-   Copyright (C) 2016-2019 Free Software Foundation, Inc.
+   Copyright (C) 2016-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,7 +40,6 @@
 #include "parser-defs.h"
 #include "gdbsupport/selftest.h"
 #include "value.h"
-#include "gdbsupport/vec.h"
 #include "gdbarch.h"
 
 #define GDB_YY_REMAP_PREFIX rust
@@ -1011,7 +1010,7 @@ static const struct token_info operator_tokens[] =
 const char *
 rust_parser::copy_name (const char *name, int len)
 {
-  return (const char *) obstack_copy0 (&obstack, name, len);
+  return obstack_strndup (&obstack, name, len);
 }
 
 /* Helper function to make an stoken from a C string.  */
@@ -2025,7 +2024,7 @@ rust_parser::rust_lookup_type (const char *name, const struct block *block)
       return SYMBOL_TYPE (result.symbol);
     }
 
-  type = lookup_typename (language (), arch (), name, NULL, 1);
+  type = lookup_typename (language (), name, NULL, 1);
   if (type != NULL)
     return type;
 
@@ -2827,8 +2826,9 @@ rust_lex_tests (void)
 
 #endif /* GDB_SELF_TEST */
 
+void _initialize_rust_exp ();
 void
-_initialize_rust_exp (void)
+_initialize_rust_exp ()
 {
   int code = regcomp (&number_regex, number_regex_text, REG_EXTENDED);
   /* If the regular expression was incorrect, it was a programming
This page took 0.026027 seconds and 4 git commands to generate.