commit - 85b8545edbd1ffba5d97ad74f360d2274db63726
commit + 3ca675a579e5dc06a10c199aa7b9d78eefa69642
blob - 3a1c058ebc51089ca977dc30d34464241e33d69b
blob + fc45ef28290c69445ce978692c748c25478381d0
--- src/cmd/gzip/gunzip.c
+++ src/cmd/gzip/gunzip.c
if(!table && verbose)
fprint(2, "extracting %s to %s\n", h.file, ofile);
- err = inflate((void*)ofd, crcwrite, bin, (int(*)(void*))Bgetc);
+ err = inflate((void*)(uintptr)ofd, crcwrite, bin, (int(*)(void*))Bgetc);
if(err != FlateOk)
error("inflate failed: %s", flateerr(err));
wlen += n;
crc = blockcrc(crctab, crc, buf, n);
- fd = (int)out;
+ fd = (int)(uintptr)out;
if(fd < 0)
return n;
nw = write(fd, buf, n);
blob - f4038b8869a051c321c02e677098996fd2f49b31
blob + 4379f405aeae2e84c6cf77110ed30574825b40fc
--- src/cmd/gzip/gzip.c
+++ src/cmd/gzip/gzip.c
crc = 0;
eof = 0;
totr = 0;
- err = deflate(bout, gzwrite, (void*)ifd, crcread, level, debug);
+ err = deflate(bout, gzwrite, (void*)(uintptr)ifd, crcread, level, debug);
if(err != FlateOk){
fprint(2, "gzip: deflate failed: %s\n", flateerr(err));
return 0;
nr = 0;
for(; !eof && n > 0; n -= m){
- m = read((int)fd, (char*)buf+nr, n);
+ m = read((int)(uintptr)fd, (char*)buf+nr, n);
if(m <= 0){
eof = 1;
if(m < 0)
blob - 990e4b6dbbcb7f5e287f3a34b35bf26f5055aea4
blob + ad43154f5eefa17cfbfc582e0f2efab1e7fca2cf
--- src/cmd/gzip/unzip.c
+++ src/cmd/gzip/unzip.c
error("copying data for %s failed: %r", zh.file);
}else if(zh.meth == 8){
off = Boffset(bin);
- err = inflate((void*)fd, crcwrite, bin, (int(*)(void*))Bgetc);
+ err = inflate((void*)(uintptr)fd, crcwrite, bin, (int(*)(void*))Bgetc);
if(err != FlateOk)
error("inflate failed: %s", flateerr(err));
rlen = Boffset(bin) - off;
wlen += n;
crc = blockcrc(crctab, crc, buf, n);
- fd = (int)out;
+ fd = (int)(uintptr)out;
if(fd < 0)
return n;
nw = write(fd, buf, n);
if(n <= 0)
return 0;
rlen += n;
- if(crcwrite((void*)ofd, buf, n) != n)
+ if(crcwrite((void*)(uintptr)ofd, buf, n) != n)
return 0;
}
return 1;
blob - bd87d2ec688c4246656fd4718c52511ace039231
blob + 73fb7db595657e570846da95a2ce23084fc155c6
--- src/cmd/gzip/zip.c
+++ src/cmd/gzip/zip.c
eof = 0;
totr = 0;
totw = 0;
- err = deflate(bout, zwrite, (void*)fd, crcread, level, debug);
+ err = deflate(bout, zwrite, (void*)(uintptr)fd, crcread, level, debug);
if(err != FlateOk)
error("deflate failed: %s: %r", flateerr(err));
nr = 0;
for(; !eof && n > 0; n -= m){
- m = read((int)fd, (char*)buf+nr, n);
+ m = read((int)(uintptr)fd, (char*)buf+nr, n);
if(m <= 0){
eof = 1;
if(m < 0)