Commit 13516383 authored by David du Colombier's avatar David du Colombier

cmd/gc, cmd/ld: fix Plan 9 warnings

warning: /usr/go/src/cmd/gc/obj.c:23 format mismatch -10d VLONG, arg 9
warning: /usr/go/src/cmd/gc/plive.c:1680 set and not used: printed
warning: /usr/go/src/cmd/ld/lib.c:332 non-interruptable temporary
warning: /usr/go/src/cmd/ld/lib.c:338 non-interruptable temporary

R=rsc
CC=golang-codereviews
https://golang.org/cl/53820046
parent bdd78a08
......@@ -20,7 +20,7 @@ enum
static void
formathdr(char *arhdr, char *name, vlong size)
{
snprint(arhdr, ArhdrSize, "%-16s%-12d%-6d%-6d%-8o%-10d`",
snprint(arhdr, ArhdrSize, "%-16s%-12d%-6d%-6d%-8o%-10lld`",
name, 0, 0, 0, 0644, size);
arhdr[ArhdrSize-1] = '\n'; // overwrite \0 written by snprint
}
......
......@@ -1676,10 +1676,9 @@ printbitset(int printed, char *name, Array *vars, Bvec *bits)
if(!bvget(bits, i))
continue;
if(!started) {
if(!printed) {
printed = 1;
if(!printed)
print("\t");
} else
else
print(" ");
started = 1;
printed = 1;
......
......@@ -329,13 +329,15 @@ objfile(char *file, char *pkg)
/* skip over optional __.GOSYMDEF and process __.PKGDEF */
off = Boffset(f);
if((l = nextar(f, off, &arhdr)) <= 0) {
l = nextar(f, off, &arhdr);
if(l <= 0) {
diag("%s: short read on archive file symbol header", file);
goto out;
}
if(strncmp(arhdr.name, symname, strlen(symname)) == 0) {
off += l;
if((l = nextar(f, off, &arhdr)) <= 0) {
l = nextar(f, off, &arhdr);
if(l <= 0) {
diag("%s: short read on archive file symbol header", file);
goto out;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment