diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-03-28 21:42:32 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-03-28 21:42:32 +0000 |
commit | f471e80ba5f92f4251d2609b86e351ccb98e27bc (patch) | |
tree | 3f76a9f57e647c4d97350a3f70560944f511e210 /gdb/monitor.c | |
parent | 76cbd54ce4ce2683b451f5a8027974d60cc220f0 (diff) | |
download | gdb-f471e80ba5f92f4251d2609b86e351ccb98e27bc.tar.gz |
Gag -Wuninitialized warnings.
Add -Wuninitialized to default warning list.
Diffstat (limited to 'gdb/monitor.c')
-rw-r--r-- | gdb/monitor.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/gdb/monitor.c b/gdb/monitor.c index 025a2cdabf5..78746b771d6 100644 --- a/gdb/monitor.c +++ b/gdb/monitor.c @@ -1691,7 +1691,6 @@ monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len) char membuf[sizeof (int) * 2 + 1]; char *p; char *cmd; - int i; monitor_debug ("MON read single\n"); #if 0 @@ -1751,29 +1750,31 @@ monitor_read_memory_single (CORE_ADDR memaddr, char *myaddr, int len) else monitor_error ("monitor_read_memory_single", "bad response from monitor", - memaddr, i, membuf, c); + memaddr, 0, NULL, 0); } - for (i = 0; i < len * 2; i++) - { - int c; - - while (1) - { - c = readchar (timeout); - if (isxdigit (c)) - break; - if (c == ' ') - continue; - monitor_error ("monitor_read_memory_single", - "bad response from monitor", - memaddr, i, membuf, c); - } + { + int i; + for (i = 0; i < len * 2; i++) + { + int c; + while (1) + { + c = readchar (timeout); + if (isxdigit (c)) + break; + if (c == ' ') + continue; + + monitor_error ("monitor_read_memory_single", + "bad response from monitor", + memaddr, i, membuf, 0); + } membuf[i] = c; } - - membuf[i] = '\000'; /* terminate the number */ + membuf[i] = '\000'; /* terminate the number */ + } /* If TERM is present, we wait for that to show up. Also, (if TERM is present), we will send TERM_CMD if that is present. In any case, we collect |