More misc size_t issues
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 14 Dec 2007 08:30:46 +0000 (10:30 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 14 Dec 2007 08:30:46 +0000 (10:30 +0200)
rpmdb/dbconfig.c
rpmio/rpmio.c
rpmio/rpmio.h
rpmio/rpmlua.h
rpmio/rpmpgp.c

index e38a365..beb31ba 100644 (file)
@@ -288,7 +288,7 @@ dbiIndex db3New(rpmdb rpmdb, rpm_tag_t rpmtag)
        for (o = dbOpts; o && *o; o = oe) {
            struct poptOption *opt;
            const char * tok;
-           int argInfo;
+           unsigned int argInfo;
 
            /* Skip leading white space. */
            while (*o && xisspace(*o))
index 21cd921..17b8d9e 100644 (file)
@@ -817,7 +817,7 @@ static struct FDIO_s ufdio_s = {
 };
 FDIO_t ufdio = &ufdio_s ;
 
-int timedRead(FD_t fd, void * bufptr, int length)
+ssize_t timedRead(FD_t fd, void * bufptr, size_t length)
 {
     return ufdio->read(fd, bufptr, length);
 }
index 38d5e10..47e0ce2 100644 (file)
@@ -185,7 +185,7 @@ int ufdGetFile( FD_t sfd, FD_t tfd);
  * only S_ISREG() files are read, nothing to do with timed... 
  * TODO: get this out of the API
  */
-int timedRead(FD_t fd, void * bufptr, int length);
+ssize_t timedRead(FD_t fd, void * bufptr, size_t length);
 
 /** \ingroup rpmio
  * Identify per-desciptor I/O operation statistics.
index 02d97ab..145cdbb 100644 (file)
@@ -14,10 +14,10 @@ typedef enum rpmluavType_e {
 
 struct rpmlua_s {
     lua_State *L;
-    int pushsize;
+    size_t pushsize;
     int storeprint;
-    int printbufsize;
-    int printbufused;
+    size_t printbufsize;
+    size_t printbufused;
     char *printbuf;
 };
 
index 8221385..9ca66c8 100644 (file)
@@ -561,7 +561,7 @@ int pgpPrtSig(pgpTag tag, const uint8_t *h, size_t hlen)
            return 1;
 
 if (_debug && _print)
-fprintf(stderr, "   hash[%u] -- %s\n", plen, pgpHexStr(p, plen));
+fprintf(stderr, "   hash[%zu] -- %s\n", plen, pgpHexStr(p, plen));
        if (_digp && _digp->pubkey_algo == 0) {
            _digp->hashlen = sizeof(*v) + plen;
            _digp->hash = memcpy(xmalloc(_digp->hashlen), v, _digp->hashlen);