From: Stelian Pop Date: Tue, 25 May 2004 10:39:29 +0000 (+0000) Subject: Fix a couple of gcc 3.3.3 warnings. X-Git-Tag: release_0_4b38~19 X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=commitdiff_plain;h=6466785009d6e9260d2e6bd67378fed5411e6f02 Fix a couple of gcc 3.3.3 warnings. --- diff --git a/dump/tape.c b/dump/tape.c index 116b4a3..bd1e2f9 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -37,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.83 2004/04/21 09:15:08 stelian Exp $"; + "$Id: tape.c,v 1.84 2004/05/25 10:39:29 stelian Exp $"; #endif /* not lint */ #include @@ -116,8 +116,8 @@ int eot_code = 1; long long tapea_bytes = 0; /* bytes_written at start of current volume */ static int magtapeout; /* output is really a tape */ -static ssize_t dump_atomic_read __P((int, void *, size_t)); -static ssize_t dump_atomic_write __P((int, const void *, size_t)); +static ssize_t dump_atomic_read __P((int, char *, size_t)); +static ssize_t dump_atomic_write __P((int, const char *, size_t)); #ifdef WRITEDEBUG static void doslave __P((int, int, int)); #else @@ -1381,13 +1381,13 @@ doslave(int cmd, * loop until the count is satisfied (or error). */ static ssize_t -dump_atomic_read(int fd, void *buf, size_t count) +dump_atomic_read(int fd, char *buf, size_t count) { int got, need = count; do { while ((got = read(fd, buf, need)) > 0 && (need -= got) > 0) - (char *)buf += got; + buf += got; } while (got == -1 && errno == EINTR); return (got < 0 ? got : (ssize_t)count - need); } @@ -1398,13 +1398,13 @@ dump_atomic_read(int fd, void *buf, size_t count) * loop until the count is satisfied (or error). */ static ssize_t -dump_atomic_write(int fd, const void *buf, size_t count) +dump_atomic_write(int fd, const char *buf, size_t count) { int got, need = count; do { while ((got = write(fd, buf, need)) > 0 && (need -= got) > 0) - (char *)buf += got; + buf += got; } while (got == -1 && errno == EINTR); return (got < 0 ? got : (ssize_t)count - need); } diff --git a/restore/dirs.c b/restore/dirs.c index 49d5052..2a23f94 100644 --- a/restore/dirs.c +++ b/restore/dirs.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id: dirs.c,v 1.27 2004/04/21 09:15:22 stelian Exp $"; + "$Id: dirs.c,v 1.28 2004/05/25 10:39:30 stelian Exp $"; #endif /* not lint */ #include @@ -518,7 +518,7 @@ rst_seekdir(RST_DIR *dirp, OFF_T loc, OFF_T base) return; loc -= base; if (loc < 0) - fprintf(stderr, "bad seek pointer to rst_seekdir %lld\n", loc); + fprintf(stderr, "bad seek pointer to rst_seekdir %lld\n", (long long int)loc); (void) LSEEK(dirp->dd_fd, base + (loc & ~(DIRBLKSIZ - 1)), SEEK_SET); dirp->dd_loc = loc & (DIRBLKSIZ - 1); if (dirp->dd_loc != 0) diff --git a/restore/tape.c b/restore/tape.c index 68a40a0..2f344db 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -42,7 +42,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.80 2004/04/21 09:15:22 stelian Exp $"; + "$Id: tape.c,v 1.81 2004/05/25 10:39:31 stelian Exp $"; #endif /* not lint */ #include @@ -2175,7 +2175,7 @@ decompress_tapebuf(struct tapebuf *tpbin, int readsize) } if (reason) { if (lengtherr) - fprintf(stderr, "%s compressed block: %d expected: %d\n", + fprintf(stderr, "%s compressed block: %d expected: %u\n", lengtherr, readsize, tpbin->length + PREFIXSIZE); fprintf(stderr, "decompression error, block %ld: %s\n", tpblksread+1, reason);