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.
This commit is contained in:
Stan Shebs
1995-02-02 00:10:50 +00:00
parent adad95c056
commit e3be225eb4
6 changed files with 155 additions and 185 deletions

View File

@@ -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;