RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 16-Oct-2007 22:16:17
Branch: HEAD Handle: 2007101621161600
Modified files:
rpm CHANGES
rpm/rpmdb hdrNVR.c hdrfmt.c hdrinline.h header.c header.h
rpmdb.c signature.c
Log:
- jbj: drill hPTR_t through prototypes. hRET_t * refactor next.
- jbj: drill rpmTagCount through rpmdb/* files.
Summary:
Revision Changes Path
1.1719 +2 -0 rpm/CHANGES
1.15 +4 -4 rpm/rpmdb/hdrNVR.c
1.12 +16 -16 rpm/rpmdb/hdrfmt.c
1.18 +4 -4 rpm/rpmdb/hdrinline.h
1.83 +27 -27 rpm/rpmdb/header.c
1.35 +30 -22 rpm/rpmdb/header.h
1.185 +2 -2 rpm/rpmdb/rpmdb.c
1.9 +4 -4 rpm/rpmdb/signature.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1718 -r1.1719 CHANGES
--- rpm/CHANGES 16 Oct 2007 17:08:34 -0000 1.1718
+++ rpm/CHANGES 16 Oct 2007 20:16:16 -0000 1.1719
@@ -1,4 +1,6 @@
4.5 -> 5.0:
+ - jbj: drill hPTR_t through prototypes. hRET_t * refactor next.
+ - jbj: drill rpmTagCount through rpmdb/* files.
- jbj: preliminaries to encapsulate headerSprintf goop.
- rpm.org: Fix broken doxygen comment.
- rpm.org: Don't unnecessarily include stdio.h
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrNVR.c
============================================================================
$ cvs diff -u -r1.14 -r1.15 hdrNVR.c
--- rpm/rpmdb/hdrNVR.c 14 Oct 2007 22:54:00 -0000 1.14
+++ rpm/rpmdb/hdrNVR.c 16 Oct 2007 20:16:16 -0000 1.15
@@ -209,8 +209,8 @@
HeaderIterator hi;
int_32 tag;
rpmTagType type;
- int_32 count;
- const void * ptr;
+ rpmTagCount count;
+ hPTR_t ptr;
int xx;
if (h == NULL || sigh == NULL)
@@ -305,8 +305,8 @@
int_32 stag;
int_32 tag;
rpmTagType type;
- int_32 count;
- const void * ptr;
+ rpmTagCount count;
+ hPTR_t ptr;
int xx;
for (hi = headerInitIterator(h);
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrfmt.c
============================================================================
$ cvs diff -u -r1.11 -r1.12 hdrfmt.c
--- rpm/rpmdb/hdrfmt.c 16 Oct 2007 18:33:16 -0000 1.11
+++ rpm/rpmdb/hdrfmt.c 16 Oct 2007 20:16:16 -0000 1.12
@@ -77,12 +77,12 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * triggertypeFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * triggertypeFormat(rpmTagType type, hPTR_t data,
/*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
/*@unused@*/ int element)
/*@requires maxRead(data) >= 0 @*/
{
- const int_32 * item = data;
+ const int_32 * item = (const int_32 *) data; /* NOCAST */
char * val;
if (type != RPM_INT32_TYPE)
@@ -109,7 +109,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * permsFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * permsFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, /*@unused@*/ int element)
/*@modifies formatPrefix @*/
/*@requires maxRead(data) >= 0 @*/
@@ -141,7 +141,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * fflagsFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * fflagsFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, /*@unused@*/ int element)
/*@modifies formatPrefix @*/
/*@requires maxRead(data) >= 0 @*/
@@ -191,7 +191,7 @@
* @param element no. bytes of binary data
* @return formatted string
*/
-static /*@only@*/ char * armorFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * armorFormat(rpmTagType type, hPTR_t data,
/*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
int element)
/*@*/
@@ -206,14 +206,14 @@
case RPM_OPENPGP_TYPE:
case RPM_ASN1_TYPE: /* XXX WRONG */
case RPM_BIN_TYPE:
- s = data;
+ s = (const unsigned char *) data; /* NOCAST */
/* XXX HACK ALERT: element field abused as no. bytes of binary data. */
ns = element;
atype = PGPARMOR_SIGNATURE; /* XXX check pkt for signature */
break;
case RPM_STRING_TYPE:
case RPM_STRING_ARRAY_TYPE:
- enc = data;
+ enc = (const char *) data; /* NOCAST */
s = NULL;
ns = 0;
/*@-moduncon@*/
@@ -251,7 +251,7 @@
* @param element
* @return formatted string
*/
-static /*@only@*/ char * base64Format(rpmTagType type, const void * data,
+static /*@only@*/ char * base64Format(rpmTagType type, hPTR_t data,
/*@unused@*/ char * formatPrefix, int padding, int element)
/*@*/
{
@@ -354,7 +354,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * xmlFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * xmlFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding,
/*@unused@*/ int element)
/*@modifies formatPrefix @*/
@@ -371,7 +371,7 @@
switch (type) {
case RPM_I18NSTRING_TYPE:
case RPM_STRING_TYPE:
- s = data;
+ s = (const char *) data; /* NOCAST */
xtag = "string";
/* XXX Force utf8 strings. */
s = xstrdup(s);
@@ -517,7 +517,7 @@
* @param element element index (or -1 for non-array).
* @return formatted string
*/
-static /*@only@*/ char * yamlFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * yamlFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding,
int element)
/*@modifies formatPrefix @*/
@@ -538,7 +538,7 @@
case RPM_I18NSTRING_TYPE:
case RPM_STRING_TYPE:
xx = 0;
- s = data;
+ s = (const char *) data; /* NOCAST */
if (strchr("[", s[0])) /* leading [ */
xx = 1;
if (xx == 0)
@@ -571,7 +571,7 @@
}
/* XXX Force utf8 strings. */
- s = xstrdup(data);
+ s = xstrdup((const char *)data); /* NOCAST */
s = xstrtolocale(s);
freeit = 1;
break;
@@ -673,7 +673,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * pgpsigFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * pgpsigFormat(rpmTagType type, hPTR_t data,
/*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
/*@unused@*/ int element)
/*@globals fileSystem, internalState @*/
@@ -782,7 +782,7 @@
* @param element (unused)
* @return formatted string
*/
-static /*@only@*/ char * depflagsFormat(rpmTagType type, const void * data,
+static /*@only@*/ char * depflagsFormat(rpmTagType type, hPTR_t data,
char * formatPrefix, int padding, /*@unused@*/ int element)
/*@modifies formatPrefix @*/
/*@requires maxRead(data) >= 0 @*/
@@ -906,7 +906,7 @@
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, (hPTR_t) flags, buf, 0, j); /* NOCAST */
sprintf(item, "%s %s %s", names[j], flagsStr, versions[j]);
flagsStr = _free(flagsStr);
} else
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/hdrinline.h
============================================================================
$ cvs diff -u -r1.17 -r1.18 hdrinline.h
--- rpm/rpmdb/hdrinline.h 16 Oct 2007 18:33:16 -0000 1.17
+++ rpm/rpmdb/hdrinline.h 16 Oct 2007 20:16:16 -0000 1.18
@@ -335,7 +335,7 @@
*/
/*@mayexit@*/
/*@unused@*/ static inline
-int headerAddEntry(Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
+int headerAddEntry(Header h, int_32 tag, rpmTagType type, hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
return (h2hv(h)->hdradd) (h, tag, type, p, c);
@@ -357,7 +357,7 @@
*/
/*@unused@*/ static inline
int headerAppendEntry(Header h, int_32 tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
return (h2hv(h)->hdrappend) (h, tag, type, p, c);
@@ -375,7 +375,7 @@
*/
/*@unused@*/ static inline
int headerAddOrAppendEntry(Header h, int_32 tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
return (h2hv(h)->hdraddorappend) (h, tag, type, p, c);
@@ -421,7 +421,7 @@
*/
/*@unused@*/ static inline
int headerModifyEntry(Header h, int_32 tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
return (h2hv(h)->hdrmodify) (h, tag, type, p, c);
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.c
============================================================================
$ cvs diff -u -r1.82 -r1.83 header.c
--- rpm/rpmdb/header.c 16 Oct 2007 18:33:16 -0000 1.82
+++ rpm/rpmdb/header.c 16 Oct 2007 20:16:16 -0000 1.83
@@ -368,12 +368,12 @@
* @param pend pointer to end of data (or NULL)
* @return no. bytes in data, -1 on failure
*/
-static int dataLength(rpmTagType type, hPTR_t p, int_32 count, int onDisk,
+static int dataLength(rpmTagType type, hPTR_t p, rpmTagCount count, int onDisk,
/*@null@*/ hPTR_t pend)
/*@*/
{
- const unsigned char * s = p;
- const unsigned char * se = pend;
+ const unsigned char * s = (const unsigned char *) p; /* NOCAST */
+ const unsigned char * se = (const unsigned char *) pend; /* NOCAST */
int length = 0;
switch (type) {
@@ -486,7 +486,7 @@
if (dataEnd && t >= dataEnd)
return -1;
- ie.length = dataLength(ie.info.type, ie.data, ie.info.count, 1, dataEnd);
+ ie.length = dataLength(ie.info.type, ie.data, ie.info.count, 1, (hPTR_t) dataEnd); /* NOCAST */
if (ie.length < 0 || hdrchkData(ie.length))
return -1;
@@ -1468,7 +1468,7 @@
/*@modifies *type, *p, *c @*/
/*@requires maxSet(type) >= 0 /\ maxSet(p) >= 0 /\ maxSet(c) >= 0 @*/
{
- int_32 count = entry->info.count;
+ rpmTagCount count = entry->info.count;
int rc = 1; /* XXX 1 on success. */
if (p)
@@ -1741,7 +1741,7 @@
if (type) *type = RPM_STRING_TYPE;
if (c) *c = 1;
/*@-dependenttrans@*/
- if (p) *p = headerFindI18NString(h, entry);
+ if (p) *p = (hPTR_t) headerFindI18NString(h, entry); /* NOCAST */
/*@=dependenttrans@*/
break;
default:
@@ -1998,7 +1998,7 @@
/**
*/
static void copyData(rpmTagType type, /*@out@*/ void * dstPtr, const void * srcPtr,
- int_32 cnt, int dataLength)
+ rpmTagCount cnt, int dataLength)
/*@modifies *dstPtr @*/
{
switch (type) {
@@ -2033,7 +2033,7 @@
*/
/*@null@*/
static void *
-grabData(rpmTagType type, hPTR_t p, int_32 c, /*@out@*/ int * lenp)
+grabData(rpmTagType type, hPTR_t p, rpmTagCount c, /*@out@*/ int * lenp)
/*@modifies *lenp @*/
/*@requires maxSet(lenp) >= 0 @*/
{
@@ -2066,11 +2066,11 @@
* @return 1 on success, 0 on failure
*/
static
-int headerAddEntry(Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
+int headerAddEntry(Header h, int_32 tag, rpmTagType type, hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
indexEntry entry;
- void * data;
+ hPTR_t data;
int length;
/* Count must always be >= 1 for headerAddEntry. */
@@ -2125,7 +2125,7 @@
*/
static
int headerAppendEntry(Header h, int_32 tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
indexEntry entry;
@@ -2173,7 +2173,7 @@
*/
static
int headerAddOrAppendEntry(Header h, int_32 tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
return (findEntry(h, tag, type)
@@ -2233,7 +2233,7 @@
charArray[count++] = lang;
}
if (!headerAddEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE,
- &charArray, count))
+ (hPTR_t) &charArray, count)) /* NOCAST */
return 0;
table = findEntry(h, HEADER_I18NTABLE, RPM_STRING_ARRAY_TYPE);
}
@@ -2268,7 +2268,7 @@
for (i = 0; i < langNum; i++)
strArray[i] = "";
strArray[langNum] = string;
- return headerAddEntry(h, tag, RPM_I18NSTRING_TYPE, strArray,
+ return headerAddEntry(h, tag, RPM_I18NSTRING_TYPE, (hPTR_t) strArray, /* NOCAST */
langNum + 1);
} else if (langNum >= entry->info.count) {
ghosts = langNum - entry->info.count;
@@ -2346,12 +2346,12 @@
*/
static
int headerModifyEntry(Header h, int_32 tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/
{
indexEntry entry;
void * oldData;
- void * data;
+ hPTR_t data;
int length;
/* First find the tag */
@@ -2544,7 +2544,7 @@
HeaderIterator hi;
int_32 tag;
rpmTagType type;
- int_32 count;
+ rpmTagCount count;
hPTR_t ptr;
for (hi = headerInitIterator(h);
@@ -2631,7 +2631,7 @@
} else {
int_32 tagno;
rpmTagType type;
- int_32 count;
+ rpmTagCount count;
if (!headerNextIterator(hsa->hi, &tagno, &type, NULL, &count))
fmt = NULL;
@@ -3213,7 +3213,7 @@
unsigned int intVal;
uint_64 llVal;
const char ** strarray;
- int_32 countBuf;
+ rpmTagCount countBuf;
memset(buf, 0, sizeof(buf));
if (tag->ext) {
@@ -3273,7 +3273,7 @@
strarray = he_p.argv;
if (tag->fmt)
- val = tag->fmt(RPM_STRING_TYPE, strarray[element], buf, tag->pad, (he_c > 1 ? element : -1));
+ val = tag->fmt(RPM_STRING_TYPE, (hPTR_t) strarray[element], buf, tag->pad, (he_c > 1 ? element : -1)); /* NOCAST */
if (val) {
need = strlen(val);
@@ -3307,7 +3307,7 @@
case RPM_INT64_TYPE:
llVal = he_p.i64p[element];
if (tag->fmt)
- val = tag->fmt(RPM_INT64_TYPE, &llVal, buf, tag->pad, (he_c > 1 ? element : -1));
+ val = tag->fmt(RPM_INT64_TYPE, (hPTR_t) &llVal, buf, tag->pad, (he_c > 1 ? element : -1)); /* NOCAST */
if (val) {
need = strlen(val);
} else {
@@ -3339,7 +3339,7 @@
}
if (tag->fmt)
- val = tag->fmt(RPM_INT32_TYPE, &intVal, buf, tag->pad, (he_c > 1 ? element : -1));
+ val = tag->fmt(RPM_INT32_TYPE, (hPTR_t) &intVal, buf, tag->pad, (he_c > 1 ? element : -1)); /* NOCAST */
if (val) {
need = strlen(val);
@@ -3932,7 +3932,7 @@
sprintf(result, formatPrefix, *((int_64 *) data));
/*@=formatconst@*/
} else {
- buf = alloca(strlen(data) + padding + 2);
+ buf = alloca(strlen((const char *)data) + padding + 2); /* NOCAST */
strcat(formatPrefix, "s");
/*@-formatconst@*/
sprintf(buf, formatPrefix, data);
@@ -3990,15 +3990,15 @@
return;
for (p = tagstocopy; *p != 0; p++) {
- char *s;
+ hRET_t s;
rpmTagType type;
- int_32 count;
+ rpmTagCount count;
if (headerIsEntry(headerTo, *p))
continue;
if (!headerGetEntryMinMemory(headerFrom, *p, &type, &s, &count))
continue;
- (void) headerAddEntry(headerTo, *p, type, s, count);
- s = headerFreeData(s, type);
+ (void) headerAddEntry(headerTo, *p, type, s.ptr, count);
+ s.ptr = headerFreeData(s.ptr, type);
}
}
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/header.h
============================================================================
$ cvs diff -u -r1.34 -r1.35 header.h
--- rpm/rpmdb/header.h 16 Oct 2007 18:33:16 -0000 1.34
+++ rpm/rpmdb/header.h 16 Oct 2007 20:16:16 -0000 1.35
@@ -103,21 +103,6 @@
/** \ingroup header
*/
-typedef enum rpmTag_e rpmTag;
-
-/** \ingroup header
- */
-typedef enum rpmTagType_e rpmTagType;
-
-/** \ingroup header
- */
-typedef int_32 * hTAG_t;
-typedef rpmTagType * hTYP_t;
-typedef const void * hPTR_t;
-typedef int_32 * hCNT_t;
-
-/** \ingroup header
- */
typedef /*@abstract@*/ /*@refcounted@*/ struct headerToken_s * Header;
/** \ingroup header
@@ -143,6 +128,29 @@
/** \ingroup header
*/
+typedef enum rpmTag_e rpmTag;
+
+/** \ingroup header
+ */
+typedef enum rpmTagType_e rpmTagType;
+
+/** \ingroup header
+ */
+typedef const void * rpmTagData;
+
+/** \ingroup header
+ */
+typedef int_32 rpmTagCount;
+
+/** \ingroup header
+ */
+typedef int_32 * hTAG_t;
+typedef rpmTagType * hTYP_t;
+typedef rpmTagData * hPTR_t;
+typedef rpmTagCount * hCNT_t;
+
+/** \ingroup header
+ */
/*@-typeuse -fielduse@*/
#if !defined(SWIG)
struct _HE_s {
@@ -226,7 +234,7 @@
* @return formatted string
*/
typedef /*only@*/ char * (*headerTagFormatFunction)(rpmTagType type,
- const void * data, char * formatPrefix,
+ hPTR_t data, char * formatPrefix,
int padding, int element)
/*@requires maxSet(data) >= 0 @*/;
@@ -392,7 +400,7 @@
* @return 1 on success, 0 on failure
*/
typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/;
/**
@@ -407,7 +415,7 @@
* @return 1 on success, 0 on failure
*/
typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
- const void * p, int_32 c)
+ hPTR_t p, rpmTagCount c)
/*@modifies h @*/;
/**
@@ -646,7 +654,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRadd) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
+int (*HDRadd) (Header h, int_32 tag, rpmTagType type, hPTR_t p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ -664,7 +672,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRappend) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
+int (*HDRappend) (Header h, int_32 tag, rpmTagType type, hPTR_t p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ -678,7 +686,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRaddorappend) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
+int (*HDRaddorappend) (Header h, int_32 tag, rpmTagType type, hPTR_t p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ -717,7 +725,7 @@
* @return 1 on success, 0 on failure
*/
typedef
-int (*HDRmodify) (Header h, int_32 tag, rpmTagType type, const void * p, int_32 c)
+int (*HDRmodify) (Header h, int_32 tag, rpmTagType type, hPTR_t p, rpmTagCount c)
/*@modifies h @*/;
/** \ingroup header
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/rpmdb.c
============================================================================
$ cvs diff -u -r1.184 -r1.185 rpmdb.c
--- rpm/rpmdb/rpmdb.c 16 Oct 2007 00:48:14 -0000 1.184
+++ rpm/rpmdb/rpmdb.c 16 Oct 2007 20:16:16 -0000 1.185
@@ -3136,13 +3136,13 @@
if (iid != 0 && iid != -1) {
int_32 tid = iid;
if (!headerIsEntry(h, RPMTAG_INSTALLTID))
- xx = hae(h, RPMTAG_INSTALLTID, RPM_INT32_TYPE, &tid, 1);
+ xx = hae(h, RPMTAG_INSTALLTID, RPM_INT32_TYPE, (hPTR_t)&tid, 1); /* NOCAST */
}
/* Add the package color if not present. */
if (!headerIsEntry(h, RPMTAG_PACKAGECOLOR)) {
uint32_t hcolor = hGetColor(h);
- xx = hae(h, RPMTAG_PACKAGECOLOR, RPM_INT32_TYPE, &hcolor, 1);
+ xx = hae(h, RPMTAG_PACKAGECOLOR, RPM_INT32_TYPE, (hPTR_t) &hcolor, 1); /* NOCAST */
}
#if defined(SUPPORT_RPMV3_BASENAMES_HACKS)
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmdb/signature.c
============================================================================
$ cvs diff -u -r1.8 -r1.9 signature.c
--- rpm/rpmdb/signature.c 14 Oct 2007 22:54:00 -0000 1.8
+++ rpm/rpmdb/signature.c 16 Oct 2007 20:16:16 -0000 1.9
@@ -578,7 +578,7 @@
if (SHA1 == NULL)
goto exit;
- if (!headerAddEntry(sigh, RPMSIGTAG_SHA1, RPM_STRING_TYPE, SHA1, 1))
+ if (!headerAddEntry(sigh, RPMSIGTAG_SHA1, RPM_STRING_TYPE, (hPTR_t) SHA1, 1)) /* NOCAST */
goto exit;
ret = 0;
break;
@@ -596,7 +596,7 @@
goto exit;
(void) Fclose(fd); fd = NULL;
if (makeGPGSignature(fn, &sigTag, &pkt, &pktlen, passPhrase)
- || !headerAddEntry(sigh, sigTag, RPM_BIN_TYPE, pkt, pktlen))
+ || !headerAddEntry(sigh, sigTag, RPM_BIN_TYPE, (hPTR_t) pkt, pktlen)) /* NOCAST */
goto exit;
ret = 0;
break;
@@ -646,7 +646,7 @@
if (Stat(file, &st) != 0)
break;
pktlen = st.st_size;
- if (!headerAddEntry(sigh, sigTag, RPM_INT32_TYPE, &pktlen, 1))
+ if (!headerAddEntry(sigh, sigTag, RPM_INT32_TYPE, (hPTR_t) &pktlen, 1)) /* NOCAST */
break;
ret = 0;
break;
@@ -654,7 +654,7 @@
pktlen = 16;
pkt = memset(alloca(pktlen), 0, pktlen);
if (dodigest(PGPHASHALGO_MD5, file, pkt, 0, NULL)
- || !headerAddEntry(sigh, sigTag, RPM_BIN_TYPE, pkt, pktlen))
+ || !headerAddEntry(sigh, sigTag, RPM_BIN_TYPE, (hPTR_t) pkt, pktlen)) /* NOCAST */
break;
ret = 0;
break;
@@ .
Received on Tue Oct 16 22:16:17 2007