Assorted int -> size_t string size fixes in build code
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 2 Jan 2008 12:37:16 +0000 (14:37 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 2 Jan 2008 12:37:16 +0000 (14:37 +0200)
build/files.c
build/parsePreamble.c
build/poptBT.c
build/rpmfc.c

index 76e02b9..e6fa60c 100644 (file)
@@ -1039,9 +1039,9 @@ static void genCpioListAndHeader(FileList fl,
                rpmfi * fip, Header h, int isSrc)
 {
     int _addDotSlash = !(isSrc || rpmExpandNumeric("%{_noPayloadPrefix}"));
-    int apathlen = 0;
-    int dpathlen = 0;
-    int skipLen = 0;
+    size_t apathlen = 0;
+    size_t dpathlen = 0;
+    size_t skipLen = 0;
     size_t fnlen;
     FileListRec flp;
     char buf[BUFSIZ];
index 35c28c5..ebc1b49 100644 (file)
@@ -428,7 +428,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpm_tag_t tag,
     int multiToken = 0;
     rpmsenseFlags tagflags;
     rpm_tagtype_t type;
-    int len;
+    size_t len;
     rpm_count_t num;
     int rc;
     int xx;
index 7ce5a9c..4ee1dee 100644 (file)
@@ -99,7 +99,7 @@ static void buildArgCallback( poptContext con,
        break;
     case POPT_TARGETPLATFORM:
        if (rba->targets) {
-           int len = strlen(rba->targets) + 1 + strlen(arg) + 1;
+           size_t len = strlen(rba->targets) + 1 + strlen(arg) + 1;
            rba->targets = xrealloc(rba->targets, len);
            strcat(rba->targets, ",");
        } else {
index da0b233..bc78be5 100644 (file)
@@ -1,6 +1,6 @@
 #include "system.h"
 
-#include <signal.h>    /* getOutputFrom() */
+#include <signal.h>
 
 #include <rpm/rpmbuild.h>
 #include <rpm/argv.h>
@@ -86,7 +86,7 @@ static int rpmfcExpandAppend(ARGV_t * argvp, const ARGV_t av)
  * @return             buffered stdout from script, NULL on error
  */     
 static StringBuf getOutputFrom(const char * dir, ARGV_t argv,
-                        const char * writePtr, int writeBytesLeft,
+                        const char * writePtr, size_t writeBytesLeft,
                         int failNonZero)
 {
     pid_t child, reaped;
@@ -236,7 +236,7 @@ int rpmfcExec(ARGV_t av, StringBuf sb_stdin, StringBuf * sb_stdoutp,
     int ec = -1;
     StringBuf sb = NULL;
     const char * buf_stdin = NULL;
-    int buf_stdin_len = 0;
+    size_t buf_stdin_len = 0;
     int xx;
 
     if (sb_stdoutp)