aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-08-28 20:43:43 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-08-28 20:43:43 +0000
commitcb0fd152d6da9a4a6a677379107734d6a4595ad7 (patch)
tree19263c8b4bdb4e1fee52343a72d73a6538bebef6 /gdb/mi
parent91174723392cfb8acc1394c4d5e2bc35dd7980d0 (diff)
downloadgdb-cb0fd152d6da9a4a6a677379107734d6a4595ad7.zip
gdb-cb0fd152d6da9a4a6a677379107734d6a4595ad7.tar.gz
gdb-cb0fd152d6da9a4a6a677379107734d6a4595ad7.tar.bz2
gdb/
Code cleanup. * mi/mi-cmd-stack.c (list_args_or_locals): Remove stb initialization and the static keyword. * mi/mi-cmd-target.c (mi_cmd_target_file_get, mi_cmd_target_file_put): Make prefix an array. * mi/mi-cmd-target.c (mi_cmd_target_file_delete): Likewise. * mi/mi-main.c (get_register): Remove stb initialization and the static keyword.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmd-stack.c2
-rw-r--r--gdb/mi/mi-cmd-target.c6
-rw-r--r--gdb/mi/mi-main.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index ccd6b04..3ccdeae 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -247,7 +247,7 @@ list_args_or_locals (enum what_to_list what, int values, struct frame_info *fi)
struct symbol *sym;
struct dict_iterator iter;
struct cleanup *cleanup_list;
- static struct ui_stream *stb = NULL;
+ struct ui_stream *stb;
struct type *type;
char *name_of_result;
struct ui_out *uiout = current_uiout;
diff --git a/gdb/mi/mi-cmd-target.c b/gdb/mi/mi-cmd-target.c
index 14b22de..5f18365 100644
--- a/gdb/mi/mi-cmd-target.c
+++ b/gdb/mi/mi-cmd-target.c
@@ -33,7 +33,7 @@ mi_cmd_target_file_get (char *command, char **argv, int argc)
{
{ 0, 0, 0 }
};
- static const char *prefix = "-target-file-get";
+ static const char prefix[] = "-target-file-get";
if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 2)
@@ -57,7 +57,7 @@ mi_cmd_target_file_put (char *command, char **argv, int argc)
{
{ 0, 0, 0 }
};
- static const char *prefix = "-target-file-put";
+ static const char prefix[] = "-target-file-put";
if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 2)
@@ -81,7 +81,7 @@ mi_cmd_target_file_delete (char *command, char **argv, int argc)
{
{ 0, 0, 0 }
};
- static const char *prefix = "-target-file-delete";
+ static const char prefix[] = "-target-file-delete";
if (mi_getopt (prefix, argc, argv, opts, &optind, &optarg) != -1
|| optind != argc - 1)
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 7a9b4db..59fa576 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1119,7 +1119,7 @@ get_register (struct frame_info *frame, int regnum, int format)
struct ui_out *uiout = current_uiout;
CORE_ADDR addr;
enum lval_type lval;
- static struct ui_stream *stb = NULL;
+ struct ui_stream *stb;
struct value *val;
stb = ui_out_stream_new (uiout);