Shut up fdUpdateDigest() differing signedness compiler warnings.
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 11 Jul 2007 09:32:17 +0000 (12:32 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 11 Jul 2007 09:32:17 +0000 (12:32 +0300)
Derived from rpm5.org.

rpmio/rpmio.c

index a75157a..9201784 100644 (file)
@@ -388,7 +388,7 @@ static ssize_t fdRead(void * cookie, /*@out@*/ char * buf, size_t count)
 /*@=boundswrite@*/
     fdstat_exit(fd, FDSTAT_READ, rc);
 
-    if (fd->ndigests && rc > 0) fdUpdateDigests(fd, buf, rc);
+    if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc);
 
 DBGIO(fd, (stderr, "==>\tfdRead(%p,%p,%ld) rc %ld %s\n", cookie, buf, (long)count, (long)rc, fdbg(fd)));
 
@@ -405,7 +405,7 @@ static ssize_t fdWrite(void * cookie, const char * buf, size_t count)
 
     if (fd->bytesRemain == 0) return 0;        /* XXX simulate EOF */
 
-    if (fd->ndigests && count > 0) fdUpdateDigests(fd, buf, count);
+    if (fd->ndigests && count > 0) fdUpdateDigests(fd, (void *)buf, count);
 
     if (count == 0) return 0;
 
@@ -2452,7 +2452,7 @@ DBGIO(fd, (stderr, "==>\tgzdRead(%p,%p,%u) rc %lx %s\n", cookie, buf, (unsigned)
        }
     } else if (rc >= 0) {
        fdstat_exit(fd, FDSTAT_READ, rc);
-       if (fd->ndigests && rc > 0) fdUpdateDigests(fd, buf, rc);
+       if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc);
     }
     return rc;
 }
@@ -2467,7 +2467,7 @@ static ssize_t gzdWrite(void * cookie, const char * buf, size_t count)
 
     if (fd == NULL || fd->bytesRemain == 0) return 0;  /* XXX simulate EOF */
 
-    if (fd->ndigests && count > 0) fdUpdateDigests(fd, buf, count);
+    if (fd->ndigests && count > 0) fdUpdateDigests(fd, (void *)buf, count);
 
     gzfile = gzdFileno(fd);
     if (gzfile == NULL) return -2;     /* XXX can't happen */
@@ -2689,7 +2689,7 @@ static ssize_t bzdRead(void * cookie, /*@out@*/ char * buf, size_t count)
     } else if (rc >= 0) {
        fdstat_exit(fd, FDSTAT_READ, rc);
        /*@-compdef@*/
-       if (fd->ndigests && rc > 0) fdUpdateDigests(fd, buf, rc);
+       if (fd->ndigests && rc > 0) fdUpdateDigests(fd, (void *)buf, rc);
        /*@=compdef@*/
     }
     return rc;
@@ -2708,7 +2708,7 @@ static ssize_t bzdWrite(void * cookie, const char * buf, size_t count)
 
     if (fd->bytesRemain == 0) return 0;        /* XXX simulate EOF */
 
-    if (fd->ndigests && count > 0) fdUpdateDigests(fd, buf, count);
+    if (fd->ndigests && count > 0) fdUpdateDigests(fd, (void *)buf, count);
 
     bzfile = bzdFileno(fd);
     fdstat_enter(fd, FDSTAT_WRITE);