aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-20 17:19:04 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-20 17:19:04 +0000
commit8e2eec6299985a70b0b17c6bd14c6a1c29e3db86 (patch)
treec2e10050d21cab4171a75af43cd4efcdf4fbaa34 /gdb/mi
parent764f1408a3fa9b1991e3e18d17ea857776c1503e (diff)
downloadgdb-8e2eec6299985a70b0b17c6bd14c6a1c29e3db86.zip
gdb-8e2eec6299985a70b0b17c6bd14c6a1c29e3db86.tar.gz
gdb-8e2eec6299985a70b0b17c6bd14c6a1c29e3db86.tar.bz2
Zap -Wuninitialized warnings.
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/ChangeLog5
-rw-r--r--gdb/mi/mi-cmd-disas.c15
2 files changed, 13 insertions, 7 deletions
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 5215ca5..dd6399c 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-20 Andrew Cagney <ac131313@redhat.com>
+
+ * mi-cmd-disas.c (mi_cmd_disassemble): Initialize ``file_string''
+ and ``line_num''. Consolidate declaration of argument variables.
+
2001-03-19 Andrew Cagney <ac131313@redhat.com>
* mi-out.h: Remove #ifdef __STDC__.
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index 3a1ea3c..1937eb0 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -112,15 +112,9 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
{
CORE_ADDR pc;
CORE_ADDR start;
- CORE_ADDR low = 0;
- CORE_ADDR high = 0;
- int how_many = -1;
int mixed_source_and_assembly;
int num_displayed;
- int line_num;
-
- char *file_string;
static disassemble_info di;
static int di_initialized;
@@ -136,13 +130,20 @@ mi_cmd_disassemble (char *command, char **argv, int argc)
char *filename = NULL;
char *name = NULL;
- /* Which options have we processed? */
+ /* Which options have we processed ... */
int file_seen = 0;
int line_seen = 0;
int num_seen = 0;
int start_seen = 0;
int end_seen = 0;
+ /* ... and their corresponding value. */
+ char *file_string = NULL;
+ int line_num = -1;
+ int how_many = -1;
+ CORE_ADDR low = 0;
+ CORE_ADDR high = 0;
+
/* Options processing stuff. */
int optind = 0;
char *optarg;