This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[obv] add static to some cmd_list_element


Hi,
This patch is to add 'static' to some 'struct cmd_list_element *'
variables, which are not used out of the file.  I'll check it in.

gdb:

2012-08-08  Yao Qi  <yao@codesourcery.com>

	* cli/cli-dump.c: Add 'static' to some cmd_list_element variables.
	* gnu-nat.c, symfile.c: Likewise.
---
 gdb/cli/cli-dump.c |   14 +++++++-------
 gdb/gnu-nat.c      |    4 ++--
 gdb/symfile.c      |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 7341f00..dd9c3b8 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -150,13 +150,13 @@ bfd_openw_with_cleanup (const char *filename, const char *target,
   return obfd;
 }
 
-struct cmd_list_element *dump_cmdlist;
-struct cmd_list_element *append_cmdlist;
-struct cmd_list_element *srec_cmdlist;
-struct cmd_list_element *ihex_cmdlist;
-struct cmd_list_element *tekhex_cmdlist;
-struct cmd_list_element *binary_dump_cmdlist;
-struct cmd_list_element *binary_append_cmdlist;
+static struct cmd_list_element *dump_cmdlist;
+static struct cmd_list_element *append_cmdlist;
+static struct cmd_list_element *srec_cmdlist;
+static struct cmd_list_element *ihex_cmdlist;
+static struct cmd_list_element *tekhex_cmdlist;
+static struct cmd_list_element *binary_dump_cmdlist;
+static struct cmd_list_element *binary_append_cmdlist;
 
 static void
 dump_command (char *cmd, int from_tty)
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 0c45f20..b486179 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2643,8 +2643,8 @@ gnu_target (void)
 
 /* User task commands.  */
 
-struct cmd_list_element *set_task_cmd_list = 0;
-struct cmd_list_element *show_task_cmd_list = 0;
+static struct cmd_list_element *set_task_cmd_list = 0;
+static struct cmd_list_element *show_task_cmd_list = 0;
 /* User thread commands.  */
 
 /* Commands with a prefix of `set/show thread'.  */
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 95ed480..da068a1 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3393,7 +3393,7 @@ overlay_load_command (char *args, int from_tty)
    A place-holder for a mis-typed command.  */
 
 /* Command list chain containing all defined "overlay" subcommands.  */
-struct cmd_list_element *overlaylist;
+static struct cmd_list_element *overlaylist;
 
 static void
 overlay_command (char *args, int from_tty)
-- 
1.7.7.6


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]