Sat Feb 7 23:54:29 1998 Robert Lipe <robertl@dgii.com>
+ * gcc.c: Include <strings.h>/<string.h>, <stdlib.h>, <unistd.h>,
+ <fcntl.h>.
+ (free_path_suffix): Remove unreferenced static function.
+ (process_command): Remove unused variable temp.
+ (default_arg): Remove unused variable i.
+ (do_spec_1): Add parens for assignment used as truth value.
+ (main): Likewise.
+ (validate_all_switches): Likewise.
+ (main): Remove unused variables i, first_time>
+
* c-common.c: Include <stdlib.h> and <string.h>/<strings.h>.
* calls.c (expand_call): Remove unused variables funtree,
#endif
#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
#ifndef R_OK
#define R_OK 4
#define W_OK 2
}
}
-/* Get rid of all prefixes built up so far in *PLISTP. */
-
-static void
-free_path_prefix (pprefix)
- struct path_prefix *pprefix;
-{
- struct prefix_list *pl = pprefix->plist;
- struct prefix_list *temp;
-
- while (pl)
- {
- temp = pl;
- pl = pl->next;
- free (temp->prefix);
- free ((char *) temp);
- }
-
- pprefix->plist = (struct prefix_list *) 0;
-}
\f
/* Execute the command specified by the arguments on the current line of spec.
When using pipes, this includes several piped-together commands
case 'B':
{
- int *temp = (int *) xmalloc (sizeof (int));
char *value;
if (p[1] == 0 && i + 1 == argc)
fatal ("argument to `-B' is missing");
char *string;
int value;
- while (c = *p++)
+ while ((c = *p++))
/* If substituting a switch, treat all chars like letters.
Otherwise, NL, SPC, TAB and % are special. */
switch (inswitch ? 'a' : c)
first_time = FALSE;
obstack_grow (&collect_obstack, "'-", 2);
q = switches[i].part1;
- while (p = (char *) index (q,'\''))
+ while ((p = (char *) index (q,'\'')))
{
obstack_grow (&collect_obstack, q, p-q);
obstack_grow (&collect_obstack, "'\\''", 4);
{
obstack_grow (&collect_obstack, " '", 2);
q = *args;
- while (p = (char *) index (q,'\''))
+ while ((p = (char *) index (q,'\'')))
{
obstack_grow (&collect_obstack, q, p-q);
obstack_grow (&collect_obstack, "'\\''", 4);
if (error_count == 0)
{
int tmp = execution_count;
- int i;
- int first_time;
/* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
for collect. */
for (i = 0; i < sizeof comp->spec / sizeof comp->spec[0] && comp->spec[i]; i++)
{
p = comp->spec[i];
- while (c = *p++)
+ while ((c = *p++))
if (c == '%' && *p == '{')
/* We have a switch spec. */
validate_switches (p + 1);
for (spec = specs; spec ; spec = spec->next)
{
p = *(spec->ptr_spec);
- while (c = *p++)
+ while ((c = *p++))
if (c == '%' && *p == '{')
/* We have a switch spec. */
validate_switches (p + 1);
}
p = link_command_spec;
- while (c = *p++)
+ while ((c = *p++))
if (c == '%' && *p == '{')
/* We have a switch spec. */
validate_switches (p + 1);
int len;
{
char *start, *end;
- int i;
for (start = multilib_defaults; *start != '\0'; start = end+1)
{