Resolve many build warnings

This patch fixes many warnings from the beginning of the build up to
and including the depend stage. Nearly all warnings should be gone
even with -Wall.
This commit is contained in:
Ulrich Wilkens
2014-09-23 23:16:35 +02:00
committed by Jon Trulson
parent 2bf29e5d63
commit 42e891d9e7
125 changed files with 1926 additions and 1440 deletions

View File

@@ -161,7 +161,7 @@ my_if_errors (ip, cp, expecting)
int prefixlen;
int i;
sprintf (prefix, "\"%s\":%d", filename, lineno);
snprintf (prefix, 300, "\"%s\":%d", filename, lineno);
prefixlen = strlen(prefix);
fprintf (stderr, "%s: %s", prefix, pd->line);
i = cp - pd->line;
@@ -224,7 +224,7 @@ my_eval_variable (ip, var, len)
return 0;
do {
var = (*s)->s_value;
if (!isvarfirstletter(*var) || !strcmp((*s)->s_name, var))
if (!isvarfirstletter((int)*var) || !strcmp((*s)->s_name, var))
break;
s = lookup_variable (ip, var, strlen(var));
} while (s);
@@ -235,7 +235,7 @@ my_eval_variable (ip, var, len)
}
cppsetup(line, filep, inc)
int cppsetup(line, filep, inc)
register char *line;
register struct filepointer *filep;
register struct inclist *inc;