]> git.wh0rd.org - dump.git/commitdiff
Fix a couple of gcc 3.3.3 warnings.
authorStelian Pop <stelian@popies.net>
Tue, 25 May 2004 10:39:29 +0000 (10:39 +0000)
committerStelian Pop <stelian@popies.net>
Tue, 25 May 2004 10:39:29 +0000 (10:39 +0000)
dump/tape.c
restore/dirs.c
restore/tape.c

index 116b4a3016e0f9d523f81769c4d0cfbaeca83cb2..bd1e2f90c0bde55892a4e4365b1ad0dc1c230984 100644 (file)
@@ -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 <config.h>
@@ -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);
 }
index 49d50529b689a3c1720dd739caedc6dafdd2ea00..2a23f9486b62c940530954b69b1bdf346ff3b8f7 100644 (file)
@@ -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 <config.h>
@@ -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)
index 68a40a0556cd56f85e249d85fb2e82f8fdce0e98..2f344dbc85e87785dc3629c44ce690ee105c13e1 100644 (file)
@@ -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 <config.h>
@@ -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);