This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Make length_of_subexp static
- From: Simon Marchi <simark at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 14 Mar 2017 14:26:50 -0000
- Subject: [binutils-gdb] Make length_of_subexp static
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cf81cf6081d1a8c15c477f903d15d7b88f31b686
commit cf81cf6081d1a8c15c477f903d15d7b88f31b686
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Tue Mar 14 10:25:39 2017 -0400
Make length_of_subexp static
It isn't used anywhere else than the file it's defined in.
gdb/ChangeLog:
* parse.c (length_of_subexp): Make static.
* parser-defs.h (length_of_subexp): Remove.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/parse.c | 2 +-
gdb/parser-defs.h | 2 --
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e90fbc0..63d7441 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
+
+ * parse.c (length_of_subexp): Make static.
+ * parser-defs.h (length_of_subexp): Remove.
+
2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
* linux-nat.c (linux_proc_xfer_partial): Handle write operations
diff --git a/gdb/parse.c b/gdb/parse.c
index 9f89b1e..e6f6805 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -827,7 +827,7 @@ prefixify_expression (struct expression *expr)
/* Return the number of exp_elements in the postfix subexpression
of EXPR whose operator is at index ENDPOS - 1 in EXPR. */
-int
+static int
length_of_subexp (struct expression *expr, int endpos)
{
int oplen, args;
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 85da6a4..23757d9 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -246,8 +246,6 @@ extern void type_stack_cleanup (void *arg);
extern void push_typelist (VEC (type_ptr) *typelist);
-extern int length_of_subexp (struct expression *, int);
-
extern int dump_subexp (struct expression *, struct ui_file *, int);
extern int dump_subexp_body_standard (struct expression *,