Commit 74f61fc6 authored by Lucio De Re's avatar Lucio De Re Committed by Russ Cox

gopack: fixes for Plan 9 build

. removed an unnexessary initialisation.
. replaced 0 with 0L to match print format that in turn matched
  the type of the original function return value.

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/5306072
parent 1eadb89e
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#define rcmd your_rcmd #define rcmd your_rcmd
#include <u.h> #include <u.h>
#include <time.h>
#include <libc.h> #include <libc.h>
#include <bio.h> #include <bio.h>
#include <mach.h> #include <mach.h>
...@@ -838,7 +837,6 @@ foundstart: ...@@ -838,7 +837,6 @@ foundstart:
goto bad; goto bad;
/* how big is it? */ /* how big is it? */
pkg = nil;
first = 1; first = 1;
start = end = 0; start = end = 0;
for (n=0; n<size; n+=Blinelen(b)) { for (n=0; n<size; n+=Blinelen(b)) {
...@@ -1102,7 +1100,7 @@ armove(Biobuf *b, Arfile *ap, Armember *bp) ...@@ -1102,7 +1100,7 @@ armove(Biobuf *b, Arfile *ap, Armember *bp)
for (cp = strchr(bp->hdr.name, 0); /* blank pad on right */ for (cp = strchr(bp->hdr.name, 0); /* blank pad on right */
cp < bp->hdr.name+sizeof(bp->hdr.name); cp++) cp < bp->hdr.name+sizeof(bp->hdr.name); cp++)
*cp = ' '; *cp = ' ';
sprint(bp->hdr.date, "%-12ld", 0); // was d->mtime but removed for idempotent builds sprint(bp->hdr.date, "%-12ld", 0L); // was d->mtime but removed for idempotent builds
sprint(bp->hdr.uid, "%-6d", 0); sprint(bp->hdr.uid, "%-6d", 0);
sprint(bp->hdr.gid, "%-6d", 0); sprint(bp->hdr.gid, "%-6d", 0);
sprint(bp->hdr.mode, "%-8lo", d->mode); sprint(bp->hdr.mode, "%-8lo", d->mode);
...@@ -1236,7 +1234,7 @@ rl(int fd) ...@@ -1236,7 +1234,7 @@ rl(int fd)
len = symdefsize; len = symdefsize;
if(len&01) if(len&01)
len++; len++;
sprint(a.date, "%-12ld", 0); // time(0) sprint(a.date, "%-12ld", 0L); // time(0)
sprint(a.uid, "%-6d", 0); sprint(a.uid, "%-6d", 0);
sprint(a.gid, "%-6d", 0); sprint(a.gid, "%-6d", 0);
sprint(a.mode, "%-8lo", 0644L); sprint(a.mode, "%-8lo", 0644L);
...@@ -1273,7 +1271,7 @@ rl(int fd) ...@@ -1273,7 +1271,7 @@ rl(int fd)
if (gflag) { if (gflag) {
len = pkgdefsize; len = pkgdefsize;
sprint(a.date, "%-12ld", 0); // time(0) sprint(a.date, "%-12ld", 0L); // time(0)
sprint(a.uid, "%-6d", 0); sprint(a.uid, "%-6d", 0);
sprint(a.gid, "%-6d", 0); sprint(a.gid, "%-6d", 0);
sprint(a.mode, "%-8lo", 0644L); sprint(a.mode, "%-8lo", 0644L);
......
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