FYI: don't export operator_chars
Tom Tromey
tromey@redhat.com
Tue Jul 5 20:32:00 GMT 2011
I'm checking this in.
I happened to notice that nothing calls operator_chars outside
symtab.c. This patch makes it static.
Built on x86-64 F15.
Tom
2011-07-05 Tom Tromey <tromey@redhat.com>
* symtab.c (operator_chars): Now static.
* linespec.c (operator_chars): Don't declare.
Index: linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.127
diff -u -r1.127 linespec.c
--- linespec.c 4 Jul 2011 18:31:25 -0000 1.127
+++ linespec.c 5 Jul 2011 20:27:21 -0000
@@ -44,10 +44,6 @@
#include <ctype.h>
#include "cli/cli-utils.h"
-/* We share this one with symtab.c, but it is not exported widely. */
-
-extern char *operator_chars (char *, char **);
-
/* Prototypes for local functions. */
static void initialize_defaults (struct symtab **default_symtab,
Index: symtab.c
===================================================================
RCS file: /cvs/src/src/gdb/symtab.c,v
retrieving revision 1.281
diff -u -r1.281 symtab.c
--- symtab.c 4 Jul 2011 18:51:12 -0000 1.281
+++ symtab.c 5 Jul 2011 20:27:21 -0000
@@ -83,10 +83,6 @@
static int find_line_common (struct linetable *, int, int *);
-/* This one is used by linespec.c */
-
-char *operator_chars (char *p, char **end);
-
static struct symbol *lookup_symbol_aux (const char *name,
const struct block *block,
const domain_enum domain,
@@ -2637,7 +2633,7 @@
some legitimate operator text, return a pointer to the
beginning of the substring of the operator text.
Otherwise, return "". */
-char *
+static char *
operator_chars (char *p, char **end)
{
*end = "";
More information about the Gdb-patches
mailing list