diff options
-rw-r--r-- | build/files.c | 2 | ||||
-rw-r--r-- | build/parsePreamble.c | 3 | ||||
-rw-r--r-- | build/parseScript.c | 4 | ||||
-rw-r--r-- | build/rpmfc.c | 2 | ||||
-rw-r--r-- | lib/formats.c | 2 | ||||
-rw-r--r-- | lib/legacy.c | 2 | ||||
-rw-r--r-- | lib/package.c | 2 | ||||
-rw-r--r-- | lib/psm.c | 6 | ||||
-rw-r--r-- | lib/rpmfi.c | 6 | ||||
-rw-r--r-- | lib/rpmfi.h | 4 | ||||
-rw-r--r-- | lib/rpmts.c | 6 | ||||
-rw-r--r-- | lib/rpmts.h | 4 | ||||
-rw-r--r-- | lib/signature.c | 6 | ||||
-rw-r--r-- | rpmdb/header.c | 12 | ||||
-rw-r--r-- | rpmdb/header.h | 2 |
15 files changed, 33 insertions, 30 deletions
diff --git a/build/files.c b/build/files.c index 1e9b1d09f..54c664639 100644 --- a/build/files.c +++ b/build/files.c @@ -2071,7 +2071,7 @@ void initSourceHeader(rpmSpec spec) if (spec->BANames && spec->BACount > 0) { (void) headerAddEntry(spec->sourceHeader, RPMTAG_BUILDARCHS, RPM_STRING_ARRAY_TYPE, - spec->BANames, spec->BACount); + spec->BANames, (rpm_count_t) spec->BACount); } } diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 71da7ab12..458da39f2 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -58,7 +58,8 @@ static void addOrAppendListEntry(Header h, int32_t tag, char * line) xx = poptParseArgvString(line, &argc, &argv); if (argc) - xx = headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, argv, argc); + xx = headerAddOrAppendEntry(h, tag, RPM_STRING_ARRAY_TYPE, + argv, (rpm_count_t) argc); argv = _free(argv); } diff --git a/build/parseScript.c b/build/parseScript.c index 54d85f559..e4c36f621 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -303,12 +303,12 @@ int parseScript(rpmSpec spec, int parsePart) } else { if (progArgc == 1) (void) headerAddEntry(pkg->header, progtag, RPM_STRING_TYPE, - *progArgv, progArgc); + *progArgv, (rpm_count_t) progArgc); else { (void) rpmlibNeedsFeature(pkg->header, "ScriptletInterpreterArgs", "4.0.3-1"); (void) headerAddEntry(pkg->header, progtag, RPM_STRING_ARRAY_TYPE, - progArgv, progArgc); + progArgv, (rpm_count_t) progArgc); } if (*p != '\0') diff --git a/build/rpmfc.c b/build/rpmfc.c index 5eb1b2110..b93bf3e85 100644 --- a/build/rpmfc.c +++ b/build/rpmfc.c @@ -1527,7 +1527,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg) const char * N; const char * EVR; int genConfigDeps; - int c; + rpm_count_t c; int rc = 0; int xx; diff --git a/lib/formats.c b/lib/formats.c index 38d893d49..7333368fc 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -637,7 +637,7 @@ static int triggercondsTag(Header h, rpmTagType * type, item = xmalloc(strlen(names[j]) + strlen(versions[j]) + 20); if (flags[j] & RPMSENSE_SENSEMASK) { buf[0] = '%', buf[1] = '\0'; - flagsStr = depflagsFormat(RPM_INT32_TYPE, flags, buf, 0, j); + flagsStr = depflagsFormat(RPM_INT32_TYPE, flags, buf, 0, 0); sprintf(item, "%s %s %s", names[j], flagsStr, versions[j]); flagsStr = _free(flagsStr); } else { diff --git a/lib/legacy.c b/lib/legacy.c index fde9b4b2f..4241282ab 100644 --- a/lib/legacy.c +++ b/lib/legacy.c @@ -102,7 +102,7 @@ exit: xx = hae(h, RPMTAG_BASENAMES, RPM_STRING_ARRAY_TYPE, baseNames, count); xx = hae(h, RPMTAG_DIRNAMES, RPM_STRING_ARRAY_TYPE, - dirNames, dirIndex + 1); + dirNames, (rpm_count_t) dirIndex + 1); } fileNames = hfd(fileNames, fnt); diff --git a/lib/package.c b/lib/package.c index d2884c862..796b0aecb 100644 --- a/lib/package.c +++ b/lib/package.c @@ -486,7 +486,7 @@ verifyinfo_exit: dig->nbytes = 0; sig = memcpy(xmalloc(siglen), dataStart + info->offset, siglen); - (void) rpmtsSetSig(ts, info->tag, info->type, sig, info->count); + (void) rpmtsSetSig(ts, info->tag, info->type, sig, (size_t) info->count); switch (info->tag) { case RPMTAG_RSAHEADER: @@ -475,7 +475,7 @@ static pid_t psmWait(rpmpsm psm) * Run internal Lua script. */ static rpmRC runLuaScript(rpmpsm psm, Header h, rpmTag stag, - int progArgc, const char **progArgv, + unsigned int progArgc, const char **progArgv, const char *script, int arg1, int arg2) { const rpmts ts = psm->ts; @@ -572,7 +572,7 @@ static const char * ldconfig_path = "/sbin/ldconfig"; * @return 0 on success */ static rpmRC runScript(rpmpsm psm, Header h, rpmTag stag, - int progArgc, const char ** progArgv, + unsigned int progArgc, const char ** progArgv, const char * script, int arg1, int arg2) { const rpmts ts = psm->ts; @@ -1701,7 +1701,7 @@ assert(psm->mi == NULL); if (psm->goal == PSM_PKGINSTALL) { int32_t installTime = (int32_t) time(NULL); - int fc = rpmfiFC(fi); + rpm_count_t fc = rpmfiFC(fi); if (fi->h == NULL) break; /* XXX can't happen */ if (fi->fstates != NULL && fc > 0) diff --git a/lib/rpmfi.c b/lib/rpmfi.c index 9b386c104..234f2fdfd 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -45,12 +45,12 @@ fprintf(stderr, "--> fi %p ++ %d %s\n", fi, fi->nrefs, msg); return fi; } -int rpmfiFC(rpmfi fi) +rpm_count_t rpmfiFC(rpmfi fi) { return (fi != NULL ? fi->fc : 0); } -int rpmfiDC(rpmfi fi) +rpm_count_t rpmfiDC(rpmfi fi) { return (fi != NULL ? fi->dc : 0); } @@ -768,7 +768,7 @@ assert(p != NULL); /* Add relocation values to the header */ if (numValid) { const char ** actualRelocations; - int numActual; + rpm_count_t numActual; actualRelocations = xmalloc(numValid * sizeof(*actualRelocations)); numActual = 0; diff --git a/lib/rpmfi.h b/lib/rpmfi.h index 0107962b9..ebce59fa7 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -108,7 +108,7 @@ rpmfi rpmfiLink (rpmfi fi, const char * msg); * @param fi file info set * @return current file count */ -int rpmfiFC(rpmfi fi); +rpm_count_t rpmfiFC(rpmfi fi); /** \ingroup rpmfi * Return current file index from file info set. @@ -130,7 +130,7 @@ int rpmfiSetFX(rpmfi fi, int fx); * @param fi file info set * @return current directory count */ -int rpmfiDC(rpmfi fi); +rpm_count_t rpmfiDC(rpmfi fi); /** \ingroup rpmfi * Return current directory index from file info set. diff --git a/lib/rpmts.c b/lib/rpmts.c index 3014674ca..88c5f9a11 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -1167,16 +1167,16 @@ const void * rpmtsSig(const rpmts ts) return sig; } -int32_t rpmtsSiglen(const rpmts ts) +size_t rpmtsSiglen(const rpmts ts) { - int32_t siglen = 0; + size_t siglen = 0; if (ts != NULL) siglen = ts->siglen; return siglen; } int rpmtsSetSig(rpmts ts, - int32_t sigtag, int32_t sigtype, const void * sig, int32_t siglen) + int32_t sigtag, int32_t sigtype, const void * sig, size_t siglen) { if (ts != NULL) { if (ts->sig && ts->sigtype) diff --git a/lib/rpmts.h b/lib/rpmts.h index 517d674e0..881c5c825 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -541,7 +541,7 @@ extern const void * rpmtsSig(const rpmts ts); * @param ts transaction set * @return signature tag data length */ -int32_t rpmtsSiglen(const rpmts ts); +size_t rpmtsSiglen(const rpmts ts); /** \ingroup rpmts * Set signature tag info, i.e. from header. @@ -554,7 +554,7 @@ int32_t rpmtsSiglen(const rpmts ts); */ int rpmtsSetSig(rpmts ts, int32_t sigtag, int32_t sigtype, - const void * sig, int32_t siglen); + const void * sig, size_t siglen); /** \ingroup rpmts * Get OpenPGP packet parameters, i.e. signature/pubkey constants. diff --git a/lib/signature.c b/lib/signature.c index fa723110f..977e78c4e 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -473,7 +473,7 @@ static int makePGPSignature(const char * file, int32_t * sigTagp, * @return 0 on success, 1 on failure */ static int makeGPGSignature(const char * file, int32_t * sigTagp, - uint8_t ** pktp, int32_t * pktlenp, + uint8_t ** pktp, size_t * pktlenp, const char * passPhrase) { char * sigfile = alloca(strlen(file)+sizeof(".sig")); @@ -613,7 +613,7 @@ static int makeHDRSignature(Header sigh, const char * file, int32_t sigTag, Header h = NULL; FD_t fd = NULL; uint8_t * pkt; - int32_t pktlen; + rpm_count_t pktlen; const char * fn = NULL; const char * SHA1 = NULL; int ret = -1; /* assume failure. */ @@ -715,7 +715,7 @@ int rpmAddSignature(Header sigh, const char * file, int32_t sigTag, { struct stat st; uint8_t * pkt; - int32_t pktlen; + rpm_count_t pktlen; int ret = -1; /* assume failure. */ switch (sigTag) { diff --git a/rpmdb/header.c b/rpmdb/header.c index 9d100db86..35251026a 100644 --- a/rpmdb/header.c +++ b/rpmdb/header.c @@ -1759,7 +1759,7 @@ int _headerAddI18NString(Header h, int32_t tag, const char * string, const char ** strArray; int length; int ghosts; - int i, langNum; + rpm_count_t i, langNum; char * buf; table = findEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE); @@ -1770,7 +1770,7 @@ int _headerAddI18NString(Header h, int32_t tag, const char * string, if (!table && !entry) { const char * charArray[2]; - int count = 0; + rpm_count_t count = 0; if (!lang || (lang[0] == 'C' && lang[1] == '\0')) { charArray[count++] = "C"; } else { @@ -2735,7 +2735,8 @@ static char * formatValue(headerSprintfArgs hsa, sprintfTag tag, int element) strarray = (const char **)data; if (tag->fmt) - val = tag->fmt(RPM_STRING_TYPE, strarray[element], buf, tag->pad, element); + val = tag->fmt(RPM_STRING_TYPE, strarray[element], buf, tag->pad, + (rpm_count_t) element); if (val) { need = strlen(val); @@ -2781,7 +2782,8 @@ static char * formatValue(headerSprintfArgs hsa, sprintfTag tag, int element) } if (tag->fmt) - val = tag->fmt(RPM_INT32_TYPE, &intVal, buf, tag->pad, element); + val = tag->fmt(RPM_INT32_TYPE, &intVal, buf, tag->pad, + (rpm_count_t) element); if (val) { need = strlen(val); @@ -2796,7 +2798,7 @@ static char * formatValue(headerSprintfArgs hsa, sprintfTag tag, int element) case RPM_BIN_TYPE: /* XXX HACK ALERT: element field abused as no. bytes of binary data. */ if (tag->fmt) - val = tag->fmt(RPM_BIN_TYPE, data, buf, tag->pad, count); + val = tag->fmt(RPM_BIN_TYPE, data, buf, tag->pad, (rpm_count_t) count); if (val) { need = strlen(val); diff --git a/rpmdb/header.h b/rpmdb/header.h index 37114ba27..dd5993027 100644 --- a/rpmdb/header.h +++ b/rpmdb/header.h @@ -143,7 +143,7 @@ enum headerSprintfExtensionType { */ typedef char * (*headerTagFormatFunction)(int32_t type, const void * data, char * formatPrefix, - int padding, int element); + int padding, rpm_count_t element); /** \ingroup header * HEADER_EXT_FORMAT format function prototype. |