aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1995-02-02 00:10:50 +0000
committerStan Shebs <shebs@codesourcery.com>1995-02-02 00:10:50 +0000
commite3be225eb4b1f6317662be790f67ca8e291ef64f (patch)
tree68e78618758253b8e20ba9746bb4e5c4c94f4f6e /gdb/top.c
parentadad95c056f31cd63195cb554ce084546771c9b9 (diff)
downloadgdb-e3be225eb4b1f6317662be790f67ca8e291ef64f.zip
gdb-e3be225eb4b1f6317662be790f67ca8e291ef64f.tar.gz
gdb-e3be225eb4b1f6317662be790f67ca8e291ef64f.tar.bz2
gcc -Wall lint.
* alpha-tdep.c (alpha_in_lenient_prologue): Comment out. (after_prologue): Remove unused local b. * procfs.c (thread.h): Include. (pr_flag_table, pr_why_table, faults_table, siginfo_table): Use nested braces in initializer. * top.c (initialize_targets, initialize_utils): Declare. (locate_arg, insert_args): Add parens around tested assignments. * remote-utils.c (sr_scan_args): Remove decl of strtol. * remote.c (thread.h): Include. (remote_wait): Remove unused local p2. * sparc-tdep.c (fill_gregset, fill_fpregset): Remove decls of registers array. defs.h (stdlib.h): Include. (exit, perror, atoi, qsort, memcpy, memcmp): Don't declare. (fclose, atof, malloc, realloc, free, strchr, strrchr, strstr, strtok, strerror): Don't specify parameter types in declaration.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gdb/top.c b/gdb/top.c
index d89d2cf..f035ebe 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -56,6 +56,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/stat.h>
#include <ctype.h>
+extern void initialize_targets PARAMS ((void));
+
+extern void initialize_utils PARAMS ((void));
+
/* Prototypes for local functions */
static char * line_completion_function PARAMS ((char *, int, char *, int));
@@ -1004,7 +1008,7 @@ static char *
locate_arg (p)
char *p;
{
- while (p = strchr (p, '$'))
+ while ((p = strchr (p, '$')))
{
if (strncmp (p, "$arg", 4) == 0 && isdigit (p[4]))
return p;
@@ -1026,7 +1030,7 @@ insert_args (line)
/* First we need to know how much memory to allocate for the new line. */
save_line = line;
len = 0;
- while (p = locate_arg (line))
+ while ((p = locate_arg (line)))
{
len += p - line;
i = p[4] - '0';
@@ -1054,7 +1058,7 @@ insert_args (line)
/* Save pointer to beginning of new line. */
save_line = new_line;
- while (p = locate_arg (line))
+ while ((p = locate_arg (line)))
{
int i, len;
@@ -1062,7 +1066,8 @@ insert_args (line)
new_line += p - line;
i = p[4] - '0';
- if (len = user_args->a[i].len)
+ len = user_args->a[i].len;
+ if (len)
{
memcpy (new_line, user_args->a[i].arg, len);
new_line += len;