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

@@ -107,13 +107,13 @@ pr(ip, file, base)
len = strlen(ip->i_file)+1;
if (current_len + len > width || file != lastfile) {
lastfile = file;
sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
ip->i_file);
snprintf(buf, BUFSIZ, "\n%s%s%s: %s", objprefix, base,
objsuffix, ip->i_file);
len = current_len = strlen(buf);
}
else {
buf[0] = ' ';
strcpy(buf+1, ip->i_file);
strncpy(buf+1, ip->i_file, BUFSIZ - 1);
current_len += len;
}
fwrite(buf, len, 1, stdout);