diff options
author | jbj <devnull@localhost> | 2001-10-16 17:42:18 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-10-16 17:42:18 +0000 |
commit | 96a3f7a55d444296f97c3e28c8d810e220e1cb9f (patch) | |
tree | 01eb83731cd7193dda21a7ab3d8e741c41c0914f /rpmio | |
parent | 9f45bcd3ecf3f3548ed7a8490b882a6ca9ffeb94 (diff) | |
download | rpm-96a3f7a55d444296f97c3e28c8d810e220e1cb9f.tar.gz |
Factor -type problems into explicit code annotations.
CVS patchset: 5117
CVS date: 2001/10/16 17:42:18
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/digest.c | 4 | ||||
-rw-r--r-- | rpmio/rpmio.c | 2 | ||||
-rw-r--r-- | rpmio/rpmpgp.c | 2 | ||||
-rw-r--r-- | rpmio/rpmpgp.h | 2 | ||||
-rw-r--r-- | rpmio/rpmrpc.c | 2 | ||||
-rw-r--r-- | rpmio/url.c | 2 |
6 files changed, 13 insertions, 1 deletions
diff --git a/rpmio/digest.c b/rpmio/digest.c index 06d5ac394..4c51914ee 100644 --- a/rpmio/digest.c +++ b/rpmio/digest.c @@ -55,9 +55,11 @@ rpmDigestInit(rpmDigestFlags flags) /*@-sizeoftype@*/ /* FIX: union, not void pointer */ ctx->param = xcalloc(1, sizeof(md5Param)); /*@=sizeoftype@*/ + /*@-type@*/ /* FIX: cast? */ ctx->Reset = (void *) md5Reset; ctx->Update = (void *) md5Update; ctx->Digest = (void *) md5Digest; + /*@=type@*/ } if (flags & RPMDIGEST_SHA1) { @@ -66,9 +68,11 @@ rpmDigestInit(rpmDigestFlags flags) /*@-sizeoftype@*/ /* FIX: union, not void pointer */ ctx->param = xcalloc(1, sizeof(sha1Param)); /*@=sizeoftype@*/ + /*@-type@*/ /* FIX: cast? */ ctx->Reset = (void *) sha1Reset; ctx->Update = (void *) sha1Update; ctx->Digest = (void *) sha1Digest; + /*@=type@*/ } /*@-noeffectuncon@*/ /* FIX: check rc */ diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index e6014a401..fbfe0858e 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -1,3 +1,4 @@ +/*@-type@*/ /* LCL: function typedefs */ /** \ingroup rpmio * \file rpmio/rpmio.c */ @@ -3063,3 +3064,4 @@ static struct FDIO_s fpio_s = { ufdOpen, NULL, fdGetFp, NULL, Mkdir, Chdir, Rmdir, Rename, Unlink }; FDIO_t fpio = /*@-compmempass@*/ &fpio_s /*@=compmempass@*/ ; +/*@=type@*/ diff --git a/rpmio/rpmpgp.c b/rpmio/rpmpgp.c index d608fd9e8..a9c7f262a 100644 --- a/rpmio/rpmpgp.c +++ b/rpmio/rpmpgp.c @@ -808,7 +808,9 @@ printf("\t y = "), mp32println(_dig->y.size, _dig->y.data); /*@innerbreak@*/ break; case 0x03: pgpPrtVal(" iterated/salted ", pgpHashTbl, p[2]); + /*@-shiftsigned@*/ /* FIX: unsigned cast */ i = (16 + (p[11] & 0xf)) << ((p[11] >> 4) + 6); + /*@=shiftsigned@*/ pgpPrtHex("", p+3, 8); pgpPrtInt(" iter", i); p += 11; diff --git a/rpmio/rpmpgp.h b/rpmio/rpmpgp.h index e2de75395..fb5f2b5da 100644 --- a/rpmio/rpmpgp.h +++ b/rpmio/rpmpgp.h @@ -914,7 +914,7 @@ int pgpLen(const byte *s, /*@out@*/ unsigned int *lenp) (*lenp) = *s++; return 1; } else if (*s < 255) { - (*lenp) = ((s[0] - 192) << 8) + s[1] + 192; + (*lenp) = ((((unsigned)s[0]) - 192) << 8) + s[1] + 192; return 2; } else { (*lenp) = pgpGrab(s+1, 4); diff --git a/rpmio/rpmrpc.c b/rpmio/rpmrpc.c index 4ddf79771..2d5fa1901 100644 --- a/rpmio/rpmrpc.c +++ b/rpmio/rpmrpc.c @@ -1,3 +1,4 @@ +/*@-type@*/ /* LCL: function typedefs */ /** \ingroup rpmio * \file rpmio/rpmrpc.c */ @@ -1230,3 +1231,4 @@ fprintf(stderr, "*** Closedir(%p)\n", (void *)dir); return closedir(dir); } /*@=voidabstract@*/ +/*@=type@*/ diff --git a/rpmio/url.c b/rpmio/url.c index 3d9393173..f2775e1a2 100644 --- a/rpmio/url.c +++ b/rpmio/url.c @@ -1,3 +1,4 @@ +/*@-type@*/ /* LCL: function typedefs */ /** \ingroup rpmio * \file rpmio/url.c */ @@ -547,3 +548,4 @@ exit: return rc; } +/*@=type@*/ |