Commit ebc4c413 authored by Mike Hibler's avatar Mike Hibler

Move a little closer to being pedantic ansi:

- add some missing casts
- avoid void * arithmetic
- change "q" printf formats to "ll"

Still not there yet by any means.  Note that the version of the NTFS library
we use won't compile with "-pedantic -ansi" so those are not part of the
default CFLAGS.
parent fc92b2b3
......@@ -115,7 +115,7 @@ union mapsect {
};
#define MSECT_S_SIZE 512
static inline u_int32_t
static __inline u_int32_t
getsector(sectaddr_t *sect)
{
int flags = (sect->device & DEVFLAGS) & ~HARD_DISK;
......@@ -146,7 +146,7 @@ getsector(sectaddr_t *sect)
return sector;
}
static inline void
static __inline void
putsector(sectaddr_t *sect, u_int32_t sector, int device, int nsect)
{
int flags = (device & DEVFLAGS) & ~HARD_DISK;
......@@ -168,7 +168,7 @@ putsector(sectaddr_t *sect, u_int32_t sector, int device, int nsect)
#define LILO_CKSUM 0xabcd
static inline uint16_t
static __inline uint16_t
lilocksum(union idescriptors *idp, uint16_t sum)
{
uint16_t *up = (uint16_t *)idp;
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2003 University of Utah and the Flux Group.
* Copyright (c) 2003, 2004 University of Utah and the Flux Group.
* All rights reserved.
*/
......@@ -60,7 +60,8 @@ read_fatslice(int slice, int stype, u_int32_t start, u_int32_t size,
return 1;
}
if (readfat(infd, &boot, boot.ValidFat >= 0 ?: 0, &fat) != FSOK)
if (readfat(infd, &boot,
boot.ValidFat >= 0 ? boot.ValidFat : 0, &fat) != FSOK)
return 1;
free(fat);
......
......@@ -214,7 +214,7 @@ read_bsdpartition(int infd, struct disklabel *dlabel, int part)
fs.fs_cstotal.cs_nffree;
if (debug) {
fprintf(stderr, " bfree %9qd, bsize %9d, cgsize %9d\n",
fprintf(stderr, " bfree %9lld, bsize %9d, cgsize %9d\n",
fs.fs_cstotal.cs_nbfree, fs.fs_bsize, fs.fs_cgsize);
}
assert(fs.fs_cgsize <= MAXBSIZE);
......@@ -229,7 +229,7 @@ read_bsdpartition(int infd, struct disklabel *dlabel, int part)
if (devlseek(infd, sectobytes(cgoff), SEEK_SET) < 0) {
warn("BSD Partition '%c': "
"Could not seek to cg %d at %qd",
"Could not seek to cg %d at %lld",
BSDPARTNAME(part), i, sectobytes(cgoff));
return 1;
}
......@@ -372,14 +372,14 @@ static int
read_bsdcg(struct fs *fsp, struct cg *cgp, unsigned int dbstart)
{
int i, max;
char *p;
u_int8_t *p;
int count, j;
max = fsp->fs_fpg;
p = cg_blksfree(cgp);
/* paranoia: make sure we stay in the buffer */
assert(&p[max/NBBY] <= (char *)cgp + fsp->fs_cgsize);
assert(&p[max/NBBY] <= (u_int8_t *)cgp + fsp->fs_cgsize);
/*
* XXX The bitmap is fragments, not FS blocks.
......
......@@ -245,26 +245,26 @@ dumpfile(char *name, int fd)
if (detail > 0)
printf("\n");
printf(" %qu bytes of overhead/wasted space (%5.2f%% of image file)\n",
printf(" %llu bytes of overhead/wasted space (%5.2f%% of image file)\n",
wasted, (double)wasted / filesize * 100);
if (relocs)
printf(" %d relocations covering %qu bytes\n",
printf(" %d relocations covering %llu bytes\n",
relocs, relocbytes);
printf(" %qu bytes of compressed data\n",
printf(" %llu bytes of compressed data\n",
cbytes);
printf(" %5.2fx compression of allocated data (%qu bytes)\n",
printf(" %5.2fx compression of allocated data (%llu bytes)\n",
(double)dbytes / cbytes, dbytes);
printf(" %5.2fx compression of total known disk size (%qu bytes)\n",
printf(" %5.2fx compression of total known disk size (%llu bytes)\n",
(double)tbytes / cbytes, tbytes);
if (franges)
printf(" %d free ranges: %qu/%qu/%qu ave/min/max size\n",
printf(" %d free ranges: %llu/%llu/%llu ave/min/max size\n",
franges, SECTOBYTES(sectfree)/franges,
SECTOBYTES(fmin), SECTOBYTES(fmax));
if (aranges) {
int maxsz, i;
printf(" %d allocated ranges: %qu/%qu/%qu ave/min/max size\n",
printf(" %d allocated ranges: %llu/%llu/%llu ave/min/max size\n",
aranges, SECTOBYTES(sectinuse)/aranges,
SECTOBYTES(amin), SECTOBYTES(amax));
printf(" size distribution:\n");
......
......@@ -65,7 +65,7 @@ struct hashinfo {
typedef struct readbuf {
queue_chain_t chain;
struct region region;
char data[0];
unsigned char data[0];
} readbuf_t;
static unsigned long maxreadbufmem = MAXREADBUFMEM;
......@@ -88,10 +88,10 @@ static void dumphash(char *name, struct hashinfo *hinfo);
static int createhash(char *name, struct hashinfo **hinfop);
static int hashimage(char *name, struct hashinfo **hinfop);
static int hashchunk(int chunkno, char *chunkbufp, struct hashinfo **hinfop);
static char *spewhash(char *h);
static char *spewhash(unsigned char *h);
static int imagecmp(char *ifile, char *dev);
static int datacmp(uint32_t off, uint32_t size, char *idata);
static int datacmp(uint32_t off, uint32_t size, unsigned char *idata);
static int startreader(char *name, struct hashinfo *hinfo);
static void stopreader(void);
......@@ -278,7 +278,8 @@ readhashinfo(char *name, struct hashinfo **hinfop)
free(hname);
return -1;
}
if (strcmp(hi.magic, HASH_MAGIC) != 0 || hi.version != HASH_VERSION) {
if (strcmp((char *)hi.magic, HASH_MAGIC) != 0 ||
hi.version != HASH_VERSION) {
fprintf(stderr, "%s: not a valid signature file\n", hname);
goto bad;
}
......@@ -303,7 +304,7 @@ readhashinfo(char *name, struct hashinfo **hinfop)
static void
addhash(struct hashinfo **hinfop, int chunkno, uint32_t start, uint32_t size,
char hash[HASH_MAXSIZE])
unsigned char hash[HASH_MAXSIZE])
{
struct hashinfo *hinfo = *hinfop;
int nreg;
......@@ -347,7 +348,7 @@ dumphash(char *name, struct hashinfo *hinfo)
}
static char *
spewhash(char *h)
spewhash(unsigned char *h)
{
static char hbuf[33];
uint32_t *foo = (uint32_t *)h;
......@@ -390,7 +391,7 @@ createhash(char *name, struct hashinfo **hinfop)
* Write the image file
*/
hinfo = *hinfop;
strcpy(hinfo->magic, HASH_MAGIC);
strcpy((char *)hinfo->magic, HASH_MAGIC);
hinfo->version = HASH_VERSION;
hinfo->hashtype = hashtype;
count = sizeof(*hinfo) + hinfo->nregions*sizeof(struct hashregion);
......@@ -408,10 +409,10 @@ createhash(char *name, struct hashinfo **hinfop)
free(hfile);
nhregions = hinfo->nregions;
printf("%s: %lu chunks, %lu regions, %lu hashregions, %qu data bytes\n",
printf("%s: %lu chunks, %lu regions, %lu hashregions, %llu data bytes\n",
name, nchunks, nregions, nhregions, ndatabytes);
#ifdef TIMEIT
printf("%qu bytes: inflate cycles: %qu\n", ndatabytes, dcycles);
printf("%qu bytes: inflate cycles: %llu\n", ndatabytes, dcycles);
#endif
return 0;
}
......@@ -536,15 +537,15 @@ checkhash(char *name, struct hashinfo *hinfo)
stopreader();
nhregions = hinfo->nregions;
printf("%s: %lu chunks, %lu hashregions, %qu data bytes\n",
printf("%s: %lu chunks, %lu hashregions, %llu data bytes\n",
name, nchunks, nhregions, ndatabytes);
if (badhashes)
printf("%s: %u regions (%d chunks) had bad hashes, "
"%qu bytes affected\n",
"%llu bytes affected\n",
name, badhashes, badchunks, badhashdata);
dump_readbufs();
#ifdef TIMEIT
printf("%qu bytes: read cycles: %qu, hash cycles: %qu, cmp cycles: %qu\n",
printf("%llu bytes: read cycles: %llu, hash cycles: %llu, cmp cycles: %llu\n",
ndatabytes, rcycles, hcycles, ccycles);
#endif
return 0;
......@@ -635,11 +636,11 @@ fullcmp(void *p1, void *p2, off_t sz, uint32_t soff)
if (ip[off] == dp[off]) {
if (boff != -1 &&
off+1 < sz && ip[off+1] == dp[off+1]) {
fprintf(stderr, " [%qu-%qu]: bad",
fprintf(stderr, " [%llu-%llu]: bad",
byoff+boff, byoff+off-1);
reloc = hasrelocs(byoff+boff, off-boff);
if (reloc)
fprintf(stderr, " (overlaps reloc [%qu-%qu])",
fprintf(stderr, " (overlaps reloc [%llu-%llu])",
sectobytes(reloc->sector)+reloc->sectoff,
sectobytes(reloc->sector)+reloc->sectoff+reloc->size-1);
fprintf(stderr, "\n");
......@@ -659,10 +660,10 @@ fullcmp(void *p1, void *p2, off_t sz, uint32_t soff)
off++;
}
if (boff != -1) {
fprintf(stderr, " [%qu-%qu] bad", byoff+boff, byoff+off-1);
fprintf(stderr, " [%llu-%llu] bad", byoff+boff, byoff+off-1);
reloc = hasrelocs(byoff+boff, off-boff);
if (reloc)
fprintf(stderr, " (overlaps reloc [%qu-%qu])",
fprintf(stderr, " (overlaps reloc [%llu-%llu])",
sectobytes(reloc->sector)+reloc->sectoff,
sectobytes(reloc->sector)+reloc->sectoff+reloc->size-1);
fprintf(stderr, "\n");
......@@ -677,7 +678,7 @@ fullcmp(void *p1, void *p2, off_t sz, uint32_t soff)
}
static int
datacmp(uint32_t off, uint32_t size, char *idata)
datacmp(uint32_t off, uint32_t size, unsigned char *idata)
{
readbuf_t *rbuf;
......@@ -760,7 +761,7 @@ hashchunk(int chunkno, char *chunkbufp, struct hashinfo **hinfop)
struct region *regp;
z_stream z;
int err, nreg;
char hash[HASH_MAXSIZE];
unsigned char hash[HASH_MAXSIZE];
unsigned char *(*hashfunc)(const unsigned char *, unsigned long,
unsigned char *);
readbuf_t *rbuf;
......@@ -787,8 +788,8 @@ hashchunk(int chunkno, char *chunkbufp, struct hashinfo **hinfop)
*/
blockhdr = (blockhdr_t *)chunkbufp;
chunkbufp += DEFAULTREGIONSIZE;
nregions += blockhdr->regioncount;
z.next_in = chunkbufp;
nregions += (uint32_t)blockhdr->regioncount;
z.next_in = (Bytef *)chunkbufp;
z.avail_in = blockhdr->size;
setrelocs(0, 0);
......@@ -848,7 +849,7 @@ hashchunk(int chunkno, char *chunkbufp, struct hashinfo **hinfop)
else
hsize = rsize;
z.next_out = rbuf->data;
z.next_out = (Bytef *)rbuf->data;
z.avail_out = sectobytes(hsize);
#ifdef TIMEIT
sstamp = rdtsc();
......
......@@ -87,7 +87,9 @@ static struct timeval stamp;
#endif
int readmbr(int slice);
int fixmbr(int slice, int dtype);
#ifdef FRISBEE
static int write_subblock(int, char *);
#endif
static int inflate_subblock(char *);
void writezeros(off_t offset, off_t zcount);
void writedata(off_t offset, size_t count, void *buf);
......@@ -191,7 +193,7 @@ dump_stats(int sig)
while (dotcol++ <= 60)
fprintf(stderr, " ");
fprintf(stderr, "%4ld %13qd\n", estamp.tv_sec, totaledata);
fprintf(stderr, "%4ld %13lld\n", estamp.tv_sec, totaledata);
}
else {
if (sig) {
......@@ -204,7 +206,7 @@ dump_stats(int sig)
fprintf(stderr, "%d chunks decompressed\n",
donechunks);
}
fprintf(stderr, "Wrote %qd bytes (%qd actual) in %ld seconds\n",
fprintf(stderr, "Wrote %lld bytes (%lld actual) in %ld seconds\n",
totaledata, totalrdata, estamp.tv_sec);
}
if (debug)
......@@ -420,7 +422,7 @@ dowrite_request(writebuf_t *wbuf)
#endif
}
static inline int devread(int fd, void *buf, size_t size)
static __inline int devread(int fd, void *buf, size_t size)
{
assert((size & (SECSIZE-1)) == 0);
return read(fd, buf, size);
......@@ -447,7 +449,7 @@ usage(void)
}
int
main(int argc, char **argv)
main(int argc, char *argv[])
{
int i, ch;
extern char build_info[];
......@@ -926,6 +928,7 @@ DiskWriter(void *arg)
}
#endif
#ifdef FRISBEE
/*
* Just write the raw, compressed chunk data to disk
*/
......@@ -948,6 +951,7 @@ write_subblock(int chunkno, char *chunkbufp)
}
return 0;
}
#endif
static int
inflate_subblock(char *chunkbufp)
......@@ -1034,7 +1038,7 @@ inflate_subblock(char *chunkbufp)
blockhdr->regioncount--;
if (debug == 1)
fprintf(stderr, "Decompressing: %14qd --> ", offset);
fprintf(stderr, "Decompressing: %14lld --> ", offset);
wbuf = NULL;
while (1) {
......@@ -1043,7 +1047,7 @@ inflate_subblock(char *chunkbufp)
*/
count = blockhdr->size;
blockhdr->size = 0;
d_stream.next_in = chunkbufp;
d_stream.next_in = (Bytef *)chunkbufp;
d_stream.avail_in = count;
chunkbufp += count;
chunkbytes -= count;
......@@ -1062,11 +1066,19 @@ inflate_subblock(char *chunkbufp)
/*
* Adjust the decompression params to account for the resid
*/
d_stream.next_out = &wbuf->data[ibleft];
d_stream.next_out = (Bytef *)&wbuf->data[ibleft];
d_stream.avail_out = OUTSIZE - ibleft;
#ifdef FRISBEE
sched_yield();
#if !defined(NOTHREADS) && defined(FRISBEE)
/*
* XXX this may be a FreeBSD/linuxthreads specific thing
* but it seems that the decompression thread can run way
* longer than a timeslice causing incoming packets to
* get dropped before the network thread can be rescheduled.
* So force the decompressor to take a break once in awhile.
*/
if (!nothreads)
sched_yield();
#endif
/*
* Inflate a chunk
......@@ -1121,7 +1133,7 @@ inflate_subblock(char *chunkbufp)
if (debug == 2) {
fprintf(stderr,
"%12qd %8d %8d %12qd %10qd %8d %5d %8d"
"%12lld %8d %8d %12lld %10lld %8d %5d %8d"
"\n",
offset, cc, count, totaledata, size,
ibsize, ibleft, d_stream.avail_in);
......@@ -1213,7 +1225,7 @@ inflate_subblock(char *chunkbufp)
}
if (debug == 1) {
fprintf(stderr, "%14qd\n", offset);
fprintf(stderr, "%14lld\n", offset);
}
#ifndef FRISBEE
else if (dots) {
......@@ -1223,7 +1235,7 @@ inflate_subblock(char *chunkbufp)
gettimeofday(&estamp, 0);
estamp.tv_sec -= stamp.tv_sec;
fprintf(stderr, "%4ld %13qd\n",
fprintf(stderr, "%4ld %13lld\n",
estamp.tv_sec, totaledata);
dotcol = 0;
......@@ -1257,7 +1269,7 @@ writezeros(off_t offset, off_t zcount)
}
nextwriteoffset = offset;
} else if (offset != nextwriteoffset) {
fprintf(stderr, "Non-contiguous write @ %qu (should be %qu)\n",
fprintf(stderr, "Non-contiguous write @ %llu (should be %llu)\n",
offset, nextwriteoffset);
exit(1);
}
......@@ -1270,7 +1282,7 @@ writezeros(off_t offset, off_t zcount)
#ifndef FRISBEE
if (docrconly)
compute_crc(zeros, zcc, &crc);
compute_crc((u_char *)zeros, zcc, &crc);
else
#endif
if ((zcc = write(outfd, zeros, zcc)) != zcc) {
......@@ -1294,7 +1306,7 @@ writedata(off_t offset, size_t size, void *buf)
#ifndef FRISBEE
if (docrconly) {
compute_crc(buf, size, &crc);
compute_crc((u_char *)buf, size, &crc);
cc = size;
} else
#endif
......@@ -1303,7 +1315,7 @@ writedata(off_t offset, size_t size, void *buf)
} else if (offset == nextwriteoffset) {
cc = write(outfd, buf, size);
} else {
fprintf(stderr, "Non-contiguous write @ %qu (should be %qu)\n",
fprintf(stderr, "Non-contiguous write @ %llu (should be %llu)\n",
offset, nextwriteoffset);
exit(1);
}
......@@ -1357,7 +1369,7 @@ readmbr(int slice)
outputmaxsize = (long long)sectobytes(outputmaxsec - outputminsec);
if (debug) {
fprintf(stderr, "Slice Mode: S:%d min:%ld max:%ld size:%qd\n",
fprintf(stderr, "Slice Mode: S:%d min:%ld max:%ld size:%lld\n",
slice, outputminsec, outputmaxsec, outputmaxsize);
}
return 0;
......@@ -1431,7 +1443,7 @@ getrelocinfo(blockhdr_t *hdr)
}
relocs = (struct blockreloc *)
((void *)&hdr[1] + hdr->regioncount * sizeof(struct region));
((char *)&hdr[1] + hdr->regioncount * sizeof(struct region));
memcpy(reloctable, relocs, numrelocs * sizeof(struct blockreloc));
}
......@@ -1457,8 +1469,8 @@ applyrelocs(off_t offset, size_t size, void *buf)
coff = (u_int32_t)(roffset - offset);
if (debug > 1)
fprintf(stderr,
"Applying reloc type %d [%qu-%qu] "
"to [%qu-%qu]\n", reloc->type,
"Applying reloc type %d [%llu-%llu] "
"to [%llu-%llu]\n", reloc->type,
roffset, roffset+reloc->size,
offset, offset+size);
switch (reloc->type) {
......@@ -1468,13 +1480,14 @@ applyrelocs(off_t offset, size_t size, void *buf)
case RELOC_FBSDDISKLABEL:
case RELOC_OBSDDISKLABEL:
assert(reloc->size >= sizeof(struct disklabel));
reloc_bsdlabel((struct disklabel *)(buf+coff),
reloc_bsdlabel((struct disklabel *)((char *)buf+coff),
reloc->type);
break;
#endif
case RELOC_LILOSADDR:
case RELOC_LILOMAPSECT:
reloc_lilo(buf+coff, reloc->type, reloc->size);
reloc_lilo((char *)buf+coff, reloc->type,
reloc->size);
break;
case RELOC_LILOCKSUM:
reloc_lilocksum(buf, coff, reloc->size);
......@@ -1607,7 +1620,7 @@ reloc_lilocksum(void *addr, uint32_t off, uint32_t size)
assert(size == 2);
assert(off >= sizeof(struct idtab));
addr += off;
addr = (void *)((char *)addr + off);
/*
* XXX total hack: reloc entry points to the end of the
......
......@@ -126,7 +126,7 @@ struct slicemap fsmap[] = {
{ -1, "", 0 },
};
static inline struct slicemap *
static __inline struct slicemap *
getslicemap(int stype)
{
struct slicemap *smap;
......@@ -182,7 +182,7 @@ devread(int fd, void *buf, size_t nbytes)
if (cc > 0) {
nbytes -= cc;
buf += cc;
buf = (void *)((char *)buf + cc);
count += cc;
continue;
}
......@@ -193,7 +193,7 @@ devread(int fd, void *buf, size_t nbytes)
strerror(errno), IORETRIES-1);
nbytes += count;
buf -= count;
buf = (void *)((char *)buf - count);
count = 0;
goto again;
}
......@@ -235,7 +235,7 @@ devwrite(int fd, const void *buf, size_t nbytes)
if (cc > 0) {
nbytes -= cc;
buf += cc;
buf = (void *)((char *)buf + cc);
count += cc;
continue;
}
......@@ -248,7 +248,7 @@ devwrite(int fd, const void *buf, size_t nbytes)
sleep(1);
nbytes += count;
buf -= count;
buf = (void *)((char *)buf - count);
count = 0;
goto again;
}
......@@ -256,7 +256,7 @@ devwrite(int fd, const void *buf, size_t nbytes)
perror("fsync error: will retry");
sleep(1);
nbytes += count;
buf -= count;
buf = (void *)((char *)buf - count);
count = 0;
goto again;
}
......@@ -304,9 +304,7 @@ setpartition(partmap_t map, char *str)
}
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
int ch, rval;
char *outfilename = 0;
......@@ -593,7 +591,7 @@ read_image(u_int32_t bbstart, int pstart, u_int32_t extstart)
*/
rval = read_image(extstart + doslabel.parts[i].dp_start,
pstart + NDOSPART,
extstart ?: start);
extstart ? extstart : start);
/* XXX for inputmaxsec calculation below */
start = extstart + doslabel.parts[i].dp_start;
break;
......@@ -665,7 +663,7 @@ read_raw(void)
if (debug) {
fprintf(stderr, " Raw Image\n");
fprintf(stderr, " start %12d, size %12qd\n", 0, size);
fprintf(stderr, " start %12d, size %12lld\n", 0, size);
}
return 0;
}
......@@ -708,7 +706,7 @@ addskip(uint32_t start, uint32_t size)
{
struct range *skip;
if (size == 0 || size < frangesize)
if (size == 0 || size < (uint32_t)frangesize)
return;
if ((skip = (struct range *) malloc(sizeof(*skip))) == NULL) {
......@@ -752,7 +750,7 @@ dumpskips(int verbose)
pskip = pskip->next;
}
fprintf(stderr, "Total Number of Free Sectors: %d (bytes %qd)\n",
fprintf(stderr, "Total Number of Free Sectors: %d (bytes %lld)\n",
total, sectobytes(total));
}
......@@ -899,7 +897,7 @@ dumpranges(int verbose)
range = range->next;
}
fprintf(stderr,
"Total Number of Valid Sectors: %d (bytes %qd)\n",
"Total Number of Valid Sectors: %d (bytes %lld)\n",
total, sectobytes(total));
}
......@@ -987,11 +985,11 @@ applyfixups(off_t offset, off_t size, void *data)
clen = (u_int32_t)fp->size;
if (debug > 1)
fprintf(stderr,
"Applying fixup [%qu-%qu] "
"to [%qu-%qu]\n",
"Applying fixup [%llu-%llu] "
"to [%llu-%llu]\n",
fp->offset, fp->offset+fp->size,
offset, offset+size);
memcpy(data+coff, fp->data, clen);
memcpy((char *)data+coff, fp->data, clen);
/* create a reloc if necessary */
if (fp->reloctype != RELOC_NONE)
......@@ -1044,7 +1042,7 @@ freerelocs(void)
/*
* Compress the image.
*/
static u_char output_buffer[SUBBLOCKSIZE];
static uint8_t output_buffer[SUBBLOCKSIZE];
static int buffer_offset;
static off_t inputoffset;
static struct timeval cstamp;
......@@ -1067,7 +1065,7 @@ compress_image(void)
blockhdr_t *blkhdr;
struct region *curregion, *regions;
struct timeval estamp;
char *buf;
uint8_t *buf;
uint32_t cursect = 0;
struct region *lreg;
......@@ -1116,7 +1114,7 @@ compress_image(void)
*/
if (debug > 0 && debug < 3) {
fprintf(stderr,
"Compressing range: %14qd --> ", inputoffset);
"Compressing range: %14lld --> ", inputoffset);
fflush(stderr);
}
......@@ -1124,7 +1122,7 @@ compress_image(void)
&full, &blkhdr->size);
if (debug >= 3) {
fprintf(stderr, "%14qd -> %12qd %10ld %10u %10d %d\n",
fprintf(stderr, "%14lld -> %12lld %10ld %10u %10d %d\n",
inputoffset, inputoffset + size,
prange->start - inputminsec,
bytestosec(size),
......@@ -1133,7 +1131,7 @@ compress_image(void)
else if (debug) {
gettimeofday(&estamp, 0);
estamp.tv_sec -= cstamp.tv_sec;
fprintf(stderr, "%12qd in %ld seconds.\n",
fprintf(stderr, "%12lld in %ld seconds.\n",
inputoffset + size, estamp.tv_sec);
}
else if (dots && full) {
......@@ -1143,7 +1141,7 @@ compress_image(void)
if (pos++ >= 60) {
gettimeofday(&estamp, 0);
estamp.tv_sec -= cstamp.tv_sec;
fprintf(stderr, " %12qd %4ld\n",
fprintf(stderr, " %12lld %4ld\n",
inputoffset+size, estamp.tv_sec);
pos = 0;
}
......@@ -1157,7 +1155,7 @@ compress_image(void)
* This should never happen!
*/
if (size & (secsize - 1)) {
fprintf(stderr, " Not on a sector boundry at %qd\n",
fprintf(stderr, " Not on a sector boundry at %lld\n",
inputoffset);