Remove splint tags.
authorRalf Corsépius <corsepiu@fedoraproject.org>
Tue, 11 Sep 2007 17:07:39 +0000 (19:07 +0200)
committerRalf Corsépius <corsepiu@fedoraproject.org>
Tue, 11 Sep 2007 17:07:39 +0000 (19:07 +0200)
52 files changed:
lib/cpio.c
lib/cpio.h
lib/depends.c
lib/formats.c
lib/fs.c
lib/fsm.c
lib/fsm.h
lib/idtx.c
lib/idtx.h
lib/manifest.c
lib/manifest.h
lib/misc.c
lib/misc.h
lib/package.c
lib/poptALL.c
lib/poptI.c
lib/poptQV.c
lib/psm.c
lib/psm.h
lib/query.c
lib/rpmal.c
lib/rpmal.h
lib/rpmchecksig.c
lib/rpmcli.h
lib/rpmds.c
lib/rpmds.h
lib/rpmfi.c
lib/rpmfi.h
lib/rpmgi.c
lib/rpmgi.h
lib/rpminstall.c
lib/rpmlead.c
lib/rpmlead.h
lib/rpmlib.h
lib/rpmlibprov.c
lib/rpmlock.c
lib/rpmlock.h
lib/rpmps.c
lib/rpmps.h
lib/rpmrc.c
lib/rpmte.c
lib/rpmte.h
lib/rpmts.c
lib/rpmts.h
lib/rpmvercmp.c
lib/signature.c
lib/signature.h
lib/stringbuf.c
lib/stringbuf.h
lib/tgi.c
lib/transaction.c
lib/verify.c

index 4c7a74a..2b8788d 100644 (file)
@@ -18,7 +18,6 @@
 #include "rpmerr.h"
 #include "debug.h"
 
-/*@access FSM_t @*/
 
 /**
  * Convert string to unsigned integer (with buffer size check).
@@ -28,9 +27,7 @@
  * @param num          max no. of bytes to read
  * @return             converted integer
  */
-static int strntoul(const char *str, /*@out@*/char **endptr, int base, int num)
-       /*@modifies *endptr @*/
-       /*@requires maxSet(endptr) >= 0 @*/
+static int strntoul(const char *str,char **endptr, int base, int num)
 {
     char * buf, * end;
     unsigned long ret;
@@ -40,26 +37,24 @@ static int strntoul(const char *str, /*@out@*/char **endptr, int base, int num)
     buf[num] = '\0';
 
     ret = strtoul(buf, &end, base);
-/*@-boundsread@*/ /* LCL: strtoul annotations */
+/* LCL: strtoul annotations */
     if (*end != '\0')
        *endptr = ((char *)str) + (end - buf);  /* XXX discards const */
     else
        *endptr = ((char *)str) + strlen(buf);
-/*@=boundsread@*/
 
     return ret;
 }
 
 #define GET_NUM_FIELD(phys, log) \
-       /*@-boundswrite@*/ \
+       \
        log = strntoul(phys, &end, 16, sizeof(phys)); \
-       /*@=boundswrite@*/ \
+       \
        if ( (end - phys) != sizeof(phys) ) return CPIOERR_BAD_HEADER;
 #define SET_NUM_FIELD(phys, val, space) \
        sprintf(space, "%8.8lx", (unsigned long) (val)); \
-       /*@-boundsread@*/ \
+       \
        memcpy(phys, space, 8) \
-       /*@=boundsread@*/
 
 int cpioTrailerWrite(FSM_t fsm)
 {
@@ -67,13 +62,11 @@ int cpioTrailerWrite(FSM_t fsm)
        (struct cpioCrcPhysicalHeader *)fsm->rdbuf;
     int rc;
 
-/*@-boundswrite@*/
     memset(hdr, '0', PHYS_HDR_SIZE);
     memcpy(hdr->magic, CPIO_NEWC_MAGIC, sizeof(hdr->magic));
     memcpy(hdr->nlink, "00000001", 8);
     memcpy(hdr->namesize, "0000000b", 8);
     memcpy(fsm->rdbuf + PHYS_HDR_SIZE, CPIO_TRAILER, sizeof(CPIO_TRAILER));
-/*@=boundswrite@*/
 
     /* XXX DWRITE uses rdnb for I/O length. */
     fsm->rdnb = PHYS_HDR_SIZE + sizeof(CPIO_TRAILER);
@@ -113,9 +106,7 @@ int cpioHeaderWrite(FSM_t fsm, struct stat * st)
 
     len = strlen(fsm->path) + 1; SET_NUM_FIELD(hdr->namesize, len, field);
     memcpy(hdr->checksum, "00000000", 8);
-/*@-boundswrite@*/
     memcpy(fsm->rdbuf + PHYS_HDR_SIZE, fsm->path, len);
-/*@=boundswrite@*/
 
     /* XXX DWRITE uses rdnb for I/O length. */
     fsm->rdnb = PHYS_HDR_SIZE + len;
@@ -128,7 +119,6 @@ int cpioHeaderWrite(FSM_t fsm, struct stat * st)
 }
 
 int cpioHeaderRead(FSM_t fsm, struct stat * st)
-       /*@modifies fsm, *st @*/
 {
     struct cpioCrcPhysicalHeader hdr;
     int nameSize;
@@ -141,9 +131,7 @@ int cpioHeaderRead(FSM_t fsm, struct stat * st)
     if (!rc && fsm->rdnb != fsm->wrlen)
        rc = CPIOERR_READ_FAILED;
     if (rc) return rc;
-/*@-boundswrite@*/
     memcpy(&hdr, fsm->wrbuf, fsm->rdnb);
-/*@=boundswrite@*/
 
     if (strncmp(CPIO_CRC_MAGIC, hdr.magic, sizeof(CPIO_CRC_MAGIC)-1) &&
        strncmp(CPIO_NEWC_MAGIC, hdr.magic, sizeof(CPIO_NEWC_MAGIC)-1))
@@ -159,15 +147,11 @@ int cpioHeaderRead(FSM_t fsm, struct stat * st)
 
     GET_NUM_FIELD(hdr.devMajor, major);
     GET_NUM_FIELD(hdr.devMinor, minor);
-    /*@-shiftimplementation@*/
     st->st_dev = makedev(major, minor);
-    /*@=shiftimplementation@*/
 
     GET_NUM_FIELD(hdr.rdevMajor, major);
     GET_NUM_FIELD(hdr.rdevMinor, minor);
-    /*@-shiftimplementation@*/
     st->st_rdev = makedev(major, minor);
-    /*@=shiftimplementation@*/
 
     GET_NUM_FIELD(hdr.namesize, nameSize);
     if (nameSize >= fsm->wrsize)
@@ -183,10 +167,8 @@ int cpioHeaderRead(FSM_t fsm, struct stat * st)
            fsm->path = NULL;
            return rc;
        }
-/*@-boundswrite@*/
        memcpy(t, fsm->wrbuf, fsm->rdnb);
        t[nameSize] = '\0';
-/*@=boundswrite@*/
        fsm->path = t;
     }
 
@@ -200,7 +182,6 @@ const char * cpioStrerror(int rc)
     int l, myerrno = errno;
 
     strcpy(msg, "cpio: ");
-    /*@-branchstate@*/
     switch (rc) {
     default:
        s = msg + strlen(msg);
@@ -239,20 +220,17 @@ const char * cpioStrerror(int rc)
     case CPIOERR_ENOENT:       s = strerror(ENOENT); break;
     case CPIOERR_ENOTEMPTY:    s = strerror(ENOTEMPTY); break;
     }
-    /*@=branchstate@*/
 
     l = sizeof(msg) - strlen(msg) - 1;
     if (s != NULL) {
        if (l > 0) strncat(msg, s, l);
        l -= strlen(s);
     }
-    /*@-branchstate@*/
     if ((rc & CPIOERR_CHECK_ERRNO) && myerrno) {
        s = _(" failed - ");
        if (l > 0) strncat(msg, s, l);
        l -= strlen(s);
        if (l > 0) strncat(msg, strerror(myerrno), l);
     }
-    /*@=branchstate@*/
     return msg;
 }
index 0a683ce..c01eb99 100644 (file)
@@ -103,9 +103,7 @@ extern "C" {
  * @retval fsm         file path and stat info
  * @return             0 on success
  */
-int cpioTrailerWrite(FSM_t fsm)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/;
+int cpioTrailerWrite(FSM_t fsm);
 
 /**
  * Write cpio header.
@@ -113,9 +111,7 @@ int cpioTrailerWrite(FSM_t fsm)
  * @param st
  * @return             0 on success
  */
-int cpioHeaderWrite(FSM_t fsm, struct stat * st)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/;
+int cpioHeaderWrite(FSM_t fsm, struct stat * st);
 
 /**
  * Read cpio header.
@@ -123,17 +119,14 @@ int cpioHeaderWrite(FSM_t fsm, struct stat * st)
  * @retval st
  * @return             0 on success
  */
-int cpioHeaderRead(FSM_t fsm, struct stat * st)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, *st, fileSystem, internalState @*/;
+int cpioHeaderRead(FSM_t fsm, struct stat * st);
 
 /** \ingroup payload
  * Return formatted error message on payload handling failure.
  * @param rc           error code
  * @return             formatted error string
  */
-/*@observer@*/ const char * cpioStrerror(int rc)
-       /*@*/;
+const char * cpioStrerror(int rc);
 
 #ifdef __cplusplus
 }
index 69e6eff..f5d46f9 100644 (file)
 
 #include "debug.h"
 
-/*@access tsortInfo @*/
-/*@access rpmts @*/
-
-/*@access dbiIndex @*/         /* XXX for dbi->dbi_txnid */
-
-/*@access alKey @*/    /* XXX for reordering and RPMAL_NOMATCH assign */
 
 /**
  */
-typedef /*@abstract@*/ struct orderListIndex_s *       orderListIndex;
-/*@access orderListIndex@*/
+typedef struct orderListIndex_s *      orderListIndex;
 
 /**
  */
 struct orderListIndex_s {
-/*@dependent@*/
     alKey pkgKey;
     int orIndex;
 };
 
-/*@unchecked@*/
 int _cacheDependsRC = 1;
 
-/*@observer@*/ /*@unchecked@*/
 const char *rpmNAME = PACKAGE;
 
-/*@observer@*/ /*@unchecked@*/
 const char *rpmEVR = VERSION;
 
-/*@unchecked@*/
 int rpmFLAGS = RPMSENSE_EQUAL;
 
 /**
@@ -60,7 +48,6 @@ int rpmFLAGS = RPMSENSE_EQUAL;
  * @return             result of comparison
  */
 static int intcmp(const void * a, const void * b)
-       /*@requires maxRead(a) == 0 /\ maxRead(b) == 0 @*/
 {
     const int * aptr = a;
     const int * bptr = b;
@@ -77,19 +64,15 @@ static int intcmp(const void * a, const void * b)
  * @return             0 on success
  */
 static int removePackage(rpmts ts, Header h, int dboffset,
-               /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey depends)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/
+               alKey depends)
 {
     rpmte p;
 
     /* Filter out duplicate erasures. */
     if (ts->numRemovedPackages > 0 && ts->removedPackages != NULL) {
-/*@-boundswrite@*/
        if (bsearch(&dboffset, ts->removedPackages, ts->numRemovedPackages,
                        sizeof(*ts->removedPackages), intcmp) != NULL)
            return 0;
-/*@=boundswrite@*/
     }
 
     if (ts->numRemovedPackages == ts->allocedRemovedPackages) {
@@ -99,10 +82,8 @@ static int removePackage(rpmts ts, Header h, int dboffset,
     }
 
     if (ts->removedPackages != NULL) { /* XXX can't happen. */
-/*@-boundswrite@*/
        ts->removedPackages[ts->numRemovedPackages] = dboffset;
        ts->numRemovedPackages++;
-/*@=boundswrite@*/
        if (ts->numRemovedPackages > 1)
            qsort(ts->removedPackages, ts->numRemovedPackages,
                        sizeof(*ts->removedPackages), intcmp);
@@ -110,16 +91,12 @@ static int removePackage(rpmts ts, Header h, int dboffset,
 
     if (ts->orderCount >= ts->orderAlloced) {
        ts->orderAlloced += (ts->orderCount - ts->orderAlloced) + ts->delta;
-/*@-type +voidabstract @*/
        ts->order = xrealloc(ts->order, sizeof(*ts->order) * ts->orderAlloced);
-/*@=type =voidabstract @*/
     }
 
     p = rpmteNew(ts, h, TR_REMOVED, NULL, NULL, dboffset, depends);
-/*@-boundswrite@*/
     ts->order[ts->orderCount] = p;
     ts->orderCount++;
-/*@=boundswrite@*/
 
     return 0;
 }
@@ -247,24 +224,16 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
 addheader:
     if (oc >= ts->orderAlloced) {
        ts->orderAlloced += (oc - ts->orderAlloced) + ts->delta;
-/*@-type +voidabstract @*/
        ts->order = xrealloc(ts->order, ts->orderAlloced * sizeof(*ts->order));
-/*@=type =voidabstract @*/
     }
 
     p = rpmteNew(ts, h, TR_ADDED, key, relocs, -1, pkgKey);
 
     if (duplicate && oc < ts->orderCount) {
-/*@-type -unqualifiedtrans@*/
-/*@-boundswrite@*/
        ts->order[oc] = rpmteFree(ts->order[oc]);
-/*@=boundswrite@*/
-/*@=type =unqualifiedtrans@*/
     }
 
-/*@-boundswrite@*/
     ts->order[oc] = p;
-/*@=boundswrite@*/
     if (!duplicate) {
        ts->orderCount++;
        rpmcliPackagesTotal++;
@@ -274,9 +243,7 @@ addheader:
                        rpmteDS(p, RPMTAG_PROVIDENAME),
                        rpmteFI(p, RPMTAG_BASENAMES), tscolor);
     if (pkgKey == RPMAL_NOMATCH) {
-/*@-boundswrite@*/
        ts->order[oc] = rpmteFree(ts->order[oc]);
-/*@=boundswrite@*/
        ec = 1;
        goto exit;
     }
@@ -359,7 +326,7 @@ addheader:
            /* XXX provides *are* colored, effectively limiting Obsoletes:
                to matching only colored Provides: based on pkg coloring. */
            if (tscolor && hcolor && ohcolor && !(hcolor & ohcolor))
-               /*@innercontinue@*/ continue;
+               continue;
 
            /*
             * Rpm prior to 3.0.3 does not have versioned obsoletes.
@@ -372,10 +339,8 @@ addheader:
                if (rpmVersionCompare(h, oh))
 #endif
                    xx = removePackage(ts, oh, rpmdbGetIteratorOffset(mi), pkgKey);
-/*@-nullptrarith@*/
                rpmMessage(RPMMESS_DEBUG, _("  Obsoletes: %s\t\terases %s\n"),
                        rpmdsDNEVR(obsoletes)+2, ohNEVRA);
-/*@=nullptrarith@*/
                ohNEVRA = _free(ohNEVRA);
            }
        }
@@ -403,10 +368,6 @@ int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset)
  * @return             0 if satisfied, 1 if not satisfied, 2 if error
  */
 static int unsatisfiedDepend(rpmts ts, rpmds dep, int adding)
-       /*@globals _cacheDependsRC, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, _cacheDependsRC, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
 {
     DBT * key = alloca(sizeof(*key));
     DBT * data = alloca(sizeof(*data));
@@ -433,7 +394,6 @@ static int unsatisfiedDepend(rpmts ts, rpmds dep, int adding)
            const char * DNEVR;
 
            rc = -1;
-/*@-branchstate@*/
            if ((DNEVR = rpmdsDNEVR(dep)) != NULL) {
                DBC * dbcursor = NULL;
                void * datap = NULL;
@@ -443,26 +403,22 @@ static int unsatisfiedDepend(rpmts ts, rpmds dep, int adding)
                xx = dbiCopen(dbi, dbi->dbi_txnid, &dbcursor, 0);
 
                memset(key, 0, sizeof(*key));
-/*@i@*/                key->data = (void *) DNEVR;
+               key->data = (void *) DNEVR;
                key->size = DNEVRlen;
                memset(data, 0, sizeof(*data));
                data->data = datap;
                data->size = datalen;
-/*@-nullstate@*/ /* FIX: data->data may be NULL */
+/* FIX: data->data may be NULL */
                xx = dbiGet(dbi, dbcursor, key, data, DB_SET);
-/*@=nullstate@*/
                DNEVR = key->data;
                DNEVRlen = key->size;
                datap = data->data;
                datalen = data->size;
 
-/*@-boundswrite@*/
                if (xx == 0 && datap && datalen == 4)
                    memcpy(&rc, datap, datalen);
-/*@=boundswrite@*/
                xx = dbiCclose(dbi, dbcursor, 0);
            }
-/*@=branchstate@*/
 
            if (rc >= 0) {
                rpmdsNotify(dep, _("(cached)"), rc);
@@ -475,8 +431,8 @@ retry:
     rc = 0;    /* assume dependency is satisfied */
 
 #if defined(DYING)
-  { static /*@observer@*/ const char noProvidesString[] = "nada";
-    static /*@observer@*/ const char * rcProvidesString = noProvidesString;
+  { static const char noProvidesString[] = "nada";
+    static const char * rcProvidesString = noProvidesString;
     int_32 Flags = rpmdsFlags(dep);
     const char * start;
     int i;
@@ -487,15 +443,11 @@ retry:
     if (rcProvidesString != NULL && !(Flags & RPMSENSE_SENSEMASK)) {
 
        i = strlen(Name);
-       /*@-observertrans -mayaliasunique@*/
        while ((start = strstr(rcProvidesString, Name))) {
-       /*@=observertrans =mayaliasunique@*/
-/*@-boundsread@*/
            if (xisspace(start[i]) || start[i] == '\0' || start[i] == ',') {
                rpmdsNotify(dep, _("(rpmrc provides)"), rc);
                goto exit;
            }
-/*@=boundsread@*/
            rcProvidesString = start + 1;
        }
     }
@@ -528,7 +480,6 @@ retry:
 
     /* XXX only the installer does not have the database open here. */
     if (rpmtsGetRdb(ts) != NULL) {
-/*@-boundsread@*/
        if (Name[0] == '/') {
            /* depFlags better be 0! */
 
@@ -544,7 +495,6 @@ retry:
            }
            mi = rpmdbFreeIterator(mi);
        }
-/*@=boundsread@*/
 
        mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, Name, 0);
        (void) rpmdbPruneIterator(mi,
@@ -577,7 +527,6 @@ retry:
     /*
      * Search for an unsatisfied dependency.
      */
-/*@-boundsread@*/
     if (adding && !retrying && !(rpmtsFlags(ts) & RPMTRANS_FLAG_NOSUGGEST)) {
        if (ts->solve != NULL) {
            xx = (*ts->solve) (ts, dep, ts->solveData);
@@ -590,7 +539,6 @@ retry:
            }
        }
     }
-/*@=boundsread@*/
 
 unsatisfied:
     rc = 1;    /* dependency is unsatisfied */
@@ -608,7 +556,6 @@ exit:
        } else {
            const char * DNEVR;
            xx = 0;
-           /*@-branchstate@*/
            if ((DNEVR = rpmdsDNEVR(dep)) != NULL) {
                DBC * dbcursor = NULL;
                size_t DNEVRlen = strlen(DNEVR);
@@ -616,18 +563,15 @@ exit:
                xx = dbiCopen(dbi, dbi->dbi_txnid, &dbcursor, DB_WRITECURSOR);
 
                memset(key, 0, sizeof(*key));
-/*@i@*/                key->data = (void *) DNEVR;
+               key->data = (void *) DNEVR;
                key->size = DNEVRlen;
                memset(data, 0, sizeof(*data));
                data->data = &rc;
                data->size = sizeof(rc);
 
-               /*@-compmempass@*/
                xx = dbiPut(dbi, dbcursor, key, data, 0);
-               /*@=compmempass@*/
                xx = dbiCclose(dbi, dbcursor, DB_WRITECURSOR);
            }
-           /*@=branchstate@*/
            if (xx)
                _cacheDependsRC = 0;
        }
@@ -647,12 +591,8 @@ exit:
  * @return             0 no problems found
  */
 static int checkPackageDeps(rpmts ts, const char * pkgNEVRA,
-               /*@null@*/ rpmds requires, /*@null@*/ rpmds conflicts,
-               /*@null@*/ const char * depName, uint_32 tscolor, int adding)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, requires, conflicts, rpmGlobalMacroContext,
-               fileSystem, internalState */
+               rpmds requires, rpmds conflicts,
+               const char * depName, uint_32 tscolor, int adding)
 {
     uint_32 dscolor;
     const char * Name;
@@ -679,25 +619,23 @@ static int checkPackageDeps(rpmts ts, const char * pkgNEVRA,
 
        switch (rc) {
        case 0:         /* requirements are satisfied. */
-           /*@switchbreak@*/ break;
+           break;
        case 1:         /* requirements are not satisfied. */
        {   fnpyKey * suggestedKeys = NULL;
 
-           /*@-branchstate@*/
            if (ts->availablePackages != NULL) {
                suggestedKeys = rpmalAllSatisfiesDepend(ts->availablePackages,
                                requires, NULL);
            }
-           /*@=branchstate@*/
 
            rpmdsProblem(ts->probs, pkgNEVRA, requires, suggestedKeys, adding);
 
        }
-           /*@switchbreak@*/ break;
+           break;
        case 2:         /* something went wrong! */
        default:
            ourrc = 1;
-           /*@switchbreak@*/ break;
+           break;
        }
     }
 
@@ -723,13 +661,13 @@ static int checkPackageDeps(rpmts ts, const char * pkgNEVRA,
        switch (rc) {
        case 0:         /* conflicts exist. */
            rpmdsProblem(ts->probs, pkgNEVRA, conflicts, NULL, adding);
-           /*@switchbreak@*/ break;
+           break;
        case 1:         /* conflicts don't exist. */
-           /*@switchbreak@*/ break;
+           break;
        case 2:         /* something went wrong! */
        default:
            ourrc = 1;
-           /*@switchbreak@*/ break;
+           break;
        }
     }
 
@@ -747,9 +685,7 @@ static int checkPackageDeps(rpmts ts, const char * pkgNEVRA,
  * @return             0 no problems found
  */
 static int checkPackageSet(rpmts ts, const char * dep,
-               /*@only@*/ /*@null@*/ rpmdbMatchIterator mi, int adding)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, mi, rpmGlobalMacroContext, fileSystem, internalState @*/
+               rpmdbMatchIterator mi, int adding)
 {
     int scareMem = 1;
     Header h;
@@ -789,8 +725,6 @@ static int checkPackageSet(rpmts ts, const char * dep,
  * @return             0 no problems found
  */
 static int checkDependentPackages(rpmts ts, const char * dep)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     rpmdbMatchIterator mi;
     mi = rpmtsInitIterator(ts, RPMTAG_REQUIRENAME, dep, 0);
@@ -804,8 +738,6 @@ static int checkDependentPackages(rpmts ts, const char * dep)
  * @return             0 no problems found
  */
 static int checkDependentConflicts(rpmts ts, const char * dep)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     int rc = 0;
 
@@ -819,33 +751,26 @@ static int checkDependentConflicts(rpmts ts, const char * dep)
 }
 
 struct badDeps_s {
-/*@observer@*/ /*@owned@*/ /*@null@*/
     const char * pname;
-/*@observer@*/ /*@dependent@*/ /*@null@*/
     const char * qname;
 };
 
 #ifdef REFERENCE
 static struct badDeps_s {
-/*@observer@*/ /*@null@*/ const char * pname;
-/*@observer@*/ /*@null@*/ const char * qname;
+const char * pname;
+const char * qname;
 } badDeps[] = {
     { NULL, NULL }
 };
 #else
-/*@unchecked@*/
 static int badDepsInitialized = 0;
 
-/*@unchecked@*/ /*@only@*/ /*@null@*/
 static struct badDeps_s * badDeps = NULL;
 #endif
 
 /**
  */
-/*@-modobserver -observertrans @*/
 static void freeBadDeps(void)
-       /*@globals badDeps, badDepsInitialized @*/
-       /*@modifies badDeps, badDepsInitialized @*/
 {
     if (badDeps) {
        struct badDeps_s * bdp;
@@ -855,7 +780,6 @@ static void freeBadDeps(void)
     }
     badDepsInitialized = 0;
 }
-/*@=modobserver =observertrans @*/
 
 /**
  * Check for dependency relations to be ignored.
@@ -865,12 +789,7 @@ static void freeBadDeps(void)
  * @param q            predecessor element (i.e. with Provides: )
  * @return             1 if dependency is to be ignored.
  */
-/*@-boundsread@*/
 static int ignoreDep(const rpmts ts, const rpmte p, const rpmte q)
-       /*@globals badDeps, badDepsInitialized,
-               rpmGlobalMacroContext, h_errno @*/
-       /*@modifies badDeps, badDepsInitialized,
-               rpmGlobalMacroContext @*/
 {
     struct badDeps_s * bdp;
 
@@ -897,9 +816,7 @@ static int ignoreDep(const rpmts ts, const rpmte p, const rpmte q)
                if ((qname = strchr(pname, '>')) != NULL)
                    *qname++ = '\0';
                bdp->pname = pname;
-               /*@-usereleased@*/
                bdp->qname = qname;
-               /*@=usereleased@*/
                rpmMessage(msglvl,
                        _("ignore package name relation(s) [%d]\t%s -> %s\n"),
                        i, bdp->pname, (bdp->qname ? bdp->qname : "???"));
@@ -912,45 +829,35 @@ static int ignoreDep(const rpmts ts, const rpmte p, const rpmte q)
        badDepsInitialized++;
     }
 
-    /*@-compdef@*/
     if (badDeps != NULL)
     for (bdp = badDeps; bdp->pname != NULL && bdp->qname != NULL; bdp++) {
        if (!strcmp(rpmteN(p), bdp->pname) && !strcmp(rpmteN(q), bdp->qname))
            return 1;
     }
     return 0;
-    /*@=compdef@*/
 }
-/*@=boundsread@*/
 
 /**
  * Recursively mark all nodes with their predecessors.
  * @param tsi          successor chain
  * @param q            predecessor
  */
-static void markLoop(/*@special@*/ tsortInfo tsi, rpmte q)
-       /*@globals internalState @*/
-       /*@uses tsi @*/
-       /*@modifies internalState @*/
+static void markLoop(tsortInfo tsi, rpmte q)
 {
     rpmte p;
 
-    /*@-branchstate@*/ /* FIX: q is kept */
+    /* FIX: q is kept */
     while (tsi != NULL && (p = tsi->tsi_suc) != NULL) {
        tsi = tsi->tsi_next;
        if (rpmteTSI(p)->tsi_chain != NULL)
            continue;
-       /*@-assignexpose -temptrans@*/
        rpmteTSI(p)->tsi_chain = q;
-       /*@=assignexpose =temptrans@*/
        if (rpmteTSI(p)->tsi_next != NULL)
            markLoop(rpmteTSI(p)->tsi_next, p);
     }
-    /*@=branchstate@*/
 }
 
-static inline /*@observer@*/ const char * identifyDepend(int_32 f)
-       /*@*/
+static inline const char * identifyDepend(int_32 f)
 {
     if (isLegacyPreReq(f))
        return "PreReq:";
@@ -983,13 +890,11 @@ static inline /*@observer@*/ const char * identifyDepend(int_32 f)
  * @param msglvl       message level at which to spew
  * @return             (possibly NULL) formatted "q <- p" releation (malloc'ed)
  */
-/*@-boundswrite@*/
-/*@-mustmod@*/ /* FIX: hack modifies, but -type disables */
-static /*@owned@*/ /*@null@*/ const char *
+/* FIX: hack modifies, but -type disables */
+static const char *
 zapRelation(rpmte q, rpmte p,
-               /*@null@*/ rpmds requires,
-               int zap, /*@in@*/ /*@out@*/ int * nzaps, int msglvl)
-       /*@modifies q, p, requires, *nzaps @*/
+               rpmds requires,
+               int zap, int * nzaps, int msglvl)
 {
     tsortInfo tsi_prev;
     tsortInfo tsi;
@@ -998,16 +903,12 @@ zapRelation(rpmte q, rpmte p,
     for (tsi_prev = rpmteTSI(q), tsi = rpmteTSI(q)->tsi_next;
         tsi != NULL;
        /* XXX Note: the loop traverses "not found", break on "found". */
-       /*@-nullderef@*/
         tsi_prev = tsi, tsi = tsi->tsi_next)
-       /*@=nullderef@*/
     {
        int_32 Flags;
 
-       /*@-abstractcompare@*/
        if (tsi->tsi_suc != p)
            continue;
-       /*@=abstractcompare@*/
 
        if (requires == NULL) continue;         /* XXX can't happen */
 
@@ -1020,7 +921,6 @@ zapRelation(rpmte q, rpmte p,
        /*
         * Attempt to unravel a dependency loop by eliminating Requires's.
         */
-       /*@-branchstate@*/
        if (zap && !(Flags & RPMSENSE_PREREQ)) {
            rpmMessage(msglvl,
                        _("removing %s \"%s\" from tsort relations.\n"),
@@ -1035,14 +935,11 @@ zapRelation(rpmte q, rpmte p,
            if (zap)
                zap--;
        }
-       /*@=branchstate@*/
        /* XXX Note: the loop traverses "not found", get out now! */
        break;
     }
     return dp;
 }
-/*@=mustmod@*/
-/*@=boundswrite@*/
 
 /**
  * Record next "q <- p" relation (i.e. "p" requires "q").
@@ -1052,14 +949,10 @@ zapRelation(rpmte q, rpmte p,
  * @param requires     relation
  * @return             0 always
  */
-/*@-mustmod@*/
 static inline int addRelation(rpmts ts,
-               /*@dependent@*/ rpmte p,
+               rpmte p,
                unsigned char * selected,
                rpmds requires)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, p, *selected, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
 {
     rpmtsi qi; rpmte q;
     tsortInfo tsi;
@@ -1107,13 +1000,9 @@ static inline int addRelation(rpmts ts,
 
     /* Avoid redundant relations. */
     /* XXX TODO: add control bit. */
-/*@-boundsread@*/
     if (selected[i] != 0)
        return 0;
-/*@=boundsread@*/
-/*@-boundswrite@*/
     selected[i] = 1;
-/*@=boundswrite@*/
 
     /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */
     rpmteTSI(p)->tsi_count++;                  /* bump p predecessor count */
@@ -1133,7 +1022,6 @@ static inline int addRelation(rpmts ts,
     rpmteTSI(q)->tsi_qcnt++;                   /* bump q successor count */
     return 0;
 }
-/*@=mustmod@*/
 
 /**
  * Compare ordered list entries by index (qsort/bsearch).
@@ -1141,12 +1029,10 @@ static inline int addRelation(rpmts ts,
  * @param two          2nd ordered list entry
  * @return             result of comparison
  */
-static int orderListIndexCmp(const void * one, const void * two)       /*@*/
+static int orderListIndexCmp(const void * one, const void * two)       
 {
-    /*@-castexpose@*/
     long a = (long) ((const orderListIndex)one)->pkgKey;
     long b = (long) ((const orderListIndex)two)->pkgKey;
-    /*@=castexpose@*/
     return (a - b);
 }
 
@@ -1156,13 +1042,10 @@ static int orderListIndexCmp(const void * one, const void * two)        /*@*/
  * @retval qp          address of first element
  * @retval rp          address of last element
  */
-/*@-boundswrite@*/
-/*@-mustmod@*/
-static void addQ(/*@dependent@*/ rpmte p,
-               /*@in@*/ /*@out@*/ rpmte * qp,
-               /*@in@*/ /*@out@*/ rpmte * rp,
+static void addQ(rpmte p,
+               rpmte * qp,
+               rpmte * rp,
                uint_32 prefcolor)
-       /*@modifies p, *qp, *rp @*/
 {
     rpmte q, qprev;
 
@@ -1170,9 +1053,8 @@ static void addQ(/*@dependent@*/ rpmte p,
     rpmteTSI(p)->tsi_reqx = 1;
 
     if ((*rp) == NULL) {       /* 1st element */
-       /*@-dependenttrans@*/ /* FIX: double indirection */
+       /* FIX: double indirection */
        (*rp) = (*qp) = p;
-       /*@=dependenttrans@*/
        return;
     }
 
@@ -1191,23 +1073,16 @@ static void addQ(/*@dependent@*/ rpmte p,
 
     if (qprev == NULL) {       /* insert at beginning of list */
        rpmteTSI(p)->tsi_suc = q;
-       /*@-dependenttrans@*/
        (*qp) = p;              /* new head */
-       /*@=dependenttrans@*/
     } else if (q == NULL) {    /* insert at end of list */
        rpmteTSI(qprev)->tsi_suc = p;
-       /*@-dependenttrans@*/
        (*rp) = p;              /* new tail */
-       /*@=dependenttrans@*/
     } else {                   /* insert between qprev and q */
        rpmteTSI(p)->tsi_suc = q;
        rpmteTSI(qprev)->tsi_suc = p;
     }
 }
-/*@=mustmod@*/
-/*@=boundswrite@*/
 
-/*@-bounds@*/
 int rpmtsOrder(rpmts ts)
 {
     rpmds requires;
@@ -1293,13 +1168,13 @@ int rpmtsOrder(rpmts ts)
            case TR_REMOVED:
                /* Skip if not %preun/%postun requires or legacy prereq. */
                if (!( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) )
-                   /*@innercontinue@*/ continue;
-               /*@switchbreak@*/ break;
+                   continue;
+               break;
            case TR_ADDED:
                /* Skip if not %pre/%post requires or legacy prereq. */
                if (!( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) )
-                   /*@innercontinue@*/ continue;
-               /*@switchbreak@*/ break;
+                   continue;
+               break;
            }
 
            /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */
@@ -1319,14 +1194,14 @@ int rpmtsOrder(rpmts ts)
                /* Skip if %preun/%postun requires or legacy prereq. */
                if (isInstallPreReq(Flags)
                 ||  ( isErasePreReq(Flags) || isLegacyPreReq(Flags) ) )
-                   /*@innercontinue@*/ continue;
-               /*@switchbreak@*/ break;
+                   continue;
+               break;
            case TR_ADDED:
                /* Skip if %pre/%post requires or legacy prereq. */
                if (isErasePreReq(Flags)
                 ||  ( isInstallPreReq(Flags) || isLegacyPreReq(Flags) ) )
-                   /*@innercontinue@*/ continue;
-               /*@switchbreak@*/ break;
+                   continue;
+               break;
            }
 
            /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */
@@ -1392,14 +1267,14 @@ rescan:
        case TR_ADDED:
            if (!(oType & TR_ADDED))
                continue;
-           /*@switchbreak@*/ break;
+           break;
        case TR_REMOVED:
            if (!(oType & TR_REMOVED))
                continue;
-           /*@switchbreak@*/ break;
+           break;
        default:
            continue;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        }
        deptypechar = (rpmteType(q) == TR_REMOVED ? '-' : '+');
 
@@ -1422,10 +1297,10 @@ rescan:
        switch (rpmteType(q)) {
        case TR_ADDED:
             ordering[orderingCount] = rpmteAddedKey(q);
-            /*@switchbreak@*/ break;
+            break;
        case TR_REMOVED:
             ordering[orderingCount] = RPMAL_NOMATCH;
-            /*@switchbreak@*/ break;
+            break;
         }
        orderingCount++;
        qlen--;
@@ -1464,7 +1339,7 @@ rescan:
            while ((p = rpmtsiNext(pi, oType)) != NULL) {
                /* Is this element in the queue? */
                if (rpmteTSI(p)->tsi_reqx == 0)
-                   /*@innercontinue@*/ continue;
+                   continue;
                tsi->tsi_suc = p;
                tsi = rpmteTSI(p);
            }
@@ -1513,7 +1388,7 @@ rescan:
                 q = rpmteTSI(q)->tsi_chain)
            {
                if (rpmteTSI(q)->tsi_reqx)
-                   /*@innerbreak@*/ break;
+                   break;
                rpmteTSI(q)->tsi_reqx = 1;
            }
 
@@ -1537,7 +1412,7 @@ rescan:
                requires = rpmteDS(p, RPMTAG_REQUIRENAME);
                requires = rpmdsInit(requires);
                if (requires == NULL)
-                   /*@innercontinue@*/ continue;       /* XXX can't happen */
+                   continue;   /* XXX can't happen */
                dp = zapRelation(q, p, requires, 1, &nzaps, msglvl);
 
                /* Print next member of loop. */
@@ -1594,10 +1469,10 @@ rescan:
        switch (rpmteType(p)) {
        case TR_ADDED:
            orderList[j].pkgKey = rpmteAddedKey(p);
-           /*@switchbreak@*/ break;
+           break;
        case TR_REMOVED:
            orderList[j].pkgKey = RPMAL_NOMATCH;
-           /*@switchbreak@*/ break;
+           break;
        }
        orderList[j].orIndex = rpmtsiOc(pi);
        j++;
@@ -1606,10 +1481,7 @@ rescan:
 
     qsort(orderList, numOrderList, sizeof(*orderList), orderListIndexCmp);
 
-/*@-type@*/
     newOrder = xcalloc(ts->orderCount, sizeof(*newOrder));
-/*@=type@*/
-    /*@-branchstate@*/
     for (i = 0, newOrderCount = 0; i < orderingCount; i++)
     {
        struct orderListIndex_s key;
@@ -1631,17 +1503,16 @@ rescan:
        if (anaconda)
        for (j = needle->orIndex + 1; j < ts->orderCount; j++) {
            if ((q = ts->order[j]) == NULL)
-               /*@innerbreak@*/ break;
+               break;
            if (rpmteType(q) == TR_REMOVED
             && rpmteDependsOnKey(q) == needle->pkgKey)
            {
                newOrder[newOrderCount++] = q;
                ts->order[j] = NULL;
            } else
-               /*@innerbreak@*/ break;
+               break;
        }
     }
-    /*@=branchstate@*/
 
     for (j = 0; j < ts->orderCount; j++) {
        if ((p = ts->order[j]) == NULL)
@@ -1651,9 +1522,7 @@ rescan:
     }
 assert(newOrderCount == ts->orderCount);
 
-/*@+voidabstract@*/
     ts->order = _free(ts->order);
-/*@=voidabstract@*/
     ts->order = newOrder;
     ts->orderAlloced = ts->orderCount;
     orderList = _free(orderList);
@@ -1667,7 +1536,6 @@ assert(newOrderCount == ts->orderCount);
 
     return 0;
 }
-/*@=bounds@*/
 
 int rpmtsCheck(rpmts ts)
 {
@@ -1700,10 +1568,9 @@ int rpmtsCheck(rpmts ts)
     while ((p = rpmtsiNext(pi, TR_ADDED)) != NULL) {
        rpmds provides;
 
-/*@-nullpass@*/        /* FIX: rpmts{A,O} can return null. */
+       /* FIX: rpmts{A,O} can return null. */
        rpmMessage(RPMMESS_DEBUG, "========== +++ %s %s/%s 0x%x\n",
                rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
-/*@=nullpass@*/
        rc = checkPackageDeps(ts, rpmteNEVRA(p),
                        rpmteDS(p, RPMTAG_REQUIRENAME),
                        rpmteDS(p, RPMTAG_CONFLICTNAME),
@@ -1720,13 +1587,13 @@ int rpmtsCheck(rpmts ts)
            const char * Name;
 
            if ((Name = rpmdsN(provides)) == NULL)
-               /*@innercontinue@*/ continue;   /* XXX can't happen */
+               continue;       /* XXX can't happen */
 
            /* Adding: check provides key against conflicts matches. */
            if (!checkDependentConflicts(ts, Name))
-               /*@innercontinue@*/ continue;
+               continue;
            rc = 1;
-           /*@innerbreak@*/ break;
+           break;
        }
        if (rc)
            goto exit;
@@ -1741,10 +1608,9 @@ int rpmtsCheck(rpmts ts)
        rpmds provides;
        rpmfi fi;
 
-/*@-nullpass@*/        /* FIX: rpmts{A,O} can return null. */
+       /* FIX: rpmts{A,O} can return null. */
        rpmMessage(RPMMESS_DEBUG, "========== --- %s %s/%s 0x%x\n",
                rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
-/*@=nullpass@*/
 
 #if defined(DYING)
        /* XXX all packages now have Provides: name = version-release */
@@ -1762,13 +1628,13 @@ int rpmtsCheck(rpmts ts)
            const char * Name;
 
            if ((Name = rpmdsN(provides)) == NULL)
-               /*@innercontinue@*/ continue;   /* XXX can't happen */
+               continue;       /* XXX can't happen */
 
            /* Erasing: check provides against requiredby matches. */
            if (!checkDependentPackages(ts, Name))
-               /*@innercontinue@*/ continue;
+               continue;
            rc = 1;
-           /*@innerbreak@*/ break;
+           break;
        }
        if (rc)
            goto exit;
@@ -1781,9 +1647,9 @@ int rpmtsCheck(rpmts ts)
 
            /* Erasing: check filename against requiredby matches. */
            if (!checkDependentPackages(ts, fn))
-               /*@innercontinue@*/ continue;
+               continue;
            rc = 1;
-           /*@innerbreak@*/ break;
+           break;
        }
        if (rc)
            goto exit;
@@ -1798,11 +1664,9 @@ exit:
 
     (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_CHECK), 0);
 
-    /*@-branchstate@*/
     if (closeatexit)
        xx = rpmtsCloseDB(ts);
     else if (_cacheDependsRC)
        xx = rpmdbCloseDBI(rpmtsGetRdb(ts), RPMDBI_DEPENDS);
-    /*@=branchstate@*/
     return rc;
 }
index afd0728..a9cac2c 100644 (file)
@@ -15,8 +15,6 @@
 
 #include "debug.h"
 
-/*@access pgpDig @*/
-/*@access pgpDigParams @*/
 
 /**
  * Identify type of trigger.
  * @param element      (unused)
  * @return             formatted string
  */
-static /*@only@*/ char * triggertypeFormat(int_32 type, const void * data, 
-               /*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
-               /*@unused@*/ int element)
-       /*@requires maxRead(data) >= 0 @*/
+static char * triggertypeFormat(int_32 type, const void * data, 
+               char * formatPrefix, int padding,
+               int element)
 {
     const int_32 * item = data;
     char * val;
@@ -59,10 +56,8 @@ static /*@only@*/ char * triggertypeFormat(int_32 type, const void * data,
  * @param element      (unused)
  * @return             formatted string
  */
-static /*@only@*/ char * permsFormat(int_32 type, const void * data,
-               char * formatPrefix, int padding, /*@unused@*/ int element)
-       /*@modifies formatPrefix @*/
-       /*@requires maxRead(data) >= 0 @*/
+static char * permsFormat(int_32 type, const void * data,
+               char * formatPrefix, int padding, int element)
 {
     char * val;
     char * buf;
@@ -71,13 +66,9 @@ static /*@only@*/ char * permsFormat(int_32 type, const void * data,
        val = xstrdup(_("(not a number)"));
     } else {
        val = xmalloc(15 + padding);
-/*@-boundswrite@*/
        strcat(formatPrefix, "s");
-/*@=boundswrite@*/
        buf = rpmPermsString(*((int_32 *) data));
-       /*@-formatconst@*/
        sprintf(val, formatPrefix, buf);
-       /*@=formatconst@*/
        buf = _free(buf);
     }
 
@@ -93,10 +84,8 @@ static /*@only@*/ char * permsFormat(int_32 type, const void * data,
  * @param element      (unused)
  * @return             formatted string
  */
-static /*@only@*/ char * fflagsFormat(int_32 type, const void * data, 
-               char * formatPrefix, int padding, /*@unused@*/ int element)
-       /*@modifies formatPrefix @*/
-       /*@requires maxRead(data) >= 0 @*/
+static char * fflagsFormat(int_32 type, const void * data, 
+               char * formatPrefix, int padding, int element)
 {
     char * val;
     char buf[15];
@@ -106,7 +95,6 @@ static /*@only@*/ char * fflagsFormat(int_32 type, const void * data,
        val = xstrdup(_("(not a number)"));
     } else {
        buf[0] = '\0';
-/*@-boundswrite@*/
        if (anint & RPMFILE_DOC)
            strcat(buf, "d");
        if (anint & RPMFILE_CONFIG)
@@ -123,15 +111,10 @@ static /*@only@*/ char * fflagsFormat(int_32 type, const void * data,
            strcat(buf, "l");
        if (anint & RPMFILE_README)
            strcat(buf, "r");
-/*@=boundswrite@*/
 
        val = xmalloc(5 + padding);
-/*@-boundswrite@*/
        strcat(formatPrefix, "s");
-/*@=boundswrite@*/
-       /*@-formatconst@*/
        sprintf(val, formatPrefix, buf);
-       /*@=formatconst@*/
     }
 
     return val;
@@ -147,10 +130,9 @@ static /*@only@*/ char * fflagsFormat(int_32 type, const void * data,
  * @param element      no. bytes of binary data
  * @return             formatted string
  */
-static /*@only@*/ char * armorFormat(int_32 type, const void * data, 
-               /*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
+static char * armorFormat(int_32 type, const void * data, 
+               char * formatPrefix, int padding,
                int element)
-       /*@*/
 {
     const char * enc;
     const unsigned char * s;
@@ -179,7 +161,7 @@ static /*@only@*/ char * armorFormat(int_32 type, const void * data,
     case RPM_I18NSTRING_TYPE:
     default:
        return xstrdup(_("(invalid type)"));
-       /*@notreached@*/ break;
+       break;
     }
 
     /* XXX this doesn't use padding directly, assumes enough slop in retval. */
@@ -196,9 +178,8 @@ static /*@only@*/ char * armorFormat(int_32 type, const void * data,
  * @param element
  * @return             formatted string
  */
-static /*@only@*/ char * base64Format(int_32 type, const void * data, 
-               /*@unused@*/ char * formatPrefix, int padding, int element)
-       /*@*/
+static char * base64Format(int_32 type, const void * data, 
+               char * formatPrefix, int padding, int element)
 {
     char * val;
 
@@ -212,8 +193,6 @@ static /*@only@*/ char * base64Format(int_32 type, const void * data,
        size_t ns = element;
        size_t nt = ((ns + 2) / 3) * 4;
 
-/*@-boundswrite@*/
-       /*@-globs@*/
        /* Add additional bytes necessary for eol string(s). */
        if (b64encode_chars_per_line > 0 && b64encode_eolstr != NULL) {
            lc = (nt + b64encode_chars_per_line - 1) / b64encode_chars_per_line;
@@ -221,7 +200,6 @@ static /*@only@*/ char * base64Format(int_32 type, const void * data,
             ++lc;
            nt += lc * strlen(b64encode_eolstr);
        }
-       /*@=globs@*/
 
        val = t = xmalloc(nt + padding + 1);
 
@@ -230,7 +208,6 @@ static /*@only@*/ char * base64Format(int_32 type, const void * data,
            t = stpcpy(t, enc);
            enc = _free(enc);
        }
-/*@=boundswrite@*/
     }
 
     return val;
@@ -239,19 +216,16 @@ static /*@only@*/ char * base64Format(int_32 type, const void * data,
 /**
  */
 static size_t xmlstrlen(const char * s)
-       /*@*/
 {
     size_t len = 0;
     int c;
 
-/*@-boundsread@*/
     while ((c = *s++) != '\0')
-/*@=boundsread@*/
     {
        switch (c) {
-       case '<': case '>':     len += 4;       /*@switchbreak@*/ break;
-       case '&':               len += 5;       /*@switchbreak@*/ break;
-       default:                len += 1;       /*@switchbreak@*/ break;
+       case '<': case '>':     len += 4;       break;
+       case '&':               len += 5;       break;
+       default:                len += 1;       break;
        }
     }
     return len;
@@ -259,23 +233,20 @@ static size_t xmlstrlen(const char * s)
 
 /**
  */
-static char * xmlstrcpy(/*@returned@*/ char * t, const char * s)
-       /*@modifies t @*/
+static char * xmlstrcpy(char * t, const char * s)
 {
     char * te = t;
     int c;
 
-/*@-bounds@*/
     while ((c = *s++) != '\0') {
        switch (c) {
-       case '<':       te = stpcpy(te, "&lt;");        /*@switchbreak@*/ break;
-       case '>':       te = stpcpy(te, "&gt;");        /*@switchbreak@*/ break;
-       case '&':       te = stpcpy(te, "&amp;");       /*@switchbreak@*/ break;
-       default:        *te++ = c;                      /*@switchbreak@*/ break;
+       case '<':       te = stpcpy(te, "&lt;");        break;
+       case '>':       te = stpcpy(te, "&gt;");        break;
+       case '&':       te = stpcpy(te, "&amp;");       break;
+       default:        *te++ = c;                      break;
        }
     }
     *te = '\0';
-/*@=bounds@*/
     return t;
 }
 
@@ -288,11 +259,9 @@ static char * xmlstrcpy(/*@returned@*/ char * t, const char * s)
  * @param element      (unused)
  * @return             formatted string
  */
-/*@-bounds@*/
-static /*@only@*/ char * xmlFormat(int_32 type, const void * data, 
+static char * xmlFormat(int_32 type, const void * data, 
                char * formatPrefix, int padding,
-               /*@unused@*/ int element)
-       /*@modifies formatPrefix @*/
+               int element)
 {
     const char * xtag = NULL;
     size_t nb;
@@ -302,7 +271,6 @@ static /*@only@*/ char * xmlFormat(int_32 type, const void * data,
     unsigned long anint = 0;
     int xx;
 
-/*@-branchstate@*/
     switch (type) {
     case RPM_I18NSTRING_TYPE:
     case RPM_STRING_TYPE:
@@ -311,15 +279,9 @@ static /*@only@*/ char * xmlFormat(int_32 type, const void * data,
        break;
     case RPM_BIN_TYPE:
     {  int cpl = b64encode_chars_per_line;
-/*@-mods@*/
        b64encode_chars_per_line = 0;
-/*@=mods@*/
-/*@-formatconst@*/
        s = base64Format(type, data, formatPrefix, padding, element);
-/*@=formatconst@*/
-/*@-mods@*/
        b64encode_chars_per_line = cpl;
-/*@=mods@*/
        xtag = "base64";
     }  break;
     case RPM_CHAR_TYPE:
@@ -336,11 +298,9 @@ static /*@only@*/ char * xmlFormat(int_32 type, const void * data,
     case RPM_STRING_ARRAY_TYPE:
     default:
        return xstrdup(_("(invalid xml type)"));
-       /*@notreached@*/ break;
+       break;
     }
-/*@=branchstate@*/
 
-/*@-branchstate@*/
     if (s == NULL) {
        int tlen = 32;
        t = memset(alloca(tlen+1), 0, tlen+1);
@@ -349,7 +309,6 @@ static /*@only@*/ char * xmlFormat(int_32 type, const void * data,
        s = t;
        xtag = "integer";
     }
-/*@=branchstate@*/
 
     nb = xmlstrlen(s);
     if (nb == 0) {
@@ -366,24 +325,17 @@ static /*@only@*/ char * xmlFormat(int_32 type, const void * data,
     }
 
     /* XXX s was malloc'd */
-/*@-branchstate@*/
     if (!strcmp(xtag, "base64"))
        s = _free(s);
-/*@=branchstate@*/
 
     nb += padding;
     val = xmalloc(nb+1);
-/*@-boundswrite@*/
     strcat(formatPrefix, "s");
-/*@=boundswrite@*/
-/*@-formatconst@*/
     xx = snprintf(val, nb, formatPrefix, t);
-/*@=formatconst@*/
     val[nb] = '\0';
 
     return val;
 }
-/*@=bounds@*/
 
 /**
  * Display signature fingerprint and time.
@@ -394,11 +346,9 @@ static /*@only@*/ char * xmlFormat(int_32 type, const void * data,
  * @param element      (unused)
  * @return             formatted string
  */
-static /*@only@*/ char * pgpsigFormat(int_32 type, const void * data, 
-               /*@unused@*/ char * formatPrefix, /*@unused@*/ int padding,
-               /*@unused@*/ int element)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies fileSystem, internalState @*/
+static char * pgpsigFormat(int_32 type, const void * data, 
+               char * formatPrefix, int padding,
+               int element)
 {
     char * val, * t;
 
@@ -407,9 +357,7 @@ static /*@only@*/ char * pgpsigFormat(int_32 type, const void * data,
     } else {
        unsigned char * pkt = (byte *) data;
        unsigned int pktlen = 0;
-/*@-boundsread@*/
        unsigned int v = *pkt;
-/*@=boundsread@*/
        pgpTag tag = 0;
        unsigned int plen;
        unsigned int hlen = 0;
@@ -442,7 +390,6 @@ static /*@only@*/ char * pgpsigFormat(int_32 type, const void * data,
            nb += 100;
            val = t = xrealloc(val, nb + 1);
 
-/*@-boundswrite@*/
            switch (sigp->pubkey_algo) {
            case PGPPUBKEYALGO_DSA:
                t = stpcpy(t, "DSA");
@@ -489,7 +436,6 @@ static /*@only@*/ char * pgpsigFormat(int_32 type, const void * data,
            if (t + strlen (tempstr) > val + nb)
                goto again;
            t = stpcpy(t, tempstr);
-/*@=boundswrite@*/
 
            dig = pgpFreeDig(dig);
        }
@@ -507,10 +453,8 @@ static /*@only@*/ char * pgpsigFormat(int_32 type, const void * data,
  * @param element      (unused)
  * @return             formatted string
  */
-static /*@only@*/ char * depflagsFormat(int_32 type, const void * data, 
-               char * formatPrefix, int padding, /*@unused@*/ int element)
-       /*@modifies formatPrefix @*/
-       /*@requires maxRead(data) >= 0 @*/
+static char * depflagsFormat(int_32 type, const void * data, 
+               char * formatPrefix, int padding, int element)
 {
     char * val;
     char buf[10];
@@ -522,22 +466,16 @@ static /*@only@*/ char * depflagsFormat(int_32 type, const void * data,
        anint = *((int_32 *) data);
        buf[0] = '\0';
 
-/*@-boundswrite@*/
        if (anint & RPMSENSE_LESS) 
            strcat(buf, "<");
        if (anint & RPMSENSE_GREATER)
            strcat(buf, ">");
        if (anint & RPMSENSE_EQUAL)
            strcat(buf, "=");
-/*@=boundswrite@*/
 
        val = xmalloc(5 + padding);
-/*@-boundswrite@*/
        strcat(formatPrefix, "s");
-/*@=boundswrite@*/
-       /*@-formatconst@*/
        sprintf(val, formatPrefix, buf);
-       /*@=formatconst@*/
     }
 
     return val;
@@ -552,21 +490,14 @@ static /*@only@*/ char * depflagsFormat(int_32 type, const void * data,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int fsnamesTag( /*@unused@*/ Header h, /*@out@*/ int_32 * type,
-               /*@out@*/ void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies *type, *data, *count, *freeData,
-               fileSystem, internalState @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int fsnamesTag( Header h, int_32 * type,
+               void ** data, int_32 * count,
+               int * freeData)
 {
     const char ** list;
 
-/*@-boundswrite@*/
     if (rpmGetFilesystemList(&list, count))
        return 1;
-/*@=boundswrite@*/
 
     if (type) *type = RPM_STRING_ARRAY_TYPE;
     if (data) *((const char ***) data) = list;
@@ -584,13 +515,10 @@ static int fsnamesTag( /*@unused@*/ Header h, /*@out@*/ int_32 * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int instprefixTag(Header h, /*@null@*/ /*@out@*/ rpmTagType * type,
-               /*@null@*/ /*@out@*/ const void ** data,
-               /*@null@*/ /*@out@*/ int_32 * count,
-               /*@null@*/ /*@out@*/ int * freeData)
-       /*@modifies *type, *data, *freeData @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int instprefixTag(Header h, rpmTagType * type,
+               const void ** data,
+               int_32 * count,
+               int * freeData)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     HFD_t hfd = headerFreeData;
@@ -602,9 +530,7 @@ static int instprefixTag(Header h, /*@null@*/ /*@out@*/ rpmTagType * type,
        return 0;
     } else if (hge(h, RPMTAG_INSTPREFIXES, &ipt, (void **) &array, count)) {
        if (type) *type = RPM_STRING_TYPE;
-/*@-boundsread@*/
        if (data) *data = xstrdup(array[0]);
-/*@=boundsread@*/
        if (freeData) *freeData = 1;
        array = hfd(array, ipt);
        return 0;
@@ -622,15 +548,9 @@ static int instprefixTag(Header h, /*@null@*/ /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int fssizesTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int fssizesTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     const char ** filenames;
@@ -646,10 +566,8 @@ static int fssizesTag(Header h, /*@out@*/ rpmTagType * type,
        rpmfiBuildFNames(h, RPMTAG_BASENAMES, &filenames, &numFiles);
     }
 
-/*@-boundswrite@*/
     if (rpmGetFilesystemList(NULL, count))
        return 1;
-/*@=boundswrite@*/
 
     *type = RPM_INT32_TYPE;
     *freeData = 1;
@@ -661,10 +579,8 @@ static int fssizesTag(Header h, /*@out@*/ rpmTagType * type,
        return 0;
     }
 
-/*@-boundswrite@*/
     if (rpmGetFilesystemUsage(filenames, filesizes, numFiles, &usages, 0))     
        return 1;
-/*@=boundswrite@*/
 
     *data = usages;
 
@@ -682,12 +598,9 @@ static int fssizesTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int triggercondsTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@modifies *type, *data, *count, *freeData @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int triggercondsTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     HFD_t hfd = headerFreeData;
@@ -716,13 +629,12 @@ static int triggercondsTag(Header h, /*@out@*/ rpmTagType * type,
     *data = conds = xmalloc(sizeof(*conds) * numScripts);
     *count = numScripts;
     *type = RPM_STRING_ARRAY_TYPE;
-/*@-bounds@*/
     for (i = 0; i < numScripts; i++) {
        chptr = xstrdup("");
 
        for (j = 0; j < numNames; j++) {
            if (indices[j] != i)
-               /*@innercontinue@*/ continue;
+               continue;
 
            item = xmalloc(strlen(names[j]) + strlen(versions[j]) + 20);
            if (flags[j] & RPMSENSE_SENSEMASK) {
@@ -742,7 +654,6 @@ static int triggercondsTag(Header h, /*@out@*/ rpmTagType * type,
 
        conds[i] = chptr;
     }
-/*@=bounds@*/
 
     names = hfd(names, tnt);
     versions = hfd(versions, tvt);
@@ -759,12 +670,9 @@ static int triggercondsTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int triggertypeTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@modifies *type, *data, *count, *freeData @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int triggertypeTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     HFD_t hfd = headerFreeData;
@@ -788,11 +696,10 @@ static int triggertypeTag(Header h, /*@out@*/ rpmTagType * type,
     *data = conds = xmalloc(sizeof(*conds) * numScripts);
     *count = numScripts;
     *type = RPM_STRING_ARRAY_TYPE;
-/*@-bounds@*/
     for (i = 0; i < numScripts; i++) {
        for (j = 0; j < numNames; j++) {
            if (indices[j] != i)
-               /*@innercontinue@*/ continue;
+               continue;
 
            if (flags[j] & RPMSENSE_TRIGGERPREIN)
                conds[i] = xstrdup("prein");
@@ -804,10 +711,9 @@ static int triggertypeTag(Header h, /*@out@*/ rpmTagType * type,
                conds[i] = xstrdup("postun");
            else
                conds[i] = xstrdup("");
-           /*@innerbreak@*/ break;
+           break;
        }
     }
-/*@=bounds@*/
 
     return 0;
 }
@@ -821,12 +727,9 @@ static int triggertypeTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int filenamesTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@modifies *type, *data, *count, *freeData @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int filenamesTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     *type = RPM_STRING_ARRAY_TYPE;
     rpmfiBuildFNames(h, RPMTAG_BASENAMES, (const char ***) data, count);
@@ -843,14 +746,9 @@ static int filenamesTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int fileclassTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
-       /*@modifies h, *type, *data, *count, *freeData,
-               rpmGlobalMacroContext, fileSystem @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int fileclassTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     *type = RPM_STRING_ARRAY_TYPE;
     rpmfiBuildFClasses(h, (const char ***) data, count);
@@ -867,14 +765,9 @@ static int fileclassTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int fileprovideTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies h, *type, *data, *count, *freeData,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int fileprovideTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     *type = RPM_STRING_ARRAY_TYPE;
     rpmfiBuildFDeps(h, RPMTAG_PROVIDENAME, (const char ***) data, count);
@@ -891,14 +784,9 @@ static int fileprovideTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int filerequireTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies h, *type, *data, *count, *freeData,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int filerequireTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     *type = RPM_STRING_ARRAY_TYPE;
     rpmfiBuildFDeps(h, RPMTAG_REQUIRENAME, (const char ***) data, count);
@@ -909,15 +797,10 @@ static int filerequireTag(Header h, /*@out@*/ rpmTagType * type,
 /* I18N look aside diversions */
 
 #if defined(ENABLE_NLS)
-/*@-exportlocal -exportheadervar@*/
-/*@unchecked@*/
 extern int _nl_msg_cat_cntr;   /* XXX GNU gettext voodoo */
-/*@=exportlocal =exportheadervar@*/
 #endif
-/*@observer@*/ /*@unchecked@*/
 static const char * language = "LANGUAGE";
 
-/*@observer@*/ /*@unchecked@*/
 static const char * _macro_i18ndomains = "%{?_i18ndomains}";
 
 /**
@@ -930,13 +813,9 @@ static const char * _macro_i18ndomains = "%{?_i18ndomains}";
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno @*/
-       /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int i18nTag(Header h, int_32 tag, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
     char * dstring = rpmExpand(_macro_i18ndomains, NULL);
@@ -970,18 +849,16 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type,
        langval = getenv(language);
        (void) setenv(language, "en_US", 1);
 #if defined(ENABLE_NLS)
-/*@i@*/        ++_nl_msg_cat_cntr;
+        ++_nl_msg_cat_cntr;
 #endif
 
        msgid = NULL;
-       /*@-branchstate@*/
        for (domain = dstring; domain != NULL; domain = de) {
            de = strchr(domain, ':');
            if (de) *de++ = '\0';
-           msgid = /*@-unrecog@*/ dgettext(domain, msgkey) /*@=unrecog@*/;
+           msgid = dgettext(domain, msgkey);
            if (msgid != msgkey) break;
        }
-       /*@=branchstate@*/
 
        /* restore previous environment for msgid -> msgstr resolution */
        if (langval)
@@ -989,11 +866,11 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type,
        else
            unsetenv(language);
 #if defined(ENABLE_NLS)
-/*@i@*/        ++_nl_msg_cat_cntr;
+        ++_nl_msg_cat_cntr;
 #endif
 
        if (domain && msgid) {
-           *data = /*@-unrecog@*/ dgettext(domain, msgid) /*@=unrecog@*/;
+           *data = dgettext(domain, msgid);
            *data = xstrdup(*data);     /* XXX xstrdup has side effects. */
            *count = 1;
            *freeData = 1;
@@ -1028,13 +905,9 @@ static int i18nTag(Header h, int_32 tag, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int summaryTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno @*/
-       /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int summaryTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     return i18nTag(h, RPMTAG_SUMMARY, type, data, count, freeData);
 }
@@ -1048,13 +921,9 @@ static int summaryTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int descriptionTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno @*/
-       /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int descriptionTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     return i18nTag(h, RPMTAG_DESCRIPTION, type, data, count, freeData);
 }
@@ -1068,18 +937,14 @@ static int descriptionTag(Header h, /*@out@*/ rpmTagType * type,
  * @retval *freeData   data-was-malloc'ed indicator
  * @return             0 on success
  */
-static int groupTag(Header h, /*@out@*/ rpmTagType * type,
-               /*@out@*/ const void ** data, /*@out@*/ int_32 * count,
-               /*@out@*/ int * freeData)
-       /*@globals rpmGlobalMacroContext, h_errno @*/
-       /*@modifies *type, *data, *count, *freeData, rpmGlobalMacroContext @*/
-       /*@requires maxSet(type) >= 0 /\ maxSet(data) >= 0
-               /\ maxSet(count) >= 0 /\ maxSet(freeData) >= 0 @*/
+static int groupTag(Header h, rpmTagType * type,
+               const void ** data, int_32 * count,
+               int * freeData)
 {
     return i18nTag(h, RPMTAG_GROUP, type, data, count, freeData);
 }
 
-/*@-type@*/ /* FIX: cast? */
+/* FIX: cast? */
 const struct headerSprintfExtension_s rpmHeaderFormats[] = {
     { HEADER_EXT_TAG, "RPMTAG_GROUP",          { groupTag } },
     { HEADER_EXT_TAG, "RPMTAG_DESCRIPTION",    { descriptionTag } },
@@ -1104,4 +969,3 @@ const struct headerSprintfExtension_s rpmHeaderFormats[] = {
     { HEADER_EXT_FORMAT, "xml",                        { xmlFormat } },
     { HEADER_EXT_MORE, NULL,           { (void *) headerDefaultFormats } }
 } ;
-/*@=type@*/
index 64fc4e0..55f9ca3 100644 (file)
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -7,35 +7,24 @@
 #include <rpmmacro.h>  /* XXX for rpmGetPath */
 #include "debug.h"
 
-/*@-usereleased -onlytrans@*/
 
 struct fsinfo {
-/*@only@*/ /*@relnull@*/
     const char * mntPoint;     /*!< path to mount point. */
     dev_t dev;                 /*!< devno for mount point. */
     int rdonly;                        /*!< is mount point read only? */
 };
 
-/*@unchecked@*/
-/*@only@*/ /*@null@*/
 static struct fsinfo * filesystems = NULL;
-/*@unchecked@*/
-/*@only@*/ /*@null@*/
 static const char ** fsnames = NULL;
-/*@unchecked@*/
 static int numFilesystems = 0;
 
 void freeFilesystems(void)
-       /*@globals filesystems, fsnames, numFilesystems @*/
-       /*@modifies filesystems, fsnames, numFilesystems @*/
 {
     int i;
 
-/*@-boundswrite@*/
     if (filesystems)
     for (i = 0; i < numFilesystems; i++)
        filesystems[i].mntPoint = _free(filesystems[i].mntPoint);
-/*@=boundswrite@*/
 
     filesystems = _free(filesystems);
     fsnames = _free(fsnames);
@@ -61,7 +50,6 @@ int mntctl(int command, int size, char *buffer);
  * @return             0 on success, 1 on error
  */
 static int getFilesystemList(void)
-       /*@*/
 {
     int size;
     void * buf;
@@ -143,10 +131,6 @@ static int getFilesystemList(void)
  * @return             0 on success, 1 on error
  */
 static int getFilesystemList(void)
-       /*@globals filesystems, fsnames, numFilesystems,
-               fileSystem, internalState @*/
-       /*@modifies filesystems, fsnames, numFilesystems,
-               fileSystem, internalState @*/
 {
     int numAlloced = 10;
     struct stat sb;
@@ -187,20 +171,14 @@ static int getFilesystemList(void)
     while (1) {
 #      if GETMNTENT_ONE
            /* this is Linux */
-           /*@-modunconnomods -moduncon @*/
            our_mntent * itemptr = getmntent(mtab);
            if (!itemptr) break;
-/*@-boundsread@*/
            item = *itemptr;    /* structure assignment */
-/*@=boundsread@*/
            mntdir = item.our_mntdir;
 #if defined(MNTOPT_RO)
-           /*@-compdef@*/
            if (hasmntopt(itemptr, MNTOPT_RO) != NULL)
                rdonly = 1;
-           /*@=compdef@*/
 #endif
-           /*@=modunconnomods =moduncon @*/
 #      elif GETMNTENT_TWO
            /* Solaris, maybe others */
            if (getmntent(mtab, &item)) break;
@@ -252,16 +230,13 @@ static int getFilesystemList(void)
     filesystems[numFilesystems].mntPoint = NULL;
     filesystems[numFilesystems].rdonly = 0;
 
-/*@-boundswrite@*/
     fsnames = xcalloc((numFilesystems + 1), sizeof(*fsnames));
     for (i = 0; i < numFilesystems; i++)
        fsnames[i] = filesystems[i].mntPoint;
     fsnames[numFilesystems] = NULL;
-/*@=boundswrite@*/
 
-/*@-nullstate@*/ /* FIX: fsnames[] may be NULL */
+/* FIX: fsnames[] may be NULL */
     return 0; 
-/*@=nullstate@*/
 }
 #endif /* HAVE_MNTCTL */
 
@@ -271,16 +246,14 @@ int rpmGetFilesystemList(const char *** listptr, int * num)
        if (getFilesystemList())
            return 1;
 
-/*@-boundswrite@*/
     if (listptr) *listptr = fsnames;
     if (num) *num = numFilesystems;
-/*@=boundswrite@*/
 
     return 0;
 }
 
 int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles,
-                         uint_32 ** usagesPtr, /*@unused@*/ int flags)
+                         uint_32 ** usagesPtr, int flags)
 {
     uint_32 * usages;
     int i, len, j;
@@ -302,14 +275,11 @@ int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles
     sourceDir = rpmGetPath("%{_sourcedir}", NULL);
 
     maxLen = strlen(sourceDir);
-/*@-boundsread@*/
     for (i = 0; i < numFiles; i++) {
        len = strlen(fileList[i]);
        if (maxLen < len) maxLen = len;
     }
-/*@=boundsread@*/
     
-/*@-boundswrite@*/
     buf = alloca(maxLen + 1);
     lastDir = alloca(maxLen + 1);
     dirName = alloca(maxLen + 1);
@@ -354,7 +324,7 @@ int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles
            if (lastDev != sb.st_dev) {
                for (j = 0; j < numFilesystems; j++)
                    if (filesystems && filesystems[j].dev == sb.st_dev)
-                       /*@innerbreak@*/ break;
+                       break;
 
                if (j == numFilesystems) {
                    rpmError(RPMERR_BADDEV, 
@@ -372,19 +342,13 @@ int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes, int numFiles
        strcpy(lastDir, buf);
        usages[lastfs] += fssizes[i];
     }
-/*@=boundswrite@*/
 
     sourceDir = _free(sourceDir);
 
-/*@-boundswrite@*/
-    /*@-branchstate@*/
     if (usagesPtr)
        *usagesPtr = usages;
     else
        usages = _free(usages);
-    /*@=branchstate@*/
-/*@=boundswrite@*/
 
     return 0;
 }
-/*@=usereleased =onlytrans@*/
index 699b9c2..b51973a 100644 (file)
--- a/lib/fsm.c
+++ b/lib/fsm.c
 
 #include "debug.h"
 
-/*@access FD_t @*/     /* XXX void ptr args */
-/*@access FSMI_t @*/
-/*@access FSM_t @*/
-
-/*@access rpmfi @*/
-
 #define        alloca_strdup(_s)       strcpy(alloca(strlen(_s)+1), (_s))
 
 #define        _FSM_DEBUG      0
-/*@unchecked@*/
 int _fsm_debug = _FSM_DEBUG;
 
-/*@-exportheadervar@*/
-/*@unchecked@*/
 int _fsm_threads = 0;
-/*@=exportheadervar@*/
 
 /* XXX Failure to remove is not (yet) cause for failure. */
-/*@-exportlocal -exportheadervar@*/
-/*@unchecked@*/
 int strict_erasures = 0;
-/*@=exportlocal =exportheadervar@*/
 
 rpmts fsmGetTs(const FSM_t fsm) {
     const FSMI_t iter = fsm->iter;
-    /*@-compdef -refcounttrans -retexpose -usereleased @*/
     return (iter ? iter->ts : NULL);
-    /*@=compdef =refcounttrans =retexpose =usereleased @*/
 }
 
 rpmfi fsmGetFi(const FSM_t fsm)
 {
     const FSMI_t iter = fsm->iter;
-    /*@-compdef -refcounttrans -retexpose -usereleased @*/
     return (iter ? iter->fi : NULL);
-    /*@=compdef =refcounttrans =retexpose =usereleased @*/
 }
 
 #define        SUFFIX_RPMORIG  ".rpmorig"
@@ -75,13 +58,11 @@ rpmfi fsmGetFi(const FSM_t fsm)
  * @param suffix       suffix to use (NULL disables)
  * @retval             path to file
  */
-static /*@only@*//*@null@*/
-const char * fsmFsPath(/*@special@*/ /*@null@*/ const FSM_t fsm,
-               /*@null@*/ const struct stat * st,
-               /*@null@*/ const char * subdir,
-               /*@null@*/ const char * suffix)
-       /*@uses fsm->dirName, fsm->baseName */
-       /*@*/
+static
+const char * fsmFsPath(const FSM_t fsm,
+               const struct stat * st,
+               const char * subdir,
+               const char * suffix)
 {
     const char * s = NULL;
 
@@ -92,7 +73,6 @@ const char * fsmFsPath(/*@special@*/ /*@null@*/ const FSM_t fsm,
            (st && !S_ISDIR(st->st_mode) ? (subdir ? strlen(subdir) : 0) : 0) +
            (st && !S_ISDIR(st->st_mode) ? (suffix ? strlen(suffix) : 0) : 0) +
            strlen(fsm->baseName) + 1;
-/*@-boundswrite@*/
        s = t = xmalloc(nb);
        t = stpcpy(t, fsm->dirName);
        if (st && !S_ISDIR(st->st_mode))
@@ -100,7 +80,6 @@ const char * fsmFsPath(/*@special@*/ /*@null@*/ const FSM_t fsm,
        t = stpcpy(t, fsm->baseName);
        if (st && !S_ISDIR(st->st_mode))
            if (suffix) t = stpcpy(t, suffix);
-/*@=boundswrite@*/
     }
     return s;
 }
@@ -110,15 +89,12 @@ const char * fsmFsPath(/*@special@*/ /*@null@*/ const FSM_t fsm,
  * @param p            file info iterator
  * @retval             NULL always
  */
-static /*@null@*/ void * mapFreeIterator(/*@only@*//*@null@*/ void * p)
-       /*@globals fileSystem @*/
-       /*@modifies fileSystem @*/
+static void * mapFreeIterator(void * p)
 {
     FSMI_t iter = p;
     if (iter) {
-/*@-internalglobs@*/ /* XXX rpmswExit() */
+/* XXX rpmswExit() */
        iter->ts = rpmtsFree(iter->ts);
-/*@=internalglobs@*/
        iter->fi = rpmfiUnlink(iter->fi, "mapIterator");
     }
     return _free(p);
@@ -132,7 +108,6 @@ static /*@null@*/ void * mapFreeIterator(/*@only@*//*@null@*/ void * p)
  */
 static void *
 mapInitIterator(rpmts ts, rpmfi fi)
-       /*@modifies ts, fi @*/
 {
     FSMI_t iter = NULL;
 
@@ -150,8 +125,7 @@ mapInitIterator(rpmts ts, rpmfi fi)
  * @param a            file info iterator
  * @return             next index, -1 on termination
  */
-static int mapNextIterator(/*@null@*/ void * a)
-       /*@*/
+static int mapNextIterator(void * a)
 {
     FSMI_t iter = a;
     int i = -1;
@@ -170,9 +144,7 @@ static int mapNextIterator(/*@null@*/ void * a)
 
 /** \ingroup payload
  */
-/*@-boundsread@*/
 static int cpioStrCmp(const void * a, const void * b)
-       /*@*/
 {
     const char * afn = *(const char **)a;
     const char * bfn = *(const char **)b;
@@ -193,7 +165,6 @@ static int cpioStrCmp(const void * a, const void * b)
 
     return strcmp(afn, bfn);
 }
-/*@=boundsread@*/
 
 /** \ingroup payload
  * Locate archive path in file info.
@@ -201,9 +172,7 @@ static int cpioStrCmp(const void * a, const void * b)
  * @param fsmPath      archive path
  * @return             index into file info, -1 if archive path was not found
  */
-/*@-boundsread@*/
-static int mapFind(/*@null@*/ FSMI_t iter, const char * fsmPath)
-       /*@modifies iter @*/
+static int mapFind(FSMI_t iter, const char * fsmPath)
 {
     int ix = -1;
 
@@ -212,11 +181,9 @@ static int mapFind(/*@null@*/ FSMI_t iter, const char * fsmPath)
        if (fi && fi->fc > 0 && fi->apath && fsmPath && *fsmPath) {
            const char ** p = NULL;
 
-/*@-boundswrite@*/
            if (fi->apath != NULL)
                p = bsearch(&fsmPath, fi->apath, fi->fc, sizeof(fsmPath),
                        cpioStrCmp);
-/*@=boundswrite@*/
            if (p) {
                iter->i = p - fi->apath;
                ix = mapNextIterator(iter);
@@ -225,14 +192,12 @@ static int mapFind(/*@null@*/ FSMI_t iter, const char * fsmPath)
     }
     return ix;
 }
-/*@=boundsread@*/
 
 /** \ingroup payload
  * Directory name iterator.
  */
 typedef struct dnli_s {
     rpmfi fi;
-/*@only@*/ /*@null@*/
     char * active;
     int reverse;
     int isave;
@@ -244,8 +209,7 @@ typedef struct dnli_s {
  * @param a            directory name iterator
  * @retval             NULL always
  */
-static /*@null@*/ void * dnlFreeIterator(/*@only@*//*@null@*/ const void * a)
-       /*@modifies a @*/
+static void * dnlFreeIterator(const void * a)
 {
     if (a) {
        DNLI_t dnli = (void *)a;
@@ -256,16 +220,14 @@ static /*@null@*/ void * dnlFreeIterator(/*@only@*//*@null@*/ const void * a)
 
 /** \ingroup payload
  */
-static inline int dnlCount(/*@null@*/ const DNLI_t dnli)
-       /*@*/
+static inline int dnlCount(const DNLI_t dnli)
 {
     return (dnli ? dnli->fi->dc : 0);
 }
 
 /** \ingroup payload
  */
-static inline int dnlIndex(/*@null@*/ const DNLI_t dnli)
-       /*@*/
+static inline int dnlIndex(const DNLI_t dnli)
 {
     return (dnli ? dnli->isave : -1);
 }
@@ -276,13 +238,10 @@ static inline int dnlIndex(/*@null@*/ const DNLI_t dnli)
  * @param reverse      traverse directory names in reverse order?
  * @return             directory name iterator
  */
-/*@-boundsread@*/
-/*@-usereleased@*/
-static /*@only@*/ /*@null@*/
-void * dnlInitIterator(/*@special@*/ const FSM_t fsm,
+static
+void * dnlInitIterator(const FSM_t fsm,
                int reverse)
-       /*@uses fsm->iter @*/ 
-       /*@*/
+       
 {
     rpmfi fi = fsmGetFi(fsm);
     DNLI_t dnli;
@@ -293,18 +252,14 @@ void * dnlInitIterator(/*@special@*/ const FSM_t fsm,
     dnli = xcalloc(1, sizeof(*dnli));
     dnli->fi = fi;
     dnli->reverse = reverse;
-    /*@-branchstate@*/
     dnli->i = (reverse ? fi->dc : 0);
-    /*@=branchstate@*/
 
     if (fi->dc) {
        dnli->active = xcalloc(fi->dc, sizeof(*dnli->active));
 
        /* Identify parent directories not skipped. */
-/*@-boundswrite@*/
        for (i = 0; i < fi->fc; i++)
             if (!XFA_SKIPPING(fi->actions[i])) dnli->active[fi->dil[i]] = 1;
-/*@=boundswrite@*/
 
        /* Exclude parent directories that are explicitly included. */
        for (i = 0; i < fi->fc; i++) {
@@ -322,22 +277,20 @@ void * dnlInitIterator(/*@special@*/ const FSM_t fsm,
                int jlen;
 
                if (!dnli->active[j] || j == dil)
-                   /*@innercontinue@*/ continue;
+                   continue;
                dnl = fi->dnl[j];
                jlen = strlen(dnl);
                if (jlen != (dnlen+bnlen+1))
-                   /*@innercontinue@*/ continue;
+                   continue;
                if (strncmp(dnl, fi->dnl[dil], dnlen))
-                   /*@innercontinue@*/ continue;
+                   continue;
                if (strncmp(dnl+dnlen, fi->bnl[i], bnlen))
-                   /*@innercontinue@*/ continue;
+                   continue;
                if (dnl[dnlen+bnlen] != '/' || dnl[dnlen+bnlen+1] != '\0')
-                   /*@innercontinue@*/ continue;
+                   continue;
                /* This directory is included in the package. */
-/*@-boundswrite@*/
                dnli->active[j] = 0;
-/*@=boundswrite@*/
-               /*@innerbreak@*/ break;
+               break;
            }
        }
 
@@ -359,18 +312,14 @@ void * dnlInitIterator(/*@special@*/ const FSM_t fsm,
     }
     return dnli;
 }
-/*@=usereleased@*/
-/*@=boundsread@*/
 
 /** \ingroup payload
  * Return next directory name (from file info).
  * @param dnli         directory name iterator
  * @return             next directory name
  */
-/*@-boundsread@*/
-static /*@observer@*/ /*@null@*/
-const char * dnlNextIterator(/*@null@*/ DNLI_t dnli)
-       /*@modifies dnli @*/
+static
+const char * dnlNextIterator(DNLI_t dnli)
 {
     const char * dn = NULL;
 
@@ -391,21 +340,14 @@ const char * dnlNextIterator(/*@null@*/ DNLI_t dnli)
     }
     return dn;
 }
-/*@=boundsread@*/
 
 static void * fsmThread(void * arg)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies arg, fileSystem, internalState @*/
 {
     FSM_t fsm = arg;
-/*@-unqualifiedtrans@*/
     return ((void *) ((long) fsmStage(fsm, fsm->nstage)));
-/*@=unqualifiedtrans@*/
 }
 
 int fsmNext(FSM_t fsm, fileStage nstage)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
 {
     fsm->nstage = nstage;
     if (_fsm_threads)
@@ -418,13 +360,7 @@ int fsmNext(FSM_t fsm, fileStage nstage)
  * @param fsm          file state machine data
  * @return             Is chain only partially filled?
  */
-/*@-boundsread@*/
-static int saveHardLink(/*@special@*/ /*@partial@*/ FSM_t fsm)
-       /*@uses fsm->links, fsm->ix, fsm->sb, fsm->goal, fsm->nsuffix @*/
-       /*@defines fsm->li @*/
-       /*@releases fsm->path @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int saveHardLink(FSM_t fsm)
 {
     struct stat * st = &fsm->sb;
     int rc = 0;
@@ -432,16 +368,12 @@ static int saveHardLink(/*@special@*/ /*@partial@*/ FSM_t fsm)
     int j;
 
     /* Find hard link set. */
-    /*@-branchstate@*/
     for (fsm->li = fsm->links; fsm->li; fsm->li = fsm->li->next) {
        if (fsm->li->sb.st_ino == st->st_ino && fsm->li->sb.st_dev == st->st_dev)
            break;
     }
-    /*@=branchstate@*/
 
     /* New hard link encountered, add new link to set. */
-/*@-boundswrite@*/
-    /*@-branchstate@*/
     if (fsm->li == NULL) {
        fsm->li = xcalloc(1, sizeof(*fsm->li));
        fsm->li->next = NULL;
@@ -459,21 +391,13 @@ static int saveHardLink(/*@special@*/ /*@partial@*/ FSM_t fsm)
        if (fsm->goal == FSM_PKGINSTALL)
            fsm->li->linksLeft = 0;
 
-       /*@-kepttrans@*/
        fsm->li->next = fsm->links;
-       /*@=kepttrans@*/
        fsm->links = fsm->li;
     }
-    /*@=branchstate@*/
-/*@=boundswrite@*/
 
     if (fsm->goal == FSM_PKGBUILD) --fsm->li->linksLeft;
-/*@-boundswrite@*/
     fsm->li->filex[fsm->li->linksLeft] = fsm->ix;
-    /*@-observertrans -dependenttrans@*/
     fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix;
-    /*@=observertrans =dependenttrans@*/
-/*@=boundswrite@*/
     if (fsm->goal == FSM_PKGINSTALL) fsm->li->linksLeft++;
 
     if (fsm->goal == FSM_PKGBUILD)
@@ -507,15 +431,13 @@ static int saveHardLink(/*@special@*/ /*@partial@*/ FSM_t fsm)
     rc = fsmNext(fsm, FSM_MAP);
     return rc;
 }
-/*@=boundsread@*/
 
 /** \ingroup payload
  * Destroy set of hard links.
  * @param li           set of hard links
  * @return             NULL always
  */
-static /*@null@*/ void * freeHardLink(/*@only@*/ /*@null@*/ struct hardLink_s * li)
-       /*@modifies li @*/
+static void * freeHardLink(struct hardLink_s * li)
 {
     if (li) {
        li->nsuffix = _free(li->nsuffix);       /* XXX elements are shared */
@@ -534,13 +456,11 @@ FSM_t freeFSM(FSM_t fsm)
 {
     if (fsm) {
        fsm->path = _free(fsm->path);
-       /*@-branchstate@*/
        while ((fsm->li = fsm->links) != NULL) {
            fsm->links = fsm->li->next;
            fsm->li->next = NULL;
            fsm->li = freeHardLink(fsm->li);
        }
-       /*@=branchstate@*/
        fsm->dnlx = _free(fsm->dnlx);
        fsm->ldn = _free(fsm->ldn);
        fsm->iter = mapFreeIterator(fsm->iter);
@@ -570,16 +490,12 @@ int fsmSetup(FSM_t fsm, fileStage goal,
                RPMCALLBACK_INST_START, fi->archivePos, fi->archiveSize);
     }
 
-/*@-boundswrite@*/
-    /*@-assignexpose@*/
     fsm->archiveSize = archiveSize;
     if (fsm->archiveSize)
        *fsm->archiveSize = 0;
     fsm->failedFile = failedFile;
     if (fsm->failedFile)
        *fsm->failedFile = NULL;
-    /*@=assignexpose@*/
-/*@=boundswrite@*/
 
     memset(fsm->sufbuf, 0, sizeof(fsm->sufbuf));
     if (fsm->goal == FSM_PKGINSTALL) {
@@ -594,14 +510,11 @@ int fsmSetup(FSM_t fsm, fileStage goal,
     rc = fsmUNSAFE(fsm, fsm->goal);
     if (rc && !ec) ec = rc;
 
-/*@-boundswrite@*/
     if (fsm->archiveSize && ec == 0)
        *fsm->archiveSize = (fdGetCpioPos(fsm->cfd) - pos);
-/*@=boundswrite@*/
 
-/*@-nullstate@*/ /* FIX: *fsm->failedFile may be NULL */
+/* FIX: *fsm->failedFile may be NULL */
    return ec;
-/*@=nullstate@*/
 }
 
 int fsmTeardown(FSM_t fsm)
@@ -621,7 +534,6 @@ int fsmTeardown(FSM_t fsm)
 }
 
 static int fsmMapFContext(FSM_t fsm)
-       /*@modifies fsm @*/
 {
     rpmts ts = fsmGetTs(fsm);
     struct stat * st = &fsm->sb;
@@ -655,7 +567,6 @@ int fsmMapPath(FSM_t fsm)
     i = fsm->ix;
     if (fi && i >= 0 && i < fi->fc) {
 
-/*@-boundsread@*/
        fsm->astriplen = fi->astriplen;
        fsm->action = (fi->actions ? fi->actions[i] : fi->action);
        fsm->fflags = (fi->fflags ? fi->fflags[i] : fi->flags);
@@ -664,9 +575,7 @@ int fsmMapPath(FSM_t fsm)
        /* src rpms have simple base name in payload. */
        fsm->dirName = fi->dnl[fi->dil[i]];
        fsm->baseName = fi->bnl[i];
-/*@=boundsread@*/
 
-/*@-boundswrite@*/
        switch (fsm->action) {
        case FA_SKIP:
            break;
@@ -700,10 +609,10 @@ assert(rpmteType(fi->te) == TR_ADDED);
            switch (rpmteType(fi->te)) {
            case TR_ADDED:
                fsm->osuffix = SUFFIX_RPMORIG;
-               /*@innerbreak@*/ break;
+               break;
            case TR_REMOVED:
                fsm->osuffix = SUFFIX_RPMSAVE;
-               /*@innerbreak@*/ break;
+               break;
            }
            break;
 
@@ -730,7 +639,6 @@ assert(rpmteType(fi->te) == TR_ADDED);
        default:
            break;
        }
-/*@=boundswrite@*/
 
        if ((fsm->mapFlags & CPIO_MAP_PATH) || fsm->nsuffix) {
            const struct stat * st = &fsm->sb;
@@ -810,11 +718,7 @@ int fsmMapAttrs(FSM_t fsm)
  * @param fsm          file state machine data
  * @return             0 on success
  */
-/*@-compdef@*/
-static int expandRegular(/*@special@*/ FSM_t fsm)
-       /*@uses fsm->fmd5sum, fsm->md5sum, fsm->sb, fsm->wfd  @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int expandRegular(FSM_t fsm)
 {
     const struct stat * st = &fsm->sb;
     int left = st->st_size;
@@ -871,7 +775,6 @@ exit:
     (void) fsmNext(fsm, FSM_WCLOSE);
     return rc;
 }
-/*@=compdef@*/
 
 /** \ingroup payload
  * Write next item to payload stream.
@@ -879,11 +782,7 @@ exit:
  * @param writeData    should data be written?
  * @return             0 on success
  */
-/*@-compdef -compmempass@*/
-static int writeFile(/*@special@*/ /*@partial@*/ FSM_t fsm, int writeData)
-       /*@uses fsm->path, fsm->opath, fsm->sb, fsm->osb, fsm->cfd @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int writeFile(FSM_t fsm, int writeData)
 {
     const char * path = fsm->path;
     const char * opath = fsm->opath;
@@ -895,7 +794,6 @@ static int writeFile(/*@special@*/ /*@partial@*/ FSM_t fsm, int writeData)
 
     st->st_size = (writeData ? ost->st_size : 0);
 
-    /*@-branchstate@*/
     if (S_ISDIR(st->st_mode)) {
        st->st_size = 0;
     } else if (S_ISLNK(st->st_mode)) {
@@ -909,10 +807,8 @@ static int writeFile(/*@special@*/ /*@partial@*/ FSM_t fsm, int writeData)
        st->st_size = fsm->rdnb;
        symbuf = alloca_strdup(fsm->rdbuf);     /* XXX save readlink return. */
     }
-    /*@=branchstate@*/
 
     if (fsm->mapFlags & CPIO_MAP_ABSOLUTE) {
-/*@-boundswrite@*/
        int nb = strlen(fsm->dirName) + strlen(fsm->baseName) + sizeof(".");
        char * t = alloca(nb);
        *t = '\0';
@@ -920,7 +816,6 @@ static int writeFile(/*@special@*/ /*@partial@*/ FSM_t fsm, int writeData)
        if (fsm->mapFlags & CPIO_MAP_ADDDOT)
            *t++ = '.';
        t = stpcpy( stpcpy(t, fsm->dirName), fsm->baseName);
-/*@=boundswrite@*/
     } else if (fsm->mapFlags & CPIO_MAP_PATH) {
        rpmfi fi = fsmGetFi(fsm);
        fsm->path =
@@ -977,25 +872,19 @@ static int writeFile(/*@special@*/ /*@partial@*/ FSM_t fsm, int writeData)
        }
 
 #ifdef HAVE_MMAP
-/*@-branchstate@*/
        if (mapped != (void *)-1) {
            xx = msync(mapped, nmapped, MS_ASYNC);
 #if defined(MADV_DONTNEED)
            xx = madvise(mapped, nmapped, MADV_DONTNEED);
 #endif
-/*@-noeffect@*/
            xx = munmap(mapped, nmapped);
-/*@=noeffect@*/
            fsm->rdbuf = rdbuf;
        }
-/*@=branchstate@*/
 #endif
 
     } else if (writeData && S_ISLNK(st->st_mode)) {
        /* XXX DWRITE uses rdnb for I/O length. */
-/*@-boundswrite@*/
        strcpy(fsm->rdbuf, symbuf);     /* XXX restore readlink buffer. */
-/*@=boundswrite@*/
        fsm->rdnb = strlen(symbuf);
        rc = fsmNext(fsm, FSM_DWRITE);
        if (rc) goto exit;
@@ -1009,23 +898,17 @@ static int writeFile(/*@special@*/ /*@partial@*/ FSM_t fsm, int writeData)
 exit:
     if (fsm->rfd != NULL)
        (void) fsmNext(fsm, FSM_RCLOSE);
-/*@-dependenttrans@*/
     fsm->opath = opath;
     fsm->path = path;
-/*@=dependenttrans@*/
     return rc;
 }
-/*@=compdef =compmempass@*/
 
 /** \ingroup payload
  * Write set of linked files to payload stream.
  * @param fsm          file state machine data
  * @return             0 on success
  */
-static int writeLinkedFile(/*@special@*/ /*@partial@*/ FSM_t fsm)
-       /*@uses fsm->path, fsm->nsuffix, fsm->ix, fsm->li, fsm->failedFile @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int writeLinkedFile(FSM_t fsm)
 {
     const char * path = fsm->path;
     const char * nsuffix = fsm->nsuffix;
@@ -1038,16 +921,12 @@ static int writeLinkedFile(/*@special@*/ /*@partial@*/ FSM_t fsm)
     fsm->nsuffix = NULL;
     fsm->ix = -1;
 
-/*@-boundswrite@*/
-/*@-branchstate@*/
     for (i = fsm->li->nlink - 1; i >= 0; i--) {
 
        if (fsm->li->filex[i] < 0) continue;
 
        fsm->ix = fsm->li->filex[i];
-/*@-compdef@*/
        rc = fsmNext(fsm, FSM_MAP);
-/*@=compdef@*/
 
        /* Write data after last link. */
        rc = writeFile(fsm, (i == 0));
@@ -1059,8 +938,6 @@ static int writeLinkedFile(/*@special@*/ /*@partial@*/ FSM_t fsm)
        fsm->path = _free(fsm->path);
        fsm->li->filex[i] = -1;
     }
-/*@=branchstate@*/
-/*@=boundswrite@*/
 
     fsm->ix = iterIndex;
     fsm->nsuffix = nsuffix;
@@ -1073,12 +950,7 @@ static int writeLinkedFile(/*@special@*/ /*@partial@*/ FSM_t fsm)
  * @param fsm          file state machine data
  * @return             0 on success
  */
-/*@-boundsread@*/
-/*@-compdef@*/
-static int fsmMakeLinks(/*@special@*/ /*@partial@*/ FSM_t fsm)
-       /*@uses fsm->path, fsm->opath, fsm->nsuffix, fsm->ix, fsm->li @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int fsmMakeLinks(FSM_t fsm)
 {
     const char * path = fsm->path;
     const char * opath = fsm->opath;
@@ -1097,7 +969,6 @@ static int fsmMakeLinks(/*@special@*/ /*@partial@*/ FSM_t fsm)
     rc = fsmNext(fsm, FSM_MAP);
     fsm->opath = fsm->path;
     fsm->path = NULL;
-    /*@-branchstate@*/
     for (i = 0; i < fsm->li->nlink; i++) {
        if (fsm->li->filex[i] < 0) continue;
        if (fsm->li->createdPath == i) continue;
@@ -1115,14 +986,11 @@ static int fsmMakeLinks(/*@special@*/ /*@partial@*/ FSM_t fsm)
        rc = fsmNext(fsm, FSM_LINK);
        if (fsm->failedFile && rc != 0 && *fsm->failedFile == NULL) {
            ec = rc;
-/*@-boundswrite@*/
            *fsm->failedFile = xstrdup(fsm->path);
-/*@=boundswrite@*/
        }
 
        fsm->li->linksLeft--;
     }
-    /*@=branchstate@*/
     fsm->path = _free(fsm->path);
     fsm->opath = _free(fsm->opath);
 
@@ -1132,20 +1000,13 @@ static int fsmMakeLinks(/*@special@*/ /*@partial@*/ FSM_t fsm)
     fsm->opath = opath;
     return ec;
 }
-/*@=compdef@*/
-/*@=boundsread@*/
 
 /** \ingroup payload
  * Commit hard linked file set atomically.
  * @param fsm          file state machine data
  * @return             0 on success
  */
-/*@-compdef@*/
-static int fsmCommitLinks(/*@special@*/ /*@partial@*/ FSM_t fsm)
-       /*@uses fsm->path, fsm->nsuffix, fsm->ix, fsm->sb,
-               fsm->li, fsm->links @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int fsmCommitLinks(FSM_t fsm)
 {
     const char * path = fsm->path;
     const char * nsuffix = fsm->nsuffix;
@@ -1158,14 +1019,11 @@ static int fsmCommitLinks(/*@special@*/ /*@partial@*/ FSM_t fsm)
     fsm->nsuffix = NULL;
     fsm->ix = -1;
 
-    /*@-branchstate@*/
     for (fsm->li = fsm->links; fsm->li; fsm->li = fsm->li->next) {
        if (fsm->li->sb.st_ino == st->st_ino && fsm->li->sb.st_dev == st->st_dev)
            break;
     }
-    /*@=branchstate@*/
 
-/*@-boundswrite@*/
     for (i = 0; i < fsm->li->nlink; i++) {
        if (fsm->li->filex[i] < 0) continue;
        fsm->ix = fsm->li->filex[i];
@@ -1175,24 +1033,19 @@ static int fsmCommitLinks(/*@special@*/ /*@partial@*/ FSM_t fsm)
        fsm->path = _free(fsm->path);
        fsm->li->filex[i] = -1;
     }
-/*@=boundswrite@*/
 
     fsm->ix = iterIndex;
     fsm->nsuffix = nsuffix;
     fsm->path = path;
     return rc;
 }
-/*@=compdef@*/
 
 /**
  * Remove (if created) directories not explicitly included in package.
  * @param fsm          file state machine data
  * @return             0 on success
  */
-static int fsmRmdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
-       /*@uses fsm->path, fsm->dnlx, fsm->ldn, fsm->rdbuf, fsm->iter @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int fsmRmdirs(FSM_t fsm)
 {
     const char * path = fsm->path;
     void * dnli = dnlInitIterator(fsm, 1);
@@ -1201,9 +1054,7 @@ static int fsmRmdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
     int rc = 0;
 
     fsm->path = NULL;
-/*@-boundswrite@*/
     dn[0] = '\0';
-    /*@-observertrans -dependenttrans@*/
     if (fsm->ldn != NULL && fsm->dnlx != NULL)
     while ((fsm->path = dnlNextIterator(dnli)) != NULL) {
        int dnlen = strlen(fsm->path);
@@ -1218,24 +1069,19 @@ static int fsmRmdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
        fsm->path = dn;
 
        /* Remove generated directories. */
-       /*@-usereleased@*/ /* LCL: te used after release? */
+       /* LCL: te used after release? */
        do {
            if (*te == '/') {
                *te = '\0';
-/*@-compdef@*/
                rc = fsmNext(fsm, FSM_RMDIR);
-/*@=compdef@*/
                *te = '/';
            }
            if (rc)
-               /*@innerbreak@*/ break;
+               break;
            te--;
        } while ((te - fsm->path) > fsm->dnlx[dc]);
-       /*@=usereleased@*/
     }
-/*@=boundswrite@*/
     dnli = dnlFreeIterator(dnli);
-    /*@=observertrans =dependenttrans@*/
 
     fsm->path = path;
     return rc;
@@ -1246,12 +1092,7 @@ static int fsmRmdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
  * @param fsm          file state machine data
  * @return             0 on success
  */
-static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
-       /*@uses fsm->path, fsm->sb, fsm->osb, fsm->rdbuf, fsm->iter,
-               fsm->ldn, fsm->ldnlen, fsm->ldnalloc @*/
-       /*@defines fsm->dnlx, fsm->ldn @*/
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int fsmMkdirs(FSM_t fsm)
 {
     struct stat * st = &fsm->sb;
     struct stat * ost = &fsm->osb;
@@ -1262,17 +1103,13 @@ static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
     int dc = dnlCount(dnli);
     int rc = 0;
     int i;
-/*@-compdef@*/
     rpmts ts = fsmGetTs(fsm);
-/*@=compdef@*/
     security_context_t scon = NULL;
 
     fsm->path = NULL;
 
-/*@-boundswrite@*/
     dn[0] = '\0';
     fsm->dnlx = (dc ? xcalloc(dc, sizeof(*fsm->dnlx)) : NULL);
-    /*@-observertrans -dependenttrans@*/
     if (fsm->dnlx != NULL)
     while ((fsm->path = dnlNextIterator(dnli)) != NULL) {
        int dnlen = strlen(fsm->path);
@@ -1284,10 +1121,8 @@ static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
        if (dnlen <= 1)
            continue;
 
-       /*@-compdef -nullpass@*/        /* FIX: fsm->ldn not defined ??? */
        if (dnlen <= fsm->ldnlen && !strcmp(fsm->path, fsm->ldn))
            continue;
-       /*@=compdef =nullpass@*/
 
        /* Copy to avoid const on fsm->path. */
        (void) stpcpy(dn, fsm->path);
@@ -1296,12 +1131,11 @@ static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
        /* Assume '/' directory exists, "mkdir -p" for others if non-existent */
        for (i = 1, te = dn + 1; *te != '\0'; te++, i++) {
            if (*te != '/')
-               /*@innercontinue@*/ continue;
+               continue;
 
            *te = '\0';
 
            /* Already validated? */
-           /*@-usedef -compdef -nullpass -nullderef@*/
            if (i < fsm->ldnlen &&
                (fsm->ldn[i] == '/' || fsm->ldn[i] == '\0') &&
                !strncmp(fsm->path, fsm->ldn, i))
@@ -1309,9 +1143,8 @@ static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
                *te = '/';
                /* Move pre-existing path marker forward. */
                fsm->dnlx[dc] = (te - dn);
-               /*@innercontinue@*/ continue;
+               continue;
            }
-           /*@=usedef =compdef =nullpass =nullderef@*/
 
            /* Validate next component of path. */
            rc = fsmUNSAFE(fsm, FSM_LSTAT);
@@ -1351,12 +1184,12 @@ static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
                *te = '/';
            }
            if (rc)
-               /*@innerbreak@*/ break;
+               break;
        }
        if (rc) break;
 
        /* Save last validated path. */
-/*@-compdef@*/ /* FIX: ldn/path annotations ? */
+/* FIX: ldn/path annotations ? */
        if (fsm->ldnalloc < (dnlen + 1)) {
            fsm->ldnalloc = dnlen + 100;
            fsm->ldn = xrealloc(fsm->ldn, fsm->ldnalloc);
@@ -1365,17 +1198,13 @@ static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
            strcpy(fsm->ldn, fsm->path);
            fsm->ldnlen = dnlen;
        }
-/*@=compdef@*/
     }
-/*@=boundswrite@*/
     dnli = dnlFreeIterator(dnli);
-    /*@=observertrans =dependenttrans@*/
 
     fsm->path = path;
     st->st_mode = st_mode;             /* XXX restore st->st_mode */
-/*@-compdef@*/ /* FIX: ldn/path annotations ? */
+/* FIX: ldn/path annotations ? */
     return rc;
-/*@=compdef@*/
 }
 
 #ifdef NOTYET
@@ -1384,9 +1213,7 @@ static int fsmMkdirs(/*@special@*/ /*@partial@*/ FSM_t fsm)
  * @param fsm          file state machine data
  * @return             0 on success
  */
-static int fsmStat(/*@special@*/ /*@partial@*/ FSM_t fsm)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/
+static int fsmStat(FSM_t fsm)
 {
     int rc = 0;
 
@@ -1415,8 +1242,6 @@ static int fsmStat(/*@special@*/ /*@partial@*/ FSM_t fsm)
        ((_x)[sizeof("/dev/log")-1] == '\0' || \
         (_x)[sizeof("/dev/log")-1] == ';'))
 
-/*@-boundsread@*/
-/*@-compmempass@*/
 int fsmStage(FSM_t fsm, fileStage stage)
 {
 #ifdef UNUSED
@@ -1458,7 +1283,6 @@ int fsmStage(FSM_t fsm, fileStage stage)
     }
 #undef _fafilter
 
-    /*@-branchstate@*/
     switch (stage) {
     case FSM_UNKNOWN:
        break;
@@ -1470,21 +1294,21 @@ int fsmStage(FSM_t fsm, fileStage stage)
            /* Exit on end-of-payload. */
            if (rc == CPIOERR_HDR_TRAILER) {
                rc = 0;
-               /*@loopbreak@*/ break;
+               break;
            }
 
            /* Exit on error. */
            if (rc) {
                fsm->postpone = 1;
                (void) fsmNext(fsm, FSM_UNDO);
-               /*@loopbreak@*/ break;
+               break;
            }
 
            /* Extract file from archive. */
            rc = fsmNext(fsm, FSM_PROCESS);
            if (rc) {
                (void) fsmNext(fsm, FSM_UNDO);
-               /*@loopbreak@*/ break;
+               break;
            }
 
            /* Notify on success. */
@@ -1492,7 +1316,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
 
            rc = fsmNext(fsm, FSM_FINI);
            if (rc) {
-               /*@loopbreak@*/ break;
+               break;
            }
        }
        break;
@@ -1505,12 +1329,12 @@ int fsmStage(FSM_t fsm, fileStage stage)
            /* Exit on end-of-payload. */
            if (rc == CPIOERR_HDR_TRAILER) {
                rc = 0;
-               /*@loopbreak@*/ break;
+               break;
            }
 
            /* Rename/erase next item. */
            if (fsmNext(fsm, FSM_FINI))
-               /*@loopbreak@*/ break;
+               break;
        }
        break;
     case FSM_PKGBUILD:
@@ -1521,28 +1345,28 @@ int fsmStage(FSM_t fsm, fileStage stage)
            /* Exit on end-of-payload. */
            if (rc == CPIOERR_HDR_TRAILER) {
                rc = 0;
-               /*@loopbreak@*/ break;
+               break;
            }
 
            /* Exit on error. */
            if (rc) {
                fsm->postpone = 1;
                (void) fsmNext(fsm, FSM_UNDO);
-               /*@loopbreak@*/ break;
+               break;
            }
 
            /* Copy file into archive. */
            rc = fsmNext(fsm, FSM_PROCESS);
            if (rc) {
                (void) fsmNext(fsm, FSM_UNDO);
-               /*@loopbreak@*/ break;
+               break;
            }
 
            /* Notify on success. */
            (void) fsmNext(fsm, FSM_NOTIFY);
 
            if (fsmNext(fsm, FSM_FINI))
-               /*@loopbreak@*/ break;
+               break;
        }
 
        /* Flush partial sets of hard linked files. */
@@ -1555,17 +1379,15 @@ int fsmStage(FSM_t fsm, fileStage stage)
                /* Re-calculate link count for archive header. */
                for (j = -1, nlink = 0, i = 0; i < fsm->li->nlink; i++) {
                    if (fsm->li->filex[i] < 0)
-                       /*@innercontinue@*/ continue;
+                       continue;
                    nlink++;
                    if (j == -1) j = i;
                }
                /* XXX force the contents out as well. */
-/*@-boundswrite@*/
                if (j != 0) {
                    fsm->li->filex[0] = fsm->li->filex[j];
                    fsm->li->filex[j] = -1;
                }
-/*@=boundswrite@*/
                fsm->li->sb.st_nlink = nlink;
 
                fsm->sb = fsm->li->sb;  /* structure assignment */
@@ -1613,9 +1435,7 @@ int fsmStage(FSM_t fsm, fileStage stage)
 
        /* Detect and create directories not explicitly in package. */
        if (fsm->goal == FSM_PKGINSTALL) {
-/*@-compdef@*/
            rc = fsmNext(fsm, FSM_MKDIRS);
-/*@=compdef@*/
            if (!rc) fsm->mkdirsdone = 1;
        }
 
@@ -1648,10 +1468,8 @@ int fsmStage(FSM_t fsm, fileStage stage)
                    _("archive file %s was not found in header file list\n"),
                        fsm->path);
 #endif
-/*@-boundswrite@*/
                if (fsm->failedFile && *fsm->failedFile == NULL)
                    *fsm->failedFile = xstrdup(fsm->path);
-/*@=boundswrite@*/
                rc = CPIOERR_UNMAPPED_FILE;
            } else {
                rc = CPIOERR_HDR_TRAILER;
@@ -1694,10 +1512,8 @@ int fsmStage(FSM_t fsm, fileStage stage)
        if (rc) break;
 
        /* On non-install, the disk file stat is what's remapped. */
-/*@-boundswrite@*/
        if (fsm->goal != FSM_PKGINSTALL)
            *st = *ost;                 /* structure assignment */
-/*@=boundswrite@*/
 
        /* Remap file perms, owner, and group. */
        rc = fsmMapAttrs(fsm);
@@ -1705,10 +1521,9 @@ int fsmStage(FSM_t fsm, fileStage stage)
 
        fsm->postpone = XFA_SKIPPING(fsm->action);
        if (fsm->goal == FSM_PKGINSTALL || fsm->goal == FSM_PKGBUILD) {
-           /*@-evalorder@*/ /* FIX: saveHardLink can modify fsm */
+           /* FIX: saveHardLink can modify fsm */
            if (!S_ISDIR(st->st_mode) && st->st_nlink > 1)
                fsm->postpone = saveHardLink(fsm);
-           /*@=evalorder@*/
        }
        break;
     case FSM_PRE:
@@ -1742,7 +1557,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
 
                for (li = fsm->links, prev = NULL; li; prev = li, li = li->next)
                     if (li == fsm->li)
-                       /*@loopbreak@*/ break;
+                       break;
 
                if (prev == NULL)
                    fsm->links = fsm->li->next;
@@ -1779,9 +1594,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
                fsm->opath = opath;
            }
 
-           /*@-dependenttrans@*/
            fsm->path = path;
-           /*@=dependenttrans@*/
            if (!(rc == CPIOERR_ENOENT)) return rc;
            rc = expandRegular(fsm);
        } else if (S_ISDIR(st->st_mode)) {
@@ -1807,13 +1620,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
                rc = CPIOERR_READ_FAILED;
            if (rc) break;
 
-/*@-boundswrite@*/
            fsm->wrbuf[st->st_size] = '\0';
-/*@=boundswrite@*/
            /* XXX symlink(fsm->opath, fsm->path) */
-           /*@-dependenttrans@*/
            fsm->opath = fsm->wrbuf;
-           /*@=dependenttrans@*/
            rc = fsmUNSAFE(fsm, FSM_VERIFY);
            if (rc == CPIOERR_ENOENT)
                rc = fsmNext(fsm, FSM_SYMLINK);
@@ -1829,7 +1638,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
            }
        } else if (S_ISCHR(st->st_mode) ||
                   S_ISBLK(st->st_mode) ||
-    /*@-unrecog@*/ S_ISSOCK(st->st_mode) /*@=unrecog@*/)
+    S_ISSOCK(st->st_mode))
        {
            rc = fsmUNSAFE(fsm, FSM_VERIFY);
            if (rc == CPIOERR_ENOENT)
@@ -1875,10 +1684,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
 #endif
            errno = saveerrno;
        }
-/*@-boundswrite@*/
        if (fsm->failedFile && *fsm->failedFile == NULL)
            *fsm->failedFile = xstrdup(fsm->path);
-/*@=boundswrite@*/
        break;
     case FSM_FINI:
        if (!fsm->postpone && fsm->commit) {
@@ -1892,10 +1699,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
        }
        fsm->path = _free(fsm->path);
        fsm->opath = _free(fsm->opath);
-/*@-boundswrite@*/
        memset(st, 0, sizeof(*st));
        memset(ost, 0, sizeof(*ost));
-/*@=boundswrite@*/
        break;
     case FSM_COMMIT:
        /* Rename pre-existing modified or unmanaged file. */
@@ -1930,20 +1735,20 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
                    case CPIOERR_ENOTEMPTY:
        /* XXX make sure that build side permits %missingok on directories. */
                        if (fsm->fflags & RPMFILE_MISSINGOK)
-                           /*@innerbreak@*/ break;
+                           break;
 
                        /* XXX common error message. */
                        rpmError(
                            (strict_erasures ? RPMERR_RMDIR : RPMDEBUG_RMDIR),
                            _("%s rmdir of %s failed: Directory not empty\n"), 
                                rpmfiTypeString(fi), fsm->path);
-                       /*@innerbreak@*/ break;
+                       break;
                    default:
                        rpmError(
                            (strict_erasures ? RPMERR_RMDIR : RPMDEBUG_RMDIR),
                                _("%s rmdir of %s failed: %s\n"),
                                rpmfiTypeString(fi), fsm->path, strerror(errno));
-                       /*@innerbreak@*/ break;
+                       break;
                    }
                } else {
                    rc = fsmNext(fsm, FSM_UNLINK);
@@ -1951,14 +1756,13 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
                    switch (rc) {
                    case CPIOERR_ENOENT:
                        if (fsm->fflags & RPMFILE_MISSINGOK)
-                           /*@innerbreak@*/ break;
-                       /*@fallthrough@*/
+                           break;
                    default:
                        rpmError(
                            (strict_erasures ? RPMERR_UNLINK : RPMDEBUG_UNLINK),
                                _("%s unlink of %s failed: %s\n"),
                                rpmfiTypeString(fi), fsm->path, strerror(errno));
-                       /*@innerbreak@*/ break;
+                       break;
                    }
                }
            }
@@ -2016,9 +1820,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
        /* Notify on success. */
        if (!rc)                rc = fsmNext(fsm, FSM_NOTIFY);
        else if (fsm->failedFile && *fsm->failedFile == NULL) {
-/*@-boundswrite@*/
            *fsm->failedFile = fsm->path;
-/*@=boundswrite@*/
            fsm->path = NULL;
        }
        break;
@@ -2034,18 +1836,16 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
            {
                for (i = 0 ; i < fsm->li->linksLeft; i++) {
                    if (fsm->li->filex[i] < 0)
-                       /*@innercontinue@*/ continue;
+                       continue;
                    rc = CPIOERR_MISSING_HARDLINK;
                    if (fsm->failedFile && *fsm->failedFile == NULL) {
                        fsm->ix = fsm->li->filex[i];
                        if (!fsmNext(fsm, FSM_MAP)) {
-/*@-boundswrite@*/
                            *fsm->failedFile = fsm->path;
-/*@=boundswrite@*/
                            fsm->path = NULL;
                        }
                    }
-                   /*@loopbreak@*/ break;
+                   break;
                }
            }
            if (fsm->goal == FSM_PKGBUILD &&
@@ -2067,9 +1867,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
        }
        if (S_ISREG(st->st_mode)) {
            char * path = alloca(strlen(fsm->path) + sizeof("-RPMDELETE"));
-/*@-boundswrite@*/
            (void) stpcpy( stpcpy(path, fsm->path), "-RPMDELETE");
-/*@=boundswrite@*/
            /*
             * XXX HP-UX (and other os'es) don't permit unlink on busy
             * XXX files.
@@ -2084,7 +1882,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
            fsm->path = fsm->opath;
            fsm->opath = NULL;
            return (rc ? rc : CPIOERR_ENOENT);  /* XXX HACK */
-           /*@notreached@*/ break;
+           break;
        } else if (S_ISDIR(st->st_mode)) {
            if (S_ISDIR(ost->st_mode))          return 0;
            if (S_ISLNK(ost->st_mode)) {
@@ -2115,7 +1913,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
        if (fsm->stage == FSM_PROCESS) rc = fsmNext(fsm, FSM_UNLINK);
        if (rc == 0)    rc = CPIOERR_ENOENT;
        return (rc ? rc : CPIOERR_ENOENT);      /* XXX HACK */
-       /*@notreached@*/ break;
+       break;
 
     case FSM_UNLINK:
        if (fsm->mapFlags & CPIO_SBIT_CHECK) {
@@ -2164,9 +1962,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
                fsm->path, (rc < 0 ? strerror(errno) : ""));
        if (rc < 0)
            switch (errno) {
-           case ENOENT:        rc = CPIOERR_ENOENT;    /*@switchbreak@*/ break;
-           case ENOTEMPTY:     rc = CPIOERR_ENOTEMPTY; /*@switchbreak@*/ break;
-           default:            rc = CPIOERR_RMDIR_FAILED; /*@switchbreak@*/ break;
+           case ENOENT:        rc = CPIOERR_ENOENT;    break;
+           case ENOTEMPTY:     rc = CPIOERR_ENOTEMPTY; break;
+           default:            rc = CPIOERR_RMDIR_FAILED; break;
            }
        break;
     case FSM_LSETFCON:
@@ -2241,9 +2039,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
        if (rc < 0)     rc = CPIOERR_MKFIFO_FAILED;
        break;
     case FSM_MKNOD:
-       /*@-unrecog -portability @*/ /* FIX: check S_IFIFO or dev != 0 */
+       /* FIX: check S_IFIFO or dev != 0 */
        rc = mknod(fsm->path, (st->st_mode & ~07777), st->st_rdev);
-       /*@=unrecog =portability @*/
        if (_fsm_debug && (stage & FSM_SYSCALL))
            rpmMessage(RPMMESS_DEBUG, " %8s (%s, 0%o, 0x%x) %s\n", cur,
                fsm->path, (unsigned)(st->st_mode & ~07777),
@@ -2273,18 +2070,14 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
        break;
     case FSM_READLINK:
        /* XXX NUL terminated result in fsm->rdbuf, len in fsm->rdnb. */
-/*@-boundswrite@*/
        rc = Readlink(fsm->path, fsm->rdbuf, fsm->rdsize - 1);
-/*@=boundswrite@*/
        if (_fsm_debug && (stage & FSM_SYSCALL))
            rpmMessage(RPMMESS_DEBUG, " %8s (%s, rdbuf, %d) %s\n", cur,
                fsm->path, (int)(fsm->rdsize -1), (rc < 0 ? strerror(errno) : ""));
        if (rc < 0)     rc = CPIOERR_READLINK_FAILED;
        else {
            fsm->rdnb = rc;
-/*@-boundswrite@*/
            fsm->rdbuf[fsm->rdnb] = '\0';
-/*@=boundswrite@*/
            rc = 0;
        }
        break;
@@ -2306,7 +2099,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
            fsm->wrlen = (left > fsm->wrsize ? fsm->wrsize : left);
            rc = fsmNext(fsm, FSM_DREAD);
            if (rc)
-               /*@loopbreak@*/ break;
+               break;
        }
        break;
     case FSM_POS:
@@ -2319,9 +2112,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
     case FSM_PAD:
        left = (modulo - (fdGetCpioPos(fsm->cfd) % modulo)) % modulo;
        if (left) {
-/*@-boundswrite@*/
            memset(fsm->rdbuf, 0, left);
-/*@=boundswrite@*/
            /* XXX DWRITE uses rdnb for I/O length. */
            fsm->rdnb = left;
            (void) fsmNext(fsm, FSM_DWRITE);
@@ -2339,9 +2130,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
        rc = cpioHeaderWrite(fsm, st);          /* Write next payload header. */
        break;
     case FSM_DREAD:
-/*@-boundswrite@*/
        fsm->rdnb = Fread(fsm->wrbuf, sizeof(*fsm->wrbuf), fsm->wrlen, fsm->cfd);
-/*@=boundswrite@*/
        if (_fsm_debug && (stage & FSM_SYSCALL))
            rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\trdnb %d\n",
                cur, (fsm->wrbuf == fsm->wrb ? "wrbuf" : "mmap"),
@@ -2376,9 +2165,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
                fsm->path, fsm->rfd, fsm->rdbuf);
        break;
     case FSM_READ:
-/*@-boundswrite@*/
        fsm->rdnb = Fread(fsm->rdbuf, sizeof(*fsm->rdbuf), fsm->rdlen, fsm->rfd);
-/*@=boundswrite@*/
        if (_fsm_debug && (stage & FSM_SYSCALL))
            rpmMessage(RPMMESS_DEBUG, " %8s (rdbuf, %d, rfd)\trdnb %d\n",
                cur, (int)fsm->rdlen, (int)fsm->rdnb);
@@ -2430,17 +2217,14 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
     default:
        break;
     }
-    /*@=branchstate@*/
 
     if (!(stage & FSM_INTERNAL)) {
        fsm->rc = (rc == CPIOERR_HDR_TRAILER ? 0 : rc);
     }
     return rc;
 }
-/*@=compmempass@*/
-/*@=boundsread@*/
 
-/*@obserever@*/ const char * fileActionString(fileAction a)
+const char * fileActionString(fileAction a)
 {
     switch (a) {
     case FA_UNKNOWN:   return "unknown";
@@ -2457,10 +2241,9 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
     case FA_SKIPCOLOR: return "skipcolor";
     default:           return "???";
     }
-    /*@notreached@*/
 }
 
-/*@observer@*/ const char * fileStageString(fileStage a) {
+const char * fileStageString(fileStage a) {
     switch(a) {
     case FSM_UNKNOWN:  return "unknown";
 
@@ -2523,5 +2306,4 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
 
     default:           return "???";
     }
-    /*@noteached@*/
 }
index 3c079a1..8217833 100644 (file)
--- a/lib/fsm.h
+++ b/lib/fsm.h
@@ -8,10 +8,7 @@
 
 #include "cpio.h"
 
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _fsm_debug;
-/*@=exportlocal@*/
 
 /**
  */
@@ -94,11 +91,8 @@ typedef enum fileStage_e {
  * Keeps track of the set of all hard links to a file in an archive.
  */
 struct hardLink_s {
-/*@owned@*/ /*@relnull@*/
     struct hardLink_s * next;
-/*@owned@*/
     const char ** nsuffix;
-/*@owned@*/
     int * filex;
     struct stat sb;
     int nlink;
@@ -122,54 +116,34 @@ struct fsmIterator_s {
  * File name and stat information.
  */
 struct fsm_s {
-/*@owned@*/ /*@relnull@*/
     const char * path;         /*!< Current file name. */
-/*@owned@*/ /*@relnull@*/
     const char * opath;                /*!< Original file name. */
-/*@relnull@*/
     FD_t cfd;                  /*!< Payload file handle. */
-/*@relnull@*/
     FD_t rfd;                  /*!<  read: File handle. */
-/*@dependent@*/ /*@relnull@*/
     char * rdbuf;              /*!<  read: Buffer. */
-/*@owned@*/ /*@relnull@*/
     char * rdb;                        /*!<  read: Buffer allocated. */
     size_t rdsize;             /*!<  read: Buffer allocated size. */
     size_t rdlen;              /*!<  read: Number of bytes requested.*/
     size_t rdnb;               /*!<  read: Number of bytes returned. */
     FD_t wfd;                  /*!< write: File handle. */
-/*@dependent@*/ /*@relnull@*/
     char * wrbuf;              /*!< write: Buffer. */
-/*@owned@*/ /*@relnull@*/
     char * wrb;                        /*!< write: Buffer allocated. */
     size_t wrsize;             /*!< write: Buffer allocated size. */
     size_t wrlen;              /*!< write: Number of bytes requested.*/
     size_t wrnb;               /*!< write: Number of bytes returned. */
-/*@only@*/ /*@null@*/
     FSMI_t iter;               /*!< File iterator. */
     int ix;                    /*!< Current file iterator index. */
-/*@only@*/ /*@relnull@*/
     struct hardLink_s * links; /*!< Pending hard linked file(s). */
-/*@only@*/ /*@relnull@*/
     struct hardLink_s * li;    /*!< Current hard linked file(s). */
-/*@kept@*/ /*@null@*/
     unsigned int * archiveSize;        /*!< Pointer to archive size. */
-/*@kept@*/ /*@null@*/
     const char ** failedFile;  /*!< First file name that failed. */
-/*@shared@*/ /*@relnull@*/
     const char * subdir;       /*!< Current file sub-directory. */
-/*@unused@*/
     char subbuf[64];   /* XXX eliminate */
-/*@observer@*/ /*@relnull@*/
     const char * osuffix;      /*!< Old, preserved, file suffix. */
-/*@observer@*/ /*@relnull@*/
     const char * nsuffix;      /*!< New, created, file suffix. */
-/*@shared@*/ /*@relnull@*/
     const char * suffix;       /*!< Current file suffix. */
     char sufbuf[64];   /* XXX eliminate */
-/*@only@*/ /*@null@*/
     short * dnlx;              /*!< Last dirpath verified indexes. */
-/*@only@*/ /*@null@*/
     char * ldn;                        /*!< Last dirpath verified. */
     int ldnlen;                        /*!< Last dirpath current length. */
     int ldnalloc;              /*!< Last dirpath allocated length. */
@@ -181,15 +155,10 @@ struct fsm_s {
     int rc;                    /*!< External file stage return code. */
     int commit;                        /*!< Commit synchronously? */
     cpioMapFlags mapFlags;     /*!< Bit(s) to control mapping. */
-/*@shared@*/ /*@relnull@*/
     const char * dirName;      /*!< File directory name. */
-/*@shared@*/ /*@relnull@*/
     const char * baseName;     /*!< File base name. */
-/*@shared@*/ /*@relnull@*/
     const char * fmd5sum;      /*!< Hex MD5 sum (NULL disables). */
-/*@shared@*/ /*@relnull@*/
     const char * md5sum;       /*!< Binary MD5 sum (NULL disables). */
-/*@dependent@*/ /*@observer@*/ /*@null@*/
     const char * fcontext;     /*!< File security context (NULL disables). */
     
     unsigned fflags;           /*!< File flags. */
@@ -205,37 +174,32 @@ struct fsm_s {
 extern "C" {
 #endif
 
-/*@-exportlocal@*/
 /**
  * Return formatted string representation of file stages.
  * @param a            file stage
  * @return             formatted string
  */
-/*@observer@*/ const char * fileStageString(fileStage a)       /*@*/;
+const char * fileStageString(fileStage a)      ;
 
 /**
  * Return formatted string representation of file disposition.
  * @param a            file dispostion
  * @return             formatted string
  */
-/*@observer@*/ const char * fileActionString(fileAction a)     /*@*/;
-/*@=exportlocal@*/
+const char * fileActionString(fileAction a)    ;
 
 /**
  * Create file state machine instance.
  * @return             file state machine
  */
-/*@only@*/ FSM_t newFSM(void)
-       /*@*/;
+FSM_t newFSM(void);
 
 /**
  * Destroy file state machine instance.
  * @param fsm          file state machine
  * @return             always NULL
  */
-/*@null@*/ FSM_t freeFSM(/*@only@*/ /*@null@*/ FSM_t fsm)
-       /*@globals fileSystem @*/
-       /*@modifies fsm, fileSystem @*/;
+FSM_t freeFSM(FSM_t fsm);
 
 /**
  * Load external data into file state machine.
@@ -252,52 +216,41 @@ int fsmSetup(FSM_t fsm, fileStage goal,
                const rpmts ts,
                const rpmfi fi,
                FD_t cfd,
-               /*@out@*/ unsigned int * archiveSize,
-               /*@out@*/ const char ** failedFile)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, ts, fi, *archiveSize, *failedFile,
-               fileSystem, internalState @*/;
+               unsigned int * archiveSize,
+               const char ** failedFile);
 
 /**
  * Clean file state machine.
  * @param fsm          file state machine
  * @return             0 on success
  */
-int fsmTeardown(FSM_t fsm)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, fileSystem, internalState @*/;
+int fsmTeardown(FSM_t fsm);
 
-/*@-exportlocal@*/
 /**
  * Retrieve transaction set from file state machine iterator.
  * @param fsm          file state machine
  * @return             transaction set
  */
-rpmts fsmGetTs(const FSM_t fsm)
-       /*@*/;
+rpmts fsmGetTs(const FSM_t fsm);
 
 /**
  * Retrieve transaction element file info from file state machine iterator.
  * @param fsm          file state machine
  * @return             transaction element file info
  */
-rpmfi fsmGetFi(/*@partial@*/ const FSM_t fsm)
-       /*@*/;
+rpmfi fsmGetFi(const FSM_t fsm);
 
 /**
  * Map next file path and action.
  * @param fsm          file state machine
  */
-int fsmMapPath(FSM_t fsm)
-       /*@modifies fsm @*/;
+int fsmMapPath(FSM_t fsm);
 
 /**
  * Map file stat(2) info.
  * @param fsm          file state machine
  */
-int fsmMapAttrs(FSM_t fsm)
-       /*@modifies fsm @*/;
-/*@=exportlocal@*/
+int fsmMapAttrs(FSM_t fsm);
 
 /**
  * File state machine driver.
@@ -305,9 +258,7 @@ int fsmMapAttrs(FSM_t fsm)
  * @param nstage               next stage
  * @return             0 on success
  */
-int fsmNext(FSM_t fsm, fileStage nstage)
-       /*@globals errno, h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, errno, fileSystem, internalState @*/;
+int fsmNext(FSM_t fsm, fileStage nstage);
 
 /**
  * File state machine driver.
@@ -315,11 +266,7 @@ int fsmNext(FSM_t fsm, fileStage nstage)
  * @param stage                next stage
  * @return             0 on success
  */
-/*@-exportlocal@*/
-int fsmStage(/*@partial@*/ FSM_t fsm, fileStage stage)
-       /*@globals errno, h_errno, fileSystem, internalState @*/
-       /*@modifies fsm, errno, fileSystem, internalState @*/;
-/*@=exportlocal@*/
+int fsmStage(FSM_t fsm, fileStage stage);
 
 #ifdef __cplusplus
 }
index 6f58541..ae274db 100644 (file)
@@ -5,17 +5,13 @@
 #include "rpmts.h"
 #include "rpmmacro.h"
 
-/*@unchecked@*/
 static int reverse = -1;
 
 /**
  */
 static int IDTintcmp(const void * a, const void * b)
-       /*@*/
 {
-    /*@-castexpose@*/
     return ( reverse * (((IDT)a)->val.u32 - ((IDT)b)->val.u32) );
-    /*@=castexpose@*/
 }
 
 IDTX IDTXfree(IDTX idtx)
@@ -73,7 +69,6 @@ IDTX IDTXload(rpmts ts, rpmTag tag)
     HGE_t hge = (HGE_t) headerGetEntry;
     Header h;
 
-    /*@-branchstate@*/
     mi = rpmtsInitIterator(ts, tag, NULL, 0);
 #ifdef NOTYET
     (void) rpmdbSetIteratorRE(mi, RPMTAG_NAME, RPMMIRE_DEFAULT, '!gpg-pubkey');
@@ -97,9 +92,7 @@ IDTX IDTXload(rpmts ts, rpmTag tag)
            continue;
 
        {   IDT idt;
-           /*@-nullderef@*/
            idt = idtx->idt + idtx->nidt;
-           /*@=nullderef@*/
            idt->h = headerLink(h);
            idt->key = NULL;
            idt->instance = rpmdbGetIteratorOffset(mi);
@@ -108,7 +101,6 @@ IDTX IDTXload(rpmts ts, rpmTag tag)
        idtx->nidt++;
     }
     mi = rpmdbFreeIterator(mi);
-    /*@=branchstate@*/
 
     return IDTXsort(idtx);
 }
@@ -148,18 +140,17 @@ IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag)
        switch (rpmrc) {
        default:
            goto bottom;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case RPMRC_NOTTRUSTED:
        case RPMRC_NOKEY:
        case RPMRC_OK:
            isSource = headerIsEntry(h, RPMTAG_SOURCEPACKAGE);
            if (isSource)
                goto bottom;
-           /*@switchbreak@*/ break;
+           break;
        }
 
        tidp = NULL;
-       /*@-branchstate@*/
        if (hge(h, tag, &type, (void **) &tidp, &count) && tidp != NULL) {
 
            idtx = IDTXgrow(idtx, 1);
@@ -176,7 +167,6 @@ IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag)
            }
            idtx->nidt++;
        }
-       /*@=branchstate@*/
 bottom:
        h = headerFree(h);
     }
index 79276d0..d58f3c2 100644 (file)
@@ -7,27 +7,23 @@
 /**
  *  * A rollback transaction id element.
  *   */
-/*@-fielduse@*/
-typedef /*@abstract@*/ struct IDT_s {
+typedef struct IDT_s {
     unsigned int instance;      /*!< installed package transaction id. */
-/*@owned@*/ /*@null@*/
     const char * key;           /*! removed package file name. */
     Header h;                   /*!< removed package header. */
     union {
         uint_32 u32;            /*!< install/remove transaction id */
     } val;
 } * IDT;
-/*@=fielduse@*/
 
 /**
  * A rollback transaction id index.
  */
-typedef /*@abstract@*/ struct IDTindex_s {
+typedef struct IDTindex_s {
     int delta;                 /*!< no. elements to realloc as a chunk. */
     int size;                  /*!< size of id index element. */
     int alloced;               /*!< current number of elements allocated. */
     int nidt;                  /*!< current number of elements initialized. */
-/*@only@*/ /*@null@*/
     IDT idt;                   /*!< id index elements. */
 } * IDTX;
 
@@ -36,17 +32,13 @@ typedef /*@abstract@*/ struct IDTindex_s {
  * @param idtx         id index
  * @return             NULL always
  */
-/*@null@*/
-IDTX IDTXfree(/*@only@*/ /*@null@*/ IDTX idtx)
-       /*@modifies idtx @*/;
+IDTX IDTXfree(IDTX idtx);
 
 /**
  * Create id index.
  * @return             new id index
  */
-/*@only@*/
-IDTX IDTXnew(void)
-       /*@*/;
+IDTX IDTXnew(void);
 
 /**
  * Insure that index has room for "need" elements.
@@ -54,18 +46,14 @@ IDTX IDTXnew(void)
  * @param need         additional no. of elements needed
  * @return             id index (with room for "need" elements)
  */
-/*@only@*/ /*@null@*/
-IDTX IDTXgrow(/*@only@*/ /*@null@*/ IDTX idtx, int need)
-       /*@modifies idtx @*/;
+IDTX IDTXgrow(IDTX idtx, int need);
 
 /**
  * Sort tag (instance,value) pairs.
  * @param idtx         id index
  * @return             id index
  */
-/*@only@*/ /*@null@*/
-IDTX IDTXsort(/*@only@*/ /*@null@*/ IDTX idtx)
-       /*@modifies idtx @*/;
+IDTX IDTXsort(IDTX idtx);
 
 /**
  * Load tag (instance,value) pairs from rpm databse, and return sorted id index.
@@ -73,10 +61,7 @@ IDTX IDTXsort(/*@only@*/ /*@null@*/ IDTX idtx)
  * @param tag          rpm tag
  * @return             id index
  */
-/*@only@*/ /*@null@*/
-IDTX IDTXload(rpmts ts, rpmTag tag)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState  @*/;
+IDTX IDTXload(rpmts ts, rpmTag tag);
 
 /**
  * Load tag (instance,value) pairs from packages, and return sorted id index.
@@ -85,9 +70,6 @@ IDTX IDTXload(rpmts ts, rpmTag tag)
  * @param tag          rpm tag
  * @return             id index
  */
-/*@only@*/ /*@null@*/
-IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+IDTX IDTXglob(rpmts ts, const char * globstr, rpmTag tag);
 
 #endif /* H_RPMIDTX */
index 7f50af1..d48a9c6 100644 (file)
@@ -13,9 +13,7 @@
 #include "misc.h"
 #include "debug.h"
 
-/*@access StringBuf @*/
 
-/*@-boundswrite@*/
 char * rpmPermsString(int mode)
 {
     char *perms = xstrdup("----------");
@@ -28,10 +26,8 @@ char * rpmPermsString(int mode)
        perms[0] = 'l';
     else if (S_ISFIFO(mode)) 
        perms[0] = 'p';
-    /*@-unrecog@*/
     else if (S_ISSOCK(mode)) 
        perms[0] = 's';
-    /*@=unrecog@*/
     else if (S_ISCHR(mode))
        perms[0] = 'c';
     else if (S_ISBLK(mode))
@@ -62,10 +58,8 @@ char * rpmPermsString(int mode)
 
     return perms;
 }
-/*@=boundswrite@*/
 
 /**@todo Infinite loops through manifest files exist, operator error for now. */
-/*@-boundsread@*/
 rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr)
 {
     StringBuf sb = newStringBuf();
@@ -75,13 +69,10 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr)
     const char ** av = NULL;
     int argc = (argcPtr ? *argcPtr : 0);
     const char ** argv = (argvPtr ? *argvPtr : NULL);
-/*@+voidabstract@*/
     FILE * f = (FILE *) fdGetFp(fd);
-/*@=voidabstract@*/
     rpmRC rpmrc = RPMRC_OK;
     int i, j, next, npre;
 
-/*@-boundswrite@*/
     if (f != NULL)
     while (1) {
        char line[BUFSIZ];
@@ -116,10 +107,8 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr)
        appendStringBuf(sb, s);
     }
 
-    /*@-branchstate@*/
     if (s == NULL)             /* XXX always true */
        s = getStringBuf(sb);
-    /*@=branchstate@*/
 
     if (!(s && *s)) {
        rpmrc = RPMRC_NOTFOUND;
@@ -173,22 +162,15 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr)
     }
     if (argcPtr)
        *argcPtr = ac;
-/*@=boundswrite@*/
 
 exit:
-    /*@-branchstate@*/
     if (argvPtr == NULL || (rpmrc != RPMRC_OK && av)) {
        if (av)
-/*@-boundswrite@*/
        for (i = 0; i < ac; i++)
-           /*@-unqualifiedtrans@*/av[i] = _free(av[i]); /*@=unqualifiedtrans@*/
-/*@=boundswrite@*/
-       /*@-dependenttrans@*/ av = _free(av); /*@=dependenttrans@*/
+          av[i] = _free(av[i]);
+       av = _free(av);
     }
-    /*@=branchstate@*/
     sb = freeStringBuf(sb);
-    /*@-nullstate@*/ /* FIX: *argvPtr may be NULL. */
+    /* FIX: *argvPtr may be NULL. */
     return rpmrc;
-    /*@=nullstate@*/
 }
-/*@=boundsread@*/
index 6a331ee..7b3fc43 100644 (file)
@@ -15,12 +15,8 @@ extern "C" {
  * @param mode         file mode
  * @return             (malloc'd) formatted mode string
  */
-/*@-incondefs@*/
-/*@only@*/
 char * rpmPermsString(int mode)        
-       /*@*/
-       /*@ensures maxSet(result) == 10 /\ maxRead(result) == 10 @*/;
-/*@=incondefs@*/
+;
 
 /**
  * Read manifest, glob items, and append to existing args.
@@ -29,9 +25,7 @@ char * rpmPermsString(int mode)
  * @retval argvPtr     args themselves
  * @return             RPMRC_OK on success
  */
-rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies fd, *argcPtr, *argvPtr, fileSystem, internalState @*/;
+rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, const char *** argvPtr);
 
 #ifdef __cplusplus
 }
index 686cc0c..2fd3512 100644 (file)
@@ -27,7 +27,6 @@ rpmRC rpmMkdirPath (const char * dpath, const char * dname)
        case URL_IS_UNKNOWN:
            if (errno != ENOENT)
                break;
-           /*@fallthrough@*/
        case URL_IS_HTTPS:
        case URL_IS_HTTP:
        case URL_IS_FTP:
@@ -49,7 +48,6 @@ rpmRC rpmMkdirPath (const char * dpath, const char * dname)
     return RPMRC_OK;
 }
 
-/*@-bounds@*/
 char ** splitString(const char * str, int length, char sep)
 {
     const char * source;
@@ -83,17 +81,13 @@ char ** splitString(const char * str, int length, char sep)
 
     list[i] = NULL;
 
-/*@-nullret@*/ /* FIX: list[i] is NULL */
+/* FIX: list[i] is NULL */
     return list;
-/*@=nullret@*/
 }
-/*@=bounds@*/
 
 void freeSplitString(char ** list)
 {
-    /*@-unqualifiedtrans@*/
     list[0] = _free(list[0]);
-    /*@=unqualifiedtrans@*/
     list = _free(list);
 }
 
@@ -129,19 +123,15 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr)
     FD_t fd = NULL;
     int ran;
 
-    /*@-branchstate@*/
     if (!prefix) prefix = "";
-    /*@=branchstate@*/
 
     /* Create the temp directory if it doesn't already exist. */
-    /*@-branchstate@*/
     if (!_initialized) {
        _initialized = 1;
        tempfn = rpmGenPath(prefix, tpmacro, NULL);
        if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1))
            goto errxit;
     }
-    /*@=branchstate@*/
 
     /* XXX should probably use mkstemp here */
     srand(time(NULL));
@@ -168,12 +158,12 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr)
        case URL_IS_DASH:
        case URL_IS_HKP:
            goto errxit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case URL_IS_HTTPS:
        case URL_IS_HTTP:
        case URL_IS_FTP:
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
 
        fd = Fopen(tempfn, "w+x.ufdio");
@@ -208,21 +198,17 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr)
        break;
     }
 
-    /*@-branchstate@*/
     if (fnptr)
        *fnptr = tempfn;
     else 
        tempfn = _free(tempfn);
-    /*@=branchstate@*/
     *fdptr = fd;
 
     return 0;
 
 errxit:
     tempfn = _free(tempfn);
-    /*@-usereleased@*/
     if (fd != NULL) (void) Fclose(fd);
-    /*@=usereleased@*/
     return 1;
 }
 
@@ -261,7 +247,7 @@ int rpmHeaderGetEntry(Header h, int_32 tag, int_32 *type,
        }
        if (c)  *c = 0;
        return 0;
-    }  /*@notreached@*/ break;
+    }  break;
 
     case RPMTAG_GROUP:
     case RPMTAG_DESCRIPTION:
@@ -284,11 +270,10 @@ int rpmHeaderGetEntry(Header h, int_32 tag, int_32 *type,
            if (c)      *c = 0;
            return 0;
        }
-    }  /*@notreached@*/ break;
+    }  break;
 
     default:
        return headerGetEntry(h, tag, type, p, c);
-       /*@notreached@*/ break;
+       break;
     }
-    /*@notreached@*/
 }
index 7f90a39..180740a 100644 (file)
@@ -19,9 +19,7 @@ extern "C" {
  * @param dname                directory use string
  * @return             rpmRC return code
  */
-rpmRC rpmMkdirPath (const char * dpath, const char * dname)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies fileSystem, internalState @*/;
+rpmRC rpmMkdirPath (const char * dpath, const char * dname);
 
 /**
  * Split string into fields separated by a character.
@@ -30,15 +28,13 @@ rpmRC rpmMkdirPath (const char * dpath, const char * dname)
  * @param sep          separator character
  * @return             (malloc'd) argv array
  */
-/*@only@*/ char ** splitString(const char * str, int length, char sep)
-       /*@*/;
+char ** splitString(const char * str, int length, char sep);
 
 /**
  * Free split string argv array.
  * @param list         argv array
  */
-void freeSplitString( /*@only@*/ char ** list)
-       /*@modifies list @*/;
+void freeSplitString( char ** list);
 
 /**
  * Remove occurences of trailing character from string.
@@ -46,15 +42,12 @@ void freeSplitString( /*@only@*/ char ** list)
  * @param c            character to strip
  * @return             string
  */
-/*@unused@*/ static inline
-/*@only@*/ char * stripTrailingChar(/*@only@*/ char * s, char c)
-       /*@modifies *s */
+static inline
+char * stripTrailingChar(char * s, char c)
 {
     char * t;
-/*@-boundswrite@*/
     for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
        *t = '\0';
-/*@=boundswrite@*/
     return s;
 }
 
@@ -65,18 +58,14 @@ void freeSplitString( /*@only@*/ char ** list)
  * @param overwrite    should an existing variable be changed?
  * @return             0 on success
  */
-int dosetenv(const char * name, const char * value, int overwrite)
-       /*@globals environ@*/
-       /*@modifies *environ @*/;
+int dosetenv(const char * name, const char * value, int overwrite);
 
 /**
  * Like the libc function, but malloc()'s the space needed.
  * @param str          "name=value" string
  * @return             0 on success
  */
-int doputenv(const char * str)
-       /*@globals environ@*/
-       /*@modifies *environ @*/;
+int doputenv(const char * str);
 
 /**
  * Return file handle for a temporaray file.
@@ -91,20 +80,15 @@ int doputenv(const char * str)
  * @retval fdptr       temp file handle
  * @return             0 on success
  */
-int makeTempFile(/*@null@*/ const char * prefix,
-               /*@null@*/ /*@out@*/ const char ** fnptr,
-               /*@out@*/ FD_t * fdptr)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies *fnptr, *fdptr, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+int makeTempFile(const char * prefix,
+               const char ** fnptr,
+               FD_t * fdptr);
 
 /**
  * Return (malloc'd) current working directory.
  * @return             current working directory (malloc'ed)
  */
-/*@only@*/ char * currentDirectory(void)
-       /*@*/;
+char * currentDirectory(void);
 
 #ifdef __cplusplus
 }
index e793ba5..0f7c081 100644 (file)
 
 #define        alloca_strdup(_s)       strcpy(alloca(strlen(_s)+1), (_s))
 
-/*@access pgpDig @*/
-/*@access pgpDigParams @*/
-/*@access Header @*/           /* XXX compared with NULL */
-/*@access entryInfo @*/                /* XXX headerCheck */
-/*@access indexEntry @*/       /* XXX headerCheck */
-/*@access FD_t @*/             /* XXX stealing digests */
-
-/*@unchecked@*/
 static int _print_pkts = 0;
 
-/*@unchecked@*/
 static unsigned int nkeyids_max = 256;
-/*@unchecked@*/
 static unsigned int nkeyids = 0;
-/*@unchecked@*/
 static unsigned int nextkeyid  = 0;
-/*@unchecked@*/ /*@only@*/ /*@null@*/
 static unsigned int * keyids;
 
-/*@unchecked@*/
 static unsigned char header_magic[8] = {
         0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00
 };
@@ -48,7 +35,6 @@ static unsigned char header_magic[8] = {
 /**
  * Alignment needs (and sizeof scalars types) for internal rpm data types.
  */
-/*@observer@*/ /*@unchecked@*/
 static int typeAlign[16] =  {
     1, /*!< RPM_NULL_TYPE */
     1, /*!< RPM_CHAR_TYPE */
@@ -112,35 +98,35 @@ void headerMergeLegacySigs(Header h, const Header sigh)
        /* XXX Translate legacy signature tag values. */
        case RPMSIGTAG_SIZE:
            tag = RPMTAG_SIGSIZE;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_LEMD5_1:
            tag = RPMTAG_SIGLEMD5_1;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_PGP:
            tag = RPMTAG_SIGPGP;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_LEMD5_2:
            tag = RPMTAG_SIGLEMD5_2;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_MD5:
            tag = RPMTAG_SIGMD5;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_GPG:
            tag = RPMTAG_SIGGPG;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_PGP5:
            tag = RPMTAG_SIGPGP5;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_PAYLOADSIZE:
            tag = RPMTAG_ARCHIVESIZE;
-           /*@switchbreak@*/ break;
+           break;
        case RPMSIGTAG_SHA1:
        case RPMSIGTAG_DSA:
        case RPMSIGTAG_RSA:
        default:
            if (!(tag >= HEADER_SIGBASE && tag < HEADER_TAGBASE))
                continue;
-           /*@switchbreak@*/ break;
+           break;
        }
        if (ptr == NULL) continue;      /* XXX can't happen */
        if (!headerIsEntry(h, tag)) {
@@ -151,23 +137,23 @@ void headerMergeLegacySigs(Header h, const Header sigh)
            switch(type) {
            case RPM_NULL_TYPE:
                continue;
-               /*@notreached@*/ /*@switchbreak@*/ break;
+               break;
            case RPM_CHAR_TYPE:
            case RPM_INT8_TYPE:
            case RPM_INT16_TYPE:
            case RPM_INT32_TYPE:
                if (count != 1)
                    continue;
-               /*@switchbreak@*/ break;
+               break;
            case RPM_STRING_TYPE:
            case RPM_BIN_TYPE:
                if (count >= 16*1024)
                    continue;
-               /*@switchbreak@*/ break;
+               break;
            case RPM_STRING_ARRAY_TYPE:
            case RPM_I18NSTRING_TYPE:
                continue;
-               /*@notreached@*/ /*@switchbreak@*/ break;
+               break;
            }
            xx = hae(h, tag, type, ptr, count);
        }
@@ -192,31 +178,31 @@ Header headerRegenSigHeader(const Header h, int noArchiveSize)
        /* XXX Translate legacy signature tag values. */
        case RPMTAG_SIGSIZE:
            stag = RPMSIGTAG_SIZE;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_SIGLEMD5_1:
            stag = RPMSIGTAG_LEMD5_1;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_SIGPGP:
            stag = RPMSIGTAG_PGP;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_SIGLEMD5_2:
            stag = RPMSIGTAG_LEMD5_2;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_SIGMD5:
            stag = RPMSIGTAG_MD5;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_SIGGPG:
            stag = RPMSIGTAG_GPG;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_SIGPGP5:
            stag = RPMSIGTAG_PGP5;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_ARCHIVESIZE:
            /* XXX rpm-4.1 and later has archive size in signature header. */
            if (noArchiveSize)
                continue;
            stag = RPMSIGTAG_PAYLOADSIZE;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_SHA1HEADER:
        case RPMTAG_DSAHEADER:
        case RPMTAG_RSAHEADER:
@@ -224,7 +210,7 @@ Header headerRegenSigHeader(const Header h, int noArchiveSize)
            if (!(tag >= HEADER_SIGBASE && tag < HEADER_TAGBASE))
                continue;
            stag = tag;
-           /*@switchbreak@*/ break;
+           break;
        }
        if (ptr == NULL) continue;      /* XXX can't happen */
        if (!headerIsEntry(sigh, stag))
@@ -240,8 +226,6 @@ Header headerRegenSigHeader(const Header h, int noArchiveSize)
  * @return             0 if new keyid, otherwise 1
  */
 static int rpmtsStashKeyid(rpmts ts)
-       /*@globals nextkeyid, nkeyids, keyids @*/
-       /*@modifies nextkeyid, nkeyids, keyids @*/
 {
     const void * sig = rpmtsSig(ts);
     pgpDig dig = rpmtsDig(ts);
@@ -258,20 +242,16 @@ static int rpmtsStashKeyid(rpmts ts)
 
     if (keyids != NULL)
     for (i = 0; i < nkeyids; i++) {
-/*@-boundsread@*/
        if (keyid == keyids[i])
            return 1;
-/*@=boundsread@*/
     }
 
     if (nkeyids < nkeyids_max) {
        nkeyids++;
        keyids = xrealloc(keyids, nkeyids * sizeof(*keyids));
     }
-/*@-boundswrite@*/
     if (keyids)                /* XXX can't happen */
        keyids[nextkeyid] = keyid;
-/*@=boundswrite@*/
     nextkeyid++;
     nextkeyid %= nkeyids_max;
 
@@ -280,13 +260,10 @@ static int rpmtsStashKeyid(rpmts ts)
 
 int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negate)
 {
-/*@-castexpose@*/
     entryInfo pe = (entryInfo) pev;
-/*@=castexpose@*/
     entryInfo info = iv;
     int i;
 
-/*@-boundsread@*/
     for (i = 0; i < il; i++) {
        info->tag = ntohl(pe[i].tag);
        info->type = ntohl(pe[i].type);
@@ -305,7 +282,6 @@ int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negate)
            return i;
 
     }
-/*@=boundsread@*/
     return -1;
 }
 
@@ -327,13 +303,9 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
     pgpDig dig;
     char buf[8*BUFSIZ];
     int_32 * ei = (int_32 *) uh;
-/*@-boundsread@*/
     int_32 il = ntohl(ei[0]);
     int_32 dl = ntohl(ei[1]);
-/*@-castexpose@*/
     entryInfo pe = (entryInfo) &ei[2];
-/*@=castexpose@*/
-/*@=boundsread@*/
     int_32 ildl[2];
     int_32 pvlen = sizeof(ildl) + (il * sizeof(*pe)) + dl;
     unsigned char * dataStart = (unsigned char *) (pe + il);
@@ -353,9 +325,7 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
     static int hclvl;
 
     hclvl++;
-/*@-boundswrite@*/
     buf[0] = '\0';
-/*@=boundswrite@*/
 
     /* Is the blob the right size? */
     if (uc > 0 && pvlen != uc) {
@@ -376,7 +346,6 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
     }
 
     /* Is there an immutable header region tag? */
-/*@-sizeoftype@*/
     if (!(entry->info.tag == RPMTAG_HEADERIMMUTABLE
        && entry->info.type == RPM_BIN_TYPE
        && entry->info.count == REGION_TAG_COUNT))
@@ -384,7 +353,6 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
        rc = RPMRC_NOTFOUND;
        goto exit;
     }
-/*@=sizeoftype@*/
 
     /* Is the offset within the data area? */
     if (entry->info.offset >= dl) {
@@ -397,10 +365,7 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
 
     /* Is there an immutable header region tag trailer? */
     regionEnd = dataStart + entry->info.offset;
-/*@-sizeoftype@*/
-/*@-bounds@*/
     (void) memcpy(info, regionEnd, REGION_TAG_COUNT);
-/*@=bounds@*/
     regionEnd += REGION_TAG_COUNT;
 
     xx = headerVerifyInfo(1, dl, info, &entry->info, 1);
@@ -415,10 +380,7 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
                entry->info.offset, entry->info.count);
        goto exit;
     }
-/*@=sizeoftype@*/
-/*@-boundswrite@*/
     memset(info, 0, sizeof(*info));
-/*@=boundswrite@*/
 
     /* Is the no. of tags in the region less than the total no. of tags? */
     ril = entry->info.offset/sizeof(*pe);
@@ -442,12 +404,11 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
        switch (entry->info.tag) {
        case RPMTAG_SHA1HEADER:
            if (vsflags & RPMVSF_NOSHA1HEADER)
-               /*@switchbreak@*/ break;
+               break;
            blen = 0;
-/*@-boundsread@*/
            for (b = dataStart + entry->info.offset; *b != '\0'; b++) {
                if (strchr("0123456789abcdefABCDEF", *b) == NULL)
-                   /*@innerbreak@*/ break;
+                   break;
                blen++;
            }
            if (entry->info.type != RPM_STRING_TYPE || *b != '\0' || blen != 40)
@@ -455,40 +416,33 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
                (void) snprintf(buf, sizeof(buf), _("hdr SHA1: BAD, not hex\n"));
                goto exit;
            }
-/*@=boundsread@*/
            if (info->tag == 0) {
-/*@-boundswrite@*/
                *info = entry->info;    /* structure assignment */
-/*@=boundswrite@*/
                siglen = blen + 1;
            }
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_RSAHEADER:
            if (vsflags & RPMVSF_NORSAHEADER)
-               /*@switchbreak@*/ break;
+               break;
            if (entry->info.type != RPM_BIN_TYPE) {
                (void) snprintf(buf, sizeof(buf), _("hdr RSA: BAD, not binary\n"));
                goto exit;
            }
-/*@-boundswrite@*/
            *info = entry->info;        /* structure assignment */
-/*@=boundswrite@*/
            siglen = info->count;
-           /*@switchbreak@*/ break;
+           break;
        case RPMTAG_DSAHEADER:
            if (vsflags & RPMVSF_NODSAHEADER)
-               /*@switchbreak@*/ break;
+               break;
            if (entry->info.type != RPM_BIN_TYPE) {
                (void) snprintf(buf, sizeof(buf), _("hdr DSA: BAD, not binary\n"));
                goto exit;
            }
-/*@-boundswrite@*/
            *info = entry->info;        /* structure assignment */
-/*@=boundswrite@*/
            siglen = info->count;
-           /*@switchbreak@*/ break;
+           break;
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
     }
     rc = RPMRC_NOTFOUND;
@@ -496,10 +450,8 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc, const char ** msg)
 exit:
     /* Return determined RPMRC_OK/RPMRC_FAIL conditions. */
     if (rc != RPMRC_NOTFOUND) {
-/*@-boundswrite@*/
        buf[sizeof(buf)-1] = '\0';
        if (msg) *msg = xstrdup(buf);
-/*@=boundswrite@*/
        hclvl--;
        return rc;
     }
@@ -518,10 +470,8 @@ verifyinfo_exit:
            (void) snprintf(buf, sizeof(buf), "Header sanity check: OK\n");
            rc = RPMRC_OK;
        }
-/*@-boundswrite@*/
        buf[sizeof(buf)-1] = '\0';
        if (msg) *msg = xstrdup(buf);
-/*@=boundswrite@*/
        hclvl--;
        return rc;
     }
@@ -532,9 +482,7 @@ verifyinfo_exit:
        goto verifyinfo_exit;
     dig->nbytes = 0;
 
-/*@-boundsread@*/
     sig = memcpy(xmalloc(siglen), dataStart + info->offset, siglen);
-/*@=boundsread@*/
     (void) rpmtsSetSig(ts, info->tag, info->type, sig, info->count);
 
     switch (info->tag) {
@@ -590,13 +538,10 @@ verifyinfo_exit:
            rc = RPMRC_FAIL;
            goto exit;
        }
-       /*@fallthrough@*/
     case RPMTAG_SHA1HEADER:
-/*@-boundswrite@*/
        ildl[0] = htonl(ril);
        ildl[1] = (regionEnd - dataStart);
        ildl[1] = htonl(ildl[1]);
-/*@=boundswrite@*/
 
        (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DIGEST), 0);
        dig->hdrsha1ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE);
@@ -628,15 +573,11 @@ verifyinfo_exit:
        break;
     }
 
-/*@-boundswrite@*/
     buf[0] = '\0';
-/*@=boundswrite@*/
     rc = rpmVerifySignature(ts, buf);
 
-/*@-boundswrite@*/
     buf[sizeof(buf)-1] = '\0';
     if (msg) *msg = xstrdup(buf);
-/*@=boundswrite@*/
 
     /* XXX headerCheck can recurse, free info only at top level. */
     if (hclvl == 1)
@@ -660,14 +601,12 @@ rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, const char ** msg)
     rpmRC rc = RPMRC_FAIL;             /* assume failure */
     int xx;
 
-/*@-boundswrite@*/
     buf[0] = '\0';
 
     if (hdrp)
        *hdrp = NULL;
     if (msg)
        *msg = NULL;
-/*@=boundswrite@*/
 
     memset(block, 0, sizeof(block));
     if ((xx = timedRead(fd, (char *)block, sizeof(block))) != sizeof(block)) {
@@ -679,30 +618,23 @@ rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, const char ** msg)
        (void) snprintf(buf, sizeof(buf), _("hdr magic: BAD\n"));
        goto exit;
     }
-/*@-boundsread@*/
     il = ntohl(block[2]);
-/*@=boundsread@*/
     if (hdrchkTags(il)) {
        (void) snprintf(buf, sizeof(buf),
                _("hdr tags: BAD, no. of tags(%d) out of range\n"), il);
 
        goto exit;
     }
-/*@-boundsread@*/
     dl = ntohl(block[3]);
-/*@=boundsread@*/
     if (hdrchkData(dl)) {
        (void) snprintf(buf, sizeof(buf),
                _("hdr data: BAD, no. of bytes(%d) out of range\n"), dl);
        goto exit;
     }
 
-/*@-sizeoftype@*/
     nb = (il * sizeof(struct entryInfo_s)) + dl;
-/*@=sizeoftype@*/
     uc = sizeof(il) + sizeof(dl) + nb;
     ei = xmalloc(uc);
-/*@-bounds@*/
     ei[0] = block[2];
     ei[1] = block[3];
     if ((xx = timedRead(fd, (char *)&ei[2], nb)) != nb) {
@@ -710,7 +642,6 @@ rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, const char ** msg)
                _("hdr blob(%d): BAD, read returned %d\n"), nb, xx);
        goto exit;
     }
-/*@=bounds@*/
 
     /* Sanity check header tags */
     rc = headerCheck(ts, ei, uc, msg);
@@ -727,24 +658,19 @@ rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp, const char ** msg)
     ei = NULL; /* XXX will be freed with header */
     
 exit:
-/*@-boundswrite@*/
     if (hdrp && h && rc == RPMRC_OK)
        *hdrp = headerLink(h);
-/*@=boundswrite@*/
     ei = _free(ei);
     h = headerFree(h);
 
-/*@-boundswrite@*/
     if (msg != NULL && *msg == NULL && buf[0] != '\0') {
        buf[sizeof(buf)-1] = '\0';
        *msg = xstrdup(buf);
     }
-/*@=boundswrite@*/
 
     return rc;
 }
 
-/*@-bounds@*/  /* LCL: segfault */
 rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
 {
     pgpDig dig;
@@ -769,9 +695,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
 
 #ifdef DYING
     {  struct stat st;
-/*@-boundswrite@*/
        memset(&st, 0, sizeof(st));
-/*@=boundswrite@*/
        (void) fstat(Fileno(fd), &st);
        /* if fd points to a socket, pipe, etc, st.st_size is *always* zero */
        if (S_ISREG(st.st_mode) && st.st_size < sizeof(*l)) {
@@ -792,7 +716,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
            _("packaging version 1 is not supported by this version of RPM\n"));
        rc = RPMRC_NOTFOUND;
        goto exit;
-       /*@notreached@*/ break;
+       break;
     case 2:
     case 3:
     case 4:
@@ -802,7 +726,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
                "is supported by this version of RPM\n"));
        rc = RPMRC_NOTFOUND;
        goto exit;
-       /*@notreached@*/ break;
+       break;
     }
 
     /* Read the signature header. */
@@ -814,7 +738,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
                (msg && *msg ? msg : "\n"));
        msg = _free(msg);
        goto exit;
-       /*@notreached@*/ break;
+       break;
     case RPMRC_OK:
        if (sigh == NULL) {
            rpmError(RPMERR_SIGGEN, _("%s: No signature available\n"), fn);
@@ -875,11 +799,9 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
     /* XXX repackaged packages have appended tags, legacy dig/sig check fails */
     if (opx > 0)
        (void) rpmswEnter(rpmtsOp(ts, opx), 0);
-/*@-type@*/    /* XXX arrow access of non-pointer (FDSTAT_t) */
     nb = -fd->stats->ops[FDSTAT_READ].bytes;
     rc = rpmReadHeader(ts, fd, &h, &msg);
     nb += fd->stats->ops[FDSTAT_READ].bytes;
-/*@=type@*/
     if (opx > 0)
        (void) rpmswExit(rpmtsOp(ts, opx), nb);
 
@@ -950,7 +872,6 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
            rc = RPMRC_FAIL;
            goto exit;
        }
-       /*@fallthrough@*/
     case RPMSIGTAG_SHA1:
     {  void * uh = NULL;
        int_32 uht;
@@ -982,7 +903,6 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
            rc = RPMRC_FAIL;
            goto exit;
        }
-       /*@fallthrough@*/
     case RPMSIGTAG_MD5:
        /* Legacy signatures need the compressed payload in the digest too. */
        (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DIGEST), 0);
@@ -1006,7 +926,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
            case PGPHASHALGO_MD5:
                dig->md5ctx = fddig->hashctx;
                fddig->hashctx = NULL;
-               /*@switchbreak@*/ break;
+               break;
            case PGPHASHALGO_SHA1:
 #if HAVE_BEECRYPT_API_H
            case PGPHASHALGO_SHA256:
@@ -1015,9 +935,9 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
 #endif
                dig->sha1ctx = fddig->hashctx;
                fddig->hashctx = NULL;
-               /*@switchbreak@*/ break;
+               break;
            default:
-               /*@switchbreak@*/ break;
+               break;
            }
        }
        break;
@@ -1025,9 +945,7 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
 
 /** @todo Implement disable/enable/warn/error/anal policy. */
 
-/*@-boundswrite@*/
     buf[0] = '\0';
-/*@=boundswrite@*/
     rc = rpmVerifySignature(ts, buf);
     switch (rc) {
     case RPMRC_OK:             /* Signature is OK. */
@@ -1057,9 +975,7 @@ exit:
        headerMergeLegacySigs(h, sigh);
 
        /* Bump reference count for return. */
-/*@-boundswrite@*/
        *hdrp = headerLink(h);
-/*@=boundswrite@*/
     }
     h = headerFree(h);
     rpmtsCleanDig(ts);
@@ -1105,4 +1021,3 @@ rpmRC headerCheckPayloadFormat(Header h) {
 }
 
 
-/*@=bounds@*/
index 14b2461..481177e 100644 (file)
@@ -19,108 +19,71 @@ const char *__progname;
 #define POPT_RCFILE            -995
 #endif
 
-/*@unchecked@*/
 static int _debug = 0;
 
-/*@-exportheadervar@*/
-/*@unchecked@*/
 extern int _rpmds_nopromote;
 
-/*@unchecked@*/
 extern int _fps_debug;
 
-/*@unchecked@*/
 extern int _fsm_debug;
 
-/*@unchecked@*/
 extern int _fsm_threads;
 
-/*@unchecked@*/
 extern int _hdr_debug;
 
-/*@unchecked@*/
 extern int _print_pkts;
 
-/*@unchecked@*/
 extern int _psm_debug;
 
-/*@unchecked@*/
 extern int _psm_threads;
 
-/*@unchecked@*/
 extern int _rpmal_debug;
 
-/*@unchecked@*/
 extern int _rpmdb_debug;
 
-/*@unchecked@*/
 extern int _rpmds_debug;
 
 /* XXX avoid -lrpmbuild linkage. */
-/*@unchecked@*/
        int _rpmfc_debug;
 
-/*@unchecked@*/
 extern int _rpmfi_debug;
 
-/*@unchecked@*/
 extern int _rpmgi_debug;
 
-/*@unchecked@*/
 extern int _rpmps_debug;
 
-/*@unchecked@*/
 extern int _rpmsq_debug;
 
-/*@unchecked@*/
 extern int _rpmte_debug;
 
-/*@unchecked@*/
 extern int _rpmts_debug;
 
-/*@unchecked@*/
 extern int _rpmts_stats;
 
-/*@unchecked@*/
 extern int noLibio;
-/*@=exportheadervar@*/
 
-/*@unchecked@*/
 const char * rpmcliPipeOutput = NULL;
 
-/*@unchecked@*/
 const char * rpmcliRcfile = NULL;
 
-/*@unchecked@*/
 const char * rpmcliRootDir = "/";
 
-/*@unchecked@*/
 rpmQueryFlags rpmcliQueryFlags;
 
-/*@-exportheadervar@*/
-/*@unchecked@*/
 extern int _ftp_debug;
-/*@unchecked@*/
 extern int _av_debug;
-/*@unchecked@*/
 extern int _dav_debug;
 
-/*@unchecked@*/
 extern int noLibio;
 
-/*@unchecked@*/
 extern int _rpmio_debug;
-/*@=exportheadervar@*/
 
-/*@unchecked@*/
 static int rpmcliInitialized = -1;
 
 /**
  * Display rpm version.
  */
 static void printVersion(FILE * fp)
-       /*@globals rpmEVR, fileSystem @*/
-       /*@modifies *fp, fileSystem @*/
 {
     fprintf(fp, _("RPM version %s\n"), rpmEVR);
 }
@@ -129,12 +92,7 @@ static void printVersion(FILE * fp)
  * Make sure that config files have been read.
  * @warning Options like --rcfile and --verbose must precede callers option.
  */
-/*@mayexit@*/
 void rpmcliConfigured(void)
-       /*@globals rpmcliInitialized, rpmCLIMacroContext, rpmGlobalMacroContext,
-               h_errno, fileSystem, internalState @*/
-       /*@modifies rpmcliInitialized, rpmCLIMacroContext, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
 {
 
     if (rpmcliInitialized < 0)
@@ -145,19 +103,13 @@ void rpmcliConfigured(void)
 
 /**
  */
-/*@-bounds@*/
-static void rpmcliAllArgCallback( /*@unused@*/ poptContext con,
-                /*@unused@*/ enum poptCallbackReason reason,
+static void rpmcliAllArgCallback( poptContext con,
+                enum poptCallbackReason reason,
                 const struct poptOption * opt, const char * arg,
-                /*@unused@*/ const void * data)
-       /*@globals rpmcliQueryFlags, rpmCLIMacroContext, rpmGlobalMacroContext,
-               h_errno, fileSystem, internalState @*/
-       /*@modifies rpmcliQueryFlags, rpmCLIMacroContext, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
+                const void * data)
 {
 
     /* XXX avoid accidental collisions with POPT_BIT_SET for flags */
-    /*@-branchstate@*/
     if (opt->arg == NULL)
     switch (opt->val) {
     case 'q':
@@ -174,10 +126,8 @@ static void rpmcliAllArgCallback( /*@unused@*/ poptContext con,
        if (rpmcliInitialized < 0)
            (void) rpmDefineMacro(NULL, arg, RMIL_CMDLINE);
        rpmcliConfigured();
-/*@-type@*/
        (void) rpmDefineMacro(NULL, arg, RMIL_CMDLINE);
        (void) rpmDefineMacro(rpmCLIMacroContext, arg, RMIL_CMDLINE);
-/*@=type@*/
        break;
     case 'E':
        rpmcliConfigured();
@@ -189,16 +139,16 @@ static void rpmcliAllArgCallback( /*@unused@*/ poptContext con,
     case POPT_SHOWVERSION:
        printVersion(stdout);
        exit(EXIT_SUCCESS);
-       /*@notreached@*/ break;
+       break;
     case POPT_SHOWRC:
        rpmcliConfigured();
        (void) rpmShowRC(stdout);
        exit(EXIT_SUCCESS);
-       /*@notreached@*/ break;
+       break;
     case POPT_QUERYTAGS:
        rpmDisplayQueryTags(stdout);
        exit(EXIT_SUCCESS);
-       /*@notreached@*/ break;
+       break;
 #if defined(POPT_RCFILE)
     case POPT_RCFILE:          /* XXX FIXME: noop for now */
        break;
@@ -215,13 +165,10 @@ static void rpmcliAllArgCallback( /*@unused@*/ poptContext con,
        rpmcliQueryFlags |= VERIFY_HDRCHK;
        break;
     }
-    /*@=branchstate@*/
 }
 
-/*@unchecked@*/
 int ftsOpts = 0;
 
-/*@unchecked@*/
 struct poptOption rpmcliFtsPoptTable[] = {
  { "comfollow", '\0', POPT_BIT_SET,    &ftsOpts, FTS_COMFOLLOW,
        N_("FTS_COMFOLLOW: follow command line symlinks"), NULL },
@@ -242,13 +189,10 @@ struct poptOption rpmcliFtsPoptTable[] = {
    POPT_TABLEEND
 };
 
-/*@-bitwisesigned -compmempass @*/
-/*@unchecked@*/
 struct poptOption rpmcliAllPoptTable[] = {
-/*@-type@*/ /* FIX: cast? */
+/* FIX: cast? */
  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
         rpmcliAllArgCallback, 0, NULL, NULL },
-/*@=type@*/
 
  { "debug", 'd', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_debug, -1,
         NULL, NULL },
@@ -365,7 +309,6 @@ struct poptOption rpmcliAllPoptTable[] = {
 
    POPT_TABLEEND
 };
-/*@=bitwisesigned =compmempass @*/
 
 poptContext
 rpmcliFini(poptContext optCon)
@@ -373,15 +316,12 @@ rpmcliFini(poptContext optCon)
     optCon = poptFreeContext(optCon);
 
 #if HAVE_MCHECK_H && HAVE_MTRACE
-    /*@-noeffect@*/
     muntrace();   /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
-    /*@=noeffect@*/
 #endif
 
     return NULL;
 }
 
-/*@-globstate@*/
 poptContext
 rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
 {
@@ -390,11 +330,8 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
     int rc;
 
 #if HAVE_MCHECK_H && HAVE_MTRACE
-    /*@-noeffect@*/
     mtrace();   /* Trace malloc only if MALLOC_TRACE=mtrace-output-file. */
-    /*@=noeffect@*/
 #endif
-/*@-globs -mods@*/
     setprogname(argv[0]);       /* Retrofit glibc __progname */
 
     /* XXX glibc churn sanity */
@@ -402,7 +339,6 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
        if ((__progname = strrchr(argv[0], '/')) != NULL) __progname++;
        else __progname = argv[0];
     }
-/*@=globs =mods@*/
 
 #if defined(ENABLE_NLS)
     (void) setlocale(LC_ALL, "" );
@@ -418,9 +354,7 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
        return NULL;
     }
 
-/*@-nullpass -temptrans@*/
     optCon = poptGetContext(__progname, argc, (const char **)argv, optionsTable, 0);
-/*@=nullpass =temptrans@*/
     (void) poptReadConfigFile(optCon, LIBRPMALIAS_FILENAME);
     (void) poptReadDefaultConfig(optCon, 1);
     poptSetExecPath(optCon, RPMCONFIGDIR, 1);
@@ -430,22 +364,18 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
        optArg = poptGetOptArg(optCon);
        switch (rc) {
        default:
-/*@-nullpass@*/
            fprintf(stderr, _("%s: option table misconfigured (%d)\n"),
                __progname, rc);
-/*@=nullpass@*/
            exit(EXIT_FAILURE);
 
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
         }
     }
 
     if (rc < -1) {
-/*@-nullpass@*/
        fprintf(stderr, "%s: %s: %s\n", __progname,
                poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
                poptStrerror(rc));
-/*@=nullpass@*/
        exit(EXIT_FAILURE);
     }
 
@@ -459,4 +389,3 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
 
     return optCon;
 }
-/*@=globstate@*/
index 28b99dd..16dc7a6 100644 (file)
@@ -9,11 +9,8 @@
 
 #include "debug.h"
 
-/*@-redecl@*/
 extern time_t get_date(const char * p, void * now);    /* XXX expedient lies */
-/*@=redecl@*/
 
-/*@unchecked@*/
 struct rpmInstallArguments_s rpmIArgs = {
     0,                 /* transFlags */
     0,                 /* probFilter */
@@ -33,31 +30,22 @@ struct rpmInstallArguments_s rpmIArgs = {
 #define        POPT_EXCLUDEPATH        -1022
 #define        POPT_ROLLBACK           -1023
 
-/*@exits@*/
 static void argerror(const char * desc)
-       /*@globals stderr, fileSystem @*/
-       /*@modifies stderr, fileSystem @*/
 {
-    /*@-modfilesys -globs @*/
     fprintf(stderr, _("%s: %s\n"), __progname, desc);
-    /*@=modfilesys =globs @*/
     exit(EXIT_FAILURE);
 }
 
 /**
  */
-/*@-bounds@*/
-static void installArgCallback( /*@unused@*/ poptContext con,
-               /*@unused@*/ enum poptCallbackReason reason,
+static void installArgCallback( poptContext con,
+               enum poptCallbackReason reason,
                const struct poptOption * opt, const char * arg,
-               /*@unused@*/ const void * data)
-       /*@globals rpmIArgs, stderr, fileSystem @*/
-       /*@modifies rpmIArgs, stderr, fileSystem @*/
+               const void * data)
 {
     struct rpmInstallArguments_s * ia = &rpmIArgs;
 
     /* XXX avoid accidental collisions with POPT_BIT_SET for flags */
-    /*@-branchstate@*/
     if (opt->arg == NULL)
     switch (opt->val) {
 
@@ -70,9 +58,7 @@ static void installArgCallback( /*@unused@*/ poptContext con,
            argerror(_("exclude paths must begin with a /"));
        ia->relocations = xrealloc(ia->relocations, 
                        sizeof(*ia->relocations) * (ia->numRelocations + 1));
-/*@-temptrans@*/
        ia->relocations[ia->numRelocations].oldPath = xstrdup(arg);
-/*@=temptrans@*/
        ia->relocations[ia->numRelocations].newPath = NULL;
        ia->numRelocations++;
        break;
@@ -90,12 +76,8 @@ static void installArgCallback( /*@unused@*/ poptContext con,
            argerror(_("relocations must have a / following the ="));
        ia->relocations = xrealloc(ia->relocations, 
                        sizeof(*ia->relocations) * (ia->numRelocations + 1));
-/*@-temptrans@*/
        ia->relocations[ia->numRelocations].oldPath = oldPath;
-/*@=temptrans@*/
-/*@-kepttrans -usereleased @*/
        ia->relocations[ia->numRelocations].newPath = newPath;
-/*@=kepttrans =usereleased @*/
        ia->numRelocations++;
       }        break;
 
@@ -104,9 +86,7 @@ static void installArgCallback( /*@unused@*/ poptContext con,
        if (arg == NULL)
            argerror(_("rollback takes a time/date stamp argument"));
 
-       /*@-moduncon@*/
        tid = get_date(arg, NULL);
-       /*@=moduncon@*/
 
        if (tid == (time_t)-1 || tid == (time_t)0)
            argerror(_("malformed rollback time/date stamp argument"));
@@ -150,19 +130,14 @@ static void installArgCallback( /*@unused@*/ poptContext con,
        break;
 
     }
-    /*@=branchstate@*/
 }
-/*@=bounds@*/
 
 /**
  */
-/*@-bitwisesigned -compmempass @*/
-/*@unchecked@*/
 struct poptOption rpmInstallPoptTable[] = {
-/*@-type@*/ /* FIX: cast? */
+/* FIX: cast? */
  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
        installArgCallback, 0, NULL, NULL },
-/*@=type@*/
 
  { "aid", '\0', POPT_BIT_SET, &rpmIArgs.transFlags, RPMTRANS_FLAG_ADDINDEPS,
        N_("add suggested packages to transaction"), NULL },
@@ -334,4 +309,3 @@ struct poptOption rpmInstallPoptTable[] = {
 
    POPT_TABLEEND
 };
-/*@=bitwisesigned =compmempass @*/
index 3816b10..79d80b9 100644 (file)
 
 #include "debug.h"
 
-/*@unchecked@*/
 struct rpmQVKArguments_s rpmQVKArgs;
 
-/*@unchecked@*/
 int specedit = 0;
 
 #define POPT_QUERYFORMAT       -1000
@@ -31,12 +29,10 @@ int specedit = 0;
 #define POPT_FTSWALK           -1012
 
 /* ========== Query/Verify/Signature source args */
-static void rpmQVSourceArgCallback( /*@unused@*/ poptContext con,
-               /*@unused@*/ enum poptCallbackReason reason,
-               const struct poptOption * opt, /*@unused@*/ const char * arg, 
-               /*@unused@*/ const void * data)
-       /*@globals rpmQVKArgs @*/
-       /*@modifies rpmQVKArgs @*/
+static void rpmQVSourceArgCallback( poptContext con,
+               enum poptCallbackReason reason,
+               const struct poptOption * opt, const char * arg, 
+               const void * data)
 {
     QVA_t qva = &rpmQVKArgs;
 
@@ -92,12 +88,10 @@ static void rpmQVSourceArgCallback( /*@unused@*/ poptContext con,
 /**
  * Common query/verify mode options.
  */
-/*@unchecked@*/
 struct poptOption rpmQVSourcePoptTable[] = {
-/*@-type@*/ /* FIX: cast? */
+/* FIX: cast? */
  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA, 
        rpmQVSourceArgCallback, 0, NULL, NULL },
-/*@=type@*/
  { "all", 'a', 0, 0, 'a',
        N_("query/verify all packages"), NULL },
  { "checksig", 'K', POPT_ARGFLAG_DOC_HIDDEN, NULL, 'K',
@@ -156,11 +150,9 @@ struct poptOption rpmQVSourcePoptTable[] = {
 /* ========== Query specific popt args */
 
 static void queryArgCallback(poptContext con,
-               /*@unused@*/enum poptCallbackReason reason,
+               enum poptCallbackReason reason,
                const struct poptOption * opt, const char * arg, 
-               /*@unused@*/ const void * data)
-       /*@globals rpmQVKArgs @*/
-       /*@modifies con, rpmQVKArgs @*/
+               const void * data)
 {
     QVA_t qva = &rpmQVKArgs;
 
@@ -176,27 +168,21 @@ static void queryArgCallback(poptContext con,
     case POPT_QUERYFORMAT:
        if (arg) {
            char * qf = (char *)qva->qva_queryFormat;
-           /*@-branchstate@*/
            if (qf) {
                int len = strlen(qf) + strlen(arg) + 1;
                qf = xrealloc(qf, len);
-/*@-boundswrite@*/
                strcat(qf, arg);
-/*@=boundswrite@*/
            } else {
                qf = xmalloc(strlen(arg) + 1);
                strcpy(qf, arg);
            }
-           /*@=branchstate@*/
            qva->qva_queryFormat = qf;
        }
        break;
 
     case 'i':
        if (qva->qva_mode == 'q') {
-           /*@-nullassign -readonlytrans@*/
            const char * infoCommand[] = { "--info", NULL };
-           /*@=nullassign =readonlytrans@*/
            (void) poptStuffArgs(con, infoCommand);
        }
        break;
@@ -245,12 +231,10 @@ static void queryArgCallback(poptContext con,
 /**
  * Query mode options.
  */
-/*@unchecked@*/
 struct poptOption rpmQueryPoptTable[] = {
-/*@-type@*/ /* FIX: cast? */
+/* FIX: cast? */
  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE, 
        queryArgCallback, 0, NULL, NULL },
-/*@=type@*/
  { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmQVSourcePoptTable, 0,
        NULL, NULL },
  { "configfiles", 'c', 0, 0, 'c',
@@ -292,10 +276,9 @@ struct poptOption rpmQueryPoptTable[] = {
  * Verify mode options.
  */
 struct poptOption rpmVerifyPoptTable[] = {
-/*@-type@*/ /* FIX: cast? */
+/* FIX: cast? */
  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE, 
        queryArgCallback, 0, NULL, NULL },
-/*@=type@*/
  { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmQVSourcePoptTable, 0,
        NULL, NULL },
 
@@ -389,12 +372,10 @@ struct poptOption rpmVerifyPoptTable[] = {
 /**
  * Signature mode options.
  */
-/*@unchecked@*/
 struct poptOption rpmSignPoptTable[] = {
-/*@-type@*/ /* FIX: cast? */
+/* FIX: cast? */
  { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA | POPT_CBFLAG_CONTINUE,
        rpmQVSourceArgCallback, 0, NULL, NULL },
-/*@=type@*/
  { "addsign", '\0', 0, NULL, 'A',
        N_("sign package(s) (identical to --resign)"), NULL },
  { "checksig", 'K', 0, NULL, 'K',
index a47c08f..4e5bce6 100644 (file)
--- a/lib/psm.c
+++ b/lib/psm.c
 #include "debug.h"
 
 #define        _PSM_DEBUG      0
-/*@unchecked@*/
 int _psm_debug = _PSM_DEBUG;
-/*@unchecked@*/
 int _psm_threads = 0;
 
 /* Give access to the rpmte global tracking the last instance added
  * to the database.
  */
-/*@-exportheadervar@*/
-/*@unchecked@*/
 extern unsigned int myinstall_instance;
-/*@=exportheadervar@*/
-
-/*@access FD_t @*/             /* XXX void ptr args */
-/*@access rpmpsm @*/
-
-/*@access rpmfi @*/
-/*@access rpmte @*/    /* XXX rpmInstallSourcePackage */
-/*@access rpmts @*/    /* XXX ts->notify */
-
-/*@access rpmluav @*/
-/*@access rpmtsScore @*/
-/*@access rpmtsScoreEntry @*/
 
 int rpmVersionCompare(Header first, Header second)
 {
@@ -70,12 +54,10 @@ int rpmVersionCompare(Header first, Header second)
     if (!headerGetEntry(second, RPMTAG_EPOCH, NULL, (void **) &epochTwo, NULL))
        epochTwo = &zero;
 
-/*@-boundsread@*/
        if (*epochOne < *epochTwo)
            return -1;
        else if (*epochOne > *epochTwo)
            return 1;
-/*@=boundsread@*/
 
     rc = headerGetEntry(first, RPMTAG_VERSION, NULL, (void **) &one, NULL);
     rc = headerGetEntry(second, RPMTAG_VERSION, NULL, (void **) &two, NULL);
@@ -94,9 +76,8 @@ int rpmVersionCompare(Header first, Header second)
  * Macros to be defined from per-header tag values.
  * @todo Should other macros be added from header when installing a package?
  */
-/*@observer@*/ /*@unchecked@*/
 static struct tagMacro {
-/*@observer@*/ /*@null@*/ const char * macroname; /*!< Macro name to define. */
+const char *   macroname; /*!< Macro name to define. */
     rpmTag     tag;            /*!< Header tag to use for value. */
 } tagMacros[] = {
     { "name",          RPMTAG_NAME },
@@ -113,14 +94,12 @@ static struct tagMacro {
  * @return             0 always
  */
 static int rpmInstallLoadMacros(rpmfi fi, Header h)
-       /*@globals rpmGlobalMacroContext @*/
-       /*@modifies rpmGlobalMacroContext @*/
 {
     HGE_t hge = (HGE_t) fi->hge;
     struct tagMacro * tagm;
     union {
-/*@unused@*/ void * ptr;
-/*@unused@*/ const char ** argv;
+void * ptr;
+const char ** argv;
        const char * str;
        int_32 * i32p;
     } body;
@@ -132,14 +111,12 @@ static int rpmInstallLoadMacros(rpmfi fi, Header h)
            continue;
        switch (type) {
        case RPM_INT32_TYPE:
-/*@-boundsread@*/
            sprintf(numbuf, "%d", *body.i32p);
-/*@=boundsread@*/
            addMacro(NULL, tagm->macroname, NULL, numbuf, -1);
-           /*@switchbreak@*/ break;
+           break;
        case RPM_STRING_TYPE:
            addMacro(NULL, tagm->macroname, NULL, body.str, -1);
-           /*@switchbreak@*/ break;
+           break;
        case RPM_NULL_TYPE:
        case RPM_CHAR_TYPE:
        case RPM_INT8_TYPE:
@@ -148,7 +125,7 @@ static int rpmInstallLoadMacros(rpmfi fi, Header h)
        case RPM_STRING_ARRAY_TYPE:
        case RPM_I18NSTRING_TYPE:
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
     }
     return 0;
@@ -159,10 +136,7 @@ static int rpmInstallLoadMacros(rpmfi fi, Header h)
  * @param psm          package state machine data
  * @return             0 always
  */
-/*@-bounds@*/
 static rpmRC markReplacedFiles(const rpmpsm psm)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     const rpmts ts = psm->ts;
     rpmfi fi = psm->fi;
@@ -233,7 +207,6 @@ static rpmRC markReplacedFiles(const rpmpsm psm)
 
     return RPMRC_OK;
 }
-/*@=bounds@*/
 
 rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
                const char ** specFilePtr, const char ** cookie)
@@ -263,7 +236,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
        break;
     default:
        goto exit;
-       /*@notreached@*/ break;
+       break;
     }
     if (h == NULL)
        goto exit;
@@ -291,27 +264,21 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
        goto exit;
     }
 
-/*@-onlytrans@*/       /* FIX: te reference */
     fi->te = rpmtsElement(ts, 0);
-/*@=onlytrans@*/
     if (fi->te == NULL) {      /* XXX can't happen */
        rpmrc = RPMRC_FAIL;
        goto exit;
     }
 
-/*@-nullpass@*/                /* FIX fi->h may be null */
     fi->te->h = headerLink(fi->h);
-/*@=nullpass@*/
     fi->te->fd = fdLink(fd, "installSourcePackage");
     hge = fi->hge;
     hfd = fi->hfd;
 
-/*@i@*/ (void) rpmInstallLoadMacros(fi, fi->h);
+(void) rpmInstallLoadMacros(fi, fi->h);
 
     psm->fi = rpmfiLink(fi, NULL);
-    /*@-assignexpose -usereleased @*/
     psm->te = fi->te;
-    /*@=assignexpose =usereleased @*/
 
     if (cookie) {
        *cookie = NULL;
@@ -320,7 +287,7 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
     }
 
     /* XXX FIXME: can't do endian neutral MD5 verification yet. */
-/*@i@*/ fi->fmd5s = hfd(fi->fmd5s, -1);
+fi->fmd5s = hfd(fi->fmd5s, -1);
 
     /* XXX FIXME: don't do per-file mapping, force global flags. */
     fi->fmapflags = _free(fi->fmapflags);
@@ -373,21 +340,17 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
        int sourcelen = strlen(_sourcedir) + 2;
        char * t;
 
-/*@i@*/        fi->dnl = hfd(fi->dnl, -1);
+       fi->dnl = hfd(fi->dnl, -1);
 
        fi->dc = 2;
        fi->dnl = xmalloc(fi->dc * sizeof(*fi->dnl)
                        + fi->fc * sizeof(*fi->dil)
                        + speclen + sourcelen);
-       /*@-dependenttrans@*/
        fi->dil = (unsigned int *)(fi->dnl + fi->dc);
-       /*@=dependenttrans@*/
        memset(fi->dil, 0, fi->fc * sizeof(*fi->dil));
        fi->dil[i] = 1;
-       /*@-dependenttrans@*/
        fi->dnl[0] = t = (char *)(fi->dil + fi->fc);
        fi->dnl[1] = t = stpcpy( stpcpy(t, _sourcedir), "/") + 1;
-       /*@=dependenttrans@*/
        (void) stpcpy( stpcpy(t, _specdir), "/");
 
        t = xmalloc(speclen + strlen(fi->bnl[i]) + 1);
@@ -401,11 +364,10 @@ rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
 
     psm->goal = PSM_PKGINSTALL;
 
-    /*@-compmempass@*/ /* FIX: psm->fi->dnl should be owned. */
+       /* FIX: psm->fi->dnl should be owned. */
     rpmrc = rpmpsmStage(psm, PSM_PROCESS);
 
     (void) rpmpsmStage(psm, PSM_FINI);
-    /*@=compmempass@*/
 
     if (rpmrc) rpmrc = RPMRC_FAIL;
 
@@ -423,7 +385,6 @@ exit:
 
     if (h != NULL) h = headerFree(h);
 
-    /*@-branchstate@*/
     if (fi != NULL) {
        fi->te->h = headerFree(fi->te->h);
        if (fi->te->fd != NULL)
@@ -432,7 +393,6 @@ exit:
        fi->te = NULL;
        fi = rpmfiFree(fi);
     }
-    /*@=branchstate@*/
 
     /* XXX nuke the added package(s). */
     rpmtsClean(ts);
@@ -442,7 +402,6 @@ exit:
     return rpmrc;
 }
 
-/*@observer@*/ /*@unchecked@*/
 static char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
 
 /**
@@ -450,8 +409,7 @@ static char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
  * @param tag          scriptlet tag
  * @return             name of scriptlet
  */
-static /*@observer@*/ const char * tag2sln(int tag)
-       /*@*/
+static const char * tag2sln(int tag)
 {
     switch (tag) {
     case RPMTAG_PRETRANS:       return "%pretrans";
@@ -475,8 +433,6 @@ static /*@observer@*/ const char * tag2sln(int tag)
  * @return             
  */
 static pid_t psmWait(rpmpsm psm)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies psm, fileSystem, internalState @*/
 {
     const rpmts ts = psm->ts;
     rpmtime_t msecs;
@@ -501,8 +457,6 @@ static pid_t psmWait(rpmpsm psm)
 static rpmRC runLuaScript(rpmpsm psm, Header h, const char *sln,
                   int progArgc, const char **progArgv,
                   const char *script, int arg1, int arg2)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies psm, fileSystem, internalState @*/
 {
     const rpmts ts = psm->ts;
     int rootFd = -1;
@@ -518,14 +472,10 @@ static rpmRC runLuaScript(rpmpsm psm, Header h, const char *sln,
     if (!rpmtsChrootDone(ts)) {
        const char *rootDir = rpmtsRootDir(ts);
        xx = chdir("/");
-/*@-nullpass@*/
        rootFd = open(".", O_RDONLY, 0);
-/*@=nullpass@*/
        if (rootFd >= 0) {
-           /*@-superuser -noeffect @*/
            if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
                xx = chroot(rootDir);
-           /*@=superuser =noeffect @*/
            xx = rpmtsSetChrootDone(ts, 1);
        }
     }
@@ -534,7 +484,6 @@ static rpmRC runLuaScript(rpmpsm psm, Header h, const char *sln,
     rpmluaPushTable(lua, "arg");
     var = rpmluavNew();
     rpmluavSetListMode(var, 1);
-/*@+relaxtypes@*/
     if (progArgv) {
        for (i = 0; i < progArgc && progArgv[i]; i++) {
            rpmluavSetValue(var, RPMLUAV_STRING, progArgv[i]);
@@ -549,10 +498,7 @@ static rpmRC runLuaScript(rpmpsm psm, Header h, const char *sln,
        rpmluavSetValueNum(var, arg2);
        rpmluaSetVar(lua, var);
     }
-/*@=relaxtypes@*/
-/*@-moduncon@*/
     var = rpmluavFree(var);
-/*@=moduncon@*/
     rpmluaPop(lua);
 
     {
@@ -568,10 +514,8 @@ static rpmRC runLuaScript(rpmpsm psm, Header h, const char *sln,
        const char *rootDir = rpmtsRootDir(ts);
        xx = fchdir(rootFd);
        xx = close(rootFd);
-       /*@-superuser -noeffect @*/
        if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
            xx = chroot(".");
-       /*@=superuser =noeffect @*/
        xx = rpmtsSetChrootDone(ts, 0);
     }
 
@@ -581,10 +525,8 @@ static rpmRC runLuaScript(rpmpsm psm, Header h, const char *sln,
 
 /**
  */
-/*@unchecked@*/
 static int ldconfig_done = 0;
 
-/*@unchecked@*/ /*@observer@*/ /*@null@*/
 static const char * ldconfig_path = "/sbin/ldconfig";
 
 /**
@@ -608,10 +550,6 @@ static const char * ldconfig_path = "/sbin/ldconfig";
 static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
                int progArgc, const char ** progArgv,
                const char * script, int arg1, int arg2)
-       /*@globals ldconfig_done, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState@*/
-       /*@modifies psm, ldconfig_done, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
 {
     const rpmts ts = psm->ts;
     rpmfi fi = psm->fi;
@@ -741,12 +679,10 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
        const char * rootDir = rpmtsRootDir(ts);
        FD_t fd;
 
-       /*@-branchstate@*/
        if (makeTempFile((!rpmtsChrootDone(ts) ? rootDir : "/"), &fn, &fd)) {
            if (prefixes != NULL && freePrefixes) free(prefixes);
            return RPMRC_FAIL;
        }
-       /*@=branchstate@*/
 
        if (rpmIsDebug() &&
            (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")))
@@ -799,7 +735,6 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
     }
     if (out == NULL) return RPMRC_FAIL;        /* XXX can't happen */
 
-    /*@-branchstate@*/
     xx = rpmsqFork(&psm->sq);
     if (psm->sq.child == 0) {
        const char * rootDir;
@@ -844,9 +779,7 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
                path = ipath;
 
            xx = doputenv(path);
-           /*@-modobserver@*/
            ipath = _free(ipath);
-           /*@=modobserver@*/
        }
 
        if (prefixes != NULL)
@@ -867,14 +800,11 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
        case URL_IS_PATH:
            rootDir += sizeof("file://") - 1;
            rootDir = strchr(rootDir, '/');
-           /*@fallthrough@*/
        case URL_IS_UNKNOWN:
            if (!rpmtsChrootDone(ts) &&
                !(rootDir[0] == '/' && rootDir[1] == '\0'))
            {
-               /*@-superuser -noeffect @*/
                xx = chroot(rootDir);
-               /*@=superuser =noeffect @*/
            }
            xx = chdir("/");
            rpmMessage(RPMMESS_DEBUG, _("%s: %s(%s-%s-%s.%s)\texecv(%s) pid %d\n"),
@@ -886,16 +816,12 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
 
            /* Permit libselinux to do the scriptlet exec. */
            if (rpmtsSELinuxEnabled(ts) == 1) { 
-/*@-moduncon@*/
                xx = rpm_execcon(0, argv[0], (char ** const) argv, environ);
-/*@=moduncon@*/
                if (xx != 0)
                    break;
            }
 
-/*@-nullstate@*/
            xx = execv(argv[0], (char *const *)argv);
-/*@=nullstate@*/
            break;
        case URL_IS_HTTPS:
        case URL_IS_HTTP:
@@ -907,9 +833,7 @@ static rpmRC runScript(rpmpsm psm, Header h, const char * sln,
        }
 
        _exit(-1);
-       /*@notreached@*/
     }
-    /*@=branchstate@*/
 
     if (psm->sq.child == (pid_t)-1) {
        rpmError(RPMERR_FORK, _("Couldn't fork %s: %s\n"), sln, strerror(errno));
@@ -946,13 +870,11 @@ exit:
 
     xx = Fclose(out);  /* XXX dup'd STDOUT_FILENO */
 
-    /*@-branchstate@*/
     if (script) {
        if (!rpmIsDebug())
            xx = unlink(fn);
        fn = _free(fn);
     }
-    /*@=branchstate@*/
 
     return rc;
 }
@@ -963,8 +885,6 @@ exit:
  * @return             rpmRC return code
  */
 static rpmRC runInstScript(rpmpsm psm)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     rpmfi fi = psm->fi;
     HGE_t hge = fi->hge;
@@ -986,14 +906,12 @@ static rpmRC runInstScript(rpmpsm psm)
     if (progArgv == NULL && script == NULL)
        goto exit;
 
-    /*@-branchstate@*/
     if (progArgv && ptt == RPM_STRING_TYPE) {
        argv = alloca(sizeof(*argv));
        *argv = (const char *) progArgv;
     } else {
        argv = (const char **) progArgv;
     }
-    /*@=branchstate@*/
 
     if (fi->h != NULL) /* XXX can't happen */
     rc = runScript(psm, fi->h, tag2sln(psm->scriptTag), progArgc, argv,
@@ -1018,9 +936,6 @@ exit:
 static rpmRC handleOneTrigger(const rpmpsm psm,
                        Header sourceH, Header triggeredH,
                        int arg2, unsigned char * triggersAlreadyRun)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState@*/
-       /*@modifies psm, sourceH, triggeredH, *triggersAlreadyRun,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     int scareMem = 1;
     const rpmts ts = psm->ts;
@@ -1118,10 +1033,6 @@ static rpmRC handleOneTrigger(const rpmpsm psm,
  * @return             0 on success
  */
 static rpmRC runTriggers(rpmpsm psm)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies psm, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
 {
     const rpmts ts = psm->ts;
     rpmfi fi = psm->fi;
@@ -1160,10 +1071,6 @@ static rpmRC runTriggers(rpmpsm psm)
  * @return             0 on success
  */
 static rpmRC runImmedTriggers(rpmpsm psm)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies psm, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
 {
     const rpmts ts = psm->ts;
     rpmfi fi = psm->fi;
@@ -1213,8 +1120,7 @@ static rpmRC runImmedTriggers(rpmpsm psm)
     return rc;
 }
 
-/*@observer@*/ static const char * pkgStageString(pkgStage a)
-       /*@*/
+static const char * pkgStageString(pkgStage a)
 {
     switch(a) {
     case PSM_UNKNOWN:          return "unknown";
@@ -1250,16 +1156,13 @@ static rpmRC runImmedTriggers(rpmpsm psm)
 
     default:                   return "???";
     }
-    /*@noteached@*/
 }
 
 rpmpsm XrpmpsmUnlink(rpmpsm psm, const char * msg, const char * fn, unsigned ln)
 {
     if (psm == NULL) return NULL;
-/*@-modfilesys@*/
 if (_psm_debug && msg != NULL)
 fprintf(stderr, "--> psm %p -- %d %s at %s:%u\n", psm, psm->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
     psm->nrefs--;
     return NULL;
 }
@@ -1269,12 +1172,10 @@ rpmpsm XrpmpsmLink(rpmpsm psm, const char * msg, const char * fn, unsigned ln)
     if (psm == NULL) return NULL;
     psm->nrefs++;
 
-/*@-modfilesys@*/
 if (_psm_debug && msg != NULL)
 fprintf(stderr, "--> psm %p ++ %d %s at %s:%u\n", psm, psm->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
 
-    /*@-refcounttrans@*/ return psm; /*@=refcounttrans@*/
+    return psm;
 }
 
 rpmpsm rpmpsmFree(rpmpsm psm)
@@ -1286,28 +1187,20 @@ rpmpsm rpmpsmFree(rpmpsm psm)
     if (psm->nrefs > 1)
        return rpmpsmUnlink(psm, msg);
 
-/*@-nullstate@*/
     psm->fi = rpmfiFree(psm->fi);
 #ifdef NOTYET
     psm->te = rpmteFree(psm->te);
 #else
     psm->te = NULL;
 #endif
-/*@-internalglobs@*/
     psm->ts = rpmtsFree(psm->ts);
-/*@=internalglobs@*/
 
     (void) rpmpsmUnlink(psm, msg);
 
-    /*@-refcounttrans -usereleased@*/
-/*@-boundswrite@*/
     memset(psm, 0, sizeof(*psm));              /* XXX trash and burn */
-/*@=boundswrite@*/
     psm = _free(psm);
-    /*@=refcounttrans =usereleased@*/
 
     return NULL;
-/*@=nullstate@*/
 }
 
 rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi)
@@ -1319,9 +1212,7 @@ rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi)
 #ifdef NOTYET
     if (te)    psm->te = rpmteLink(te, msg);
 #else
-/*@-assignexpose -temptrans @*/
     if (te)    psm->te = te;
-/*@=assignexpose =temptrans @*/
 #endif
     if (fi)    psm->fi = rpmfiLink(fi, msg);
 
@@ -1329,18 +1220,12 @@ rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi)
 }
 
 static void * rpmpsmThread(void * arg)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies arg, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     rpmpsm psm = arg;
-/*@-unqualifiedtrans@*/
     return ((void *) rpmpsmStage(psm, psm->nstage));
-/*@=unqualifiedtrans@*/
 }
 
 static int rpmpsmNext(rpmpsm psm, pkgStage nstage)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     psm->nstage = nstage;
     if (_psm_threads)
@@ -1352,7 +1237,7 @@ static int rpmpsmNext(rpmpsm psm, pkgStage nstage)
  * @todo Packages w/o files never get a callback, hence don't get displayed
  * on install with -v.
  */
-/*@-bounds -nullpass@*/ /* FIX: testing null annotation for fi->h */
+/* FIX: testing null annotation for fi->h */
 rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
 {
     const rpmts ts = psm->ts;
@@ -1364,7 +1249,6 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
     int saveerrno;
     int xx;
 
-    /*@-branchstate@*/
     switch (stage) {
     case PSM_UNKNOWN:
        break;
@@ -1449,7 +1333,7 @@ assert(psm->mi == NULL);
            while ((psm->oh = rpmdbNextIterator(psm->mi)) != NULL) {
                fi->record = rpmdbGetIteratorOffset(psm->mi);
                psm->oh = NULL;
-               /*@loopbreak@*/ break;
+               break;
            }
            psm->mi = rpmdbFreeIterator(psm->mi);
            rc = RPMRC_OK;
@@ -1597,7 +1481,6 @@ psm->te->h = headerLink(fi->h);
                    /* XXX this is headerCopy w/o headerReload() */
                    psm->oh = headerNew();
 
-                   /*@-branchstate@*/
                    for (hi = headerInitIterator(oh);
                        headerNextIterator(hi, &tag, &type, &ptr, &count);
                        ptr = headerFreeData((void *)ptr, type))
@@ -1607,7 +1490,6 @@ psm->te->h = headerLink(fi->h);
                        if (ptr) (void) headerAddEntry(psm->oh, tag, type, ptr, count);
                    }
                    hi = headerFreeIterator(hi);
-                   /*@=branchstate@*/
 
                    oh = headerFree(oh);
                    uh = hfd(uh, uht);
@@ -1616,9 +1498,8 @@ psm->te->h = headerLink(fi->h);
            }
 
            /* Retrieve type of payload compression. */
-           /*@-nullstate@*/    /* FIX: psm->oh may be NULL */
+               /* FIX: psm->oh may be NULL */
            rc = rpmpsmNext(psm, PSM_RPMIO_FLAGS);
-           /*@=nullstate@*/
 
            /* Write the lead section into the package. */
            {   int archnum = -1;
@@ -1699,9 +1580,8 @@ psm->te->h = headerLink(fi->h);
                break;
            }
 
-           /*@-nullpass@*/     /* LCL: fi->fd != NULL here. */
+               /* LCL: fi->fd != NULL here. */
            psm->cfd = Fdopen(fdDup(Fileno(rpmteFd(fi->te))), psm->rpmio_flags);
-           /*@=nullpass@*/
            if (psm->cfd == NULL) {     /* XXX can't happen */
                rc = RPMRC_FAIL;
                break;
@@ -1718,9 +1598,7 @@ psm->te->h = headerLink(fi->h);
            saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
            xx = Fclose(psm->cfd);
            psm->cfd = NULL;
-           /*@-mods@*/
            errno = saveerrno; /* XXX FIXME: Fclose with libio destroys errno */
-           /*@=mods@*/
 
            if (!rc)
                rc = rpmpsmNext(psm, PSM_COMMIT);
@@ -1788,10 +1666,9 @@ psm->te->h = headerLink(fi->h);
                rc = RPMRC_FAIL;
                break;
            }
-           /*@-nullpass@*/     /* FIX: fdDup mey return NULL. */
+               /* FIX: fdDup mey return NULL. */
            xx = Fflush(psm->fd);
            psm->cfd = Fdopen(fdDup(Fileno(psm->fd)), psm->rpmio_flags);
-           /*@=nullpass@*/
            if (psm->cfd == NULL) {     /* XXX can't happen */
                rc = RPMRC_FAIL;
                break;
@@ -1808,9 +1685,7 @@ psm->te->h = headerLink(fi->h);
            saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
            xx = Fclose(psm->cfd);
            psm->cfd = NULL;
-           /*@-mods@*/
            errno = saveerrno;
-           /*@=mods@*/
 
            /* XXX make sure progress is closed out */
            psm->what = RPMCALLBACK_INST_PROGRESS;
@@ -1912,9 +1787,7 @@ psm->te->h = headerLink(fi->h);
            saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
            xx = Fclose(psm->fd);
            psm->fd = NULL;
-           /*@-mods@*/
            errno = saveerrno;
-           /*@=mods@*/
        }
 
        if (psm->goal == PSM_PKGSAVE) {
@@ -1937,12 +1810,10 @@ psm->te->h = headerLink(fi->h);
            psm->what = RPMCALLBACK_CPIO_ERROR;
            psm->amount = 0;
            psm->total = 0;
-           /*@-nullstate@*/ /* FIX: psm->fd may be NULL. */
+           /* FIX: psm->fd may be NULL. */
            xx = rpmpsmNext(psm, PSM_NOTIFY);
-           /*@=nullstate@*/
        }
 
-/*@-branchstate@*/
        if (psm->goal == PSM_PKGERASE || psm->goal == PSM_PKGSAVE) {
 if (psm->te != NULL)
 if (psm->te->h != NULL)
@@ -1950,7 +1821,6 @@ psm->te->h = headerFree(psm->te->h);
            if (fi->h != NULL)
                fi->h = headerFree(fi->h);
        }
-/*@=branchstate@*/
        psm->oh = headerFree(psm->oh);
        psm->pkgURL = _free(psm->pkgURL);
        psm->rpmio_flags = _free(psm->rpmio_flags);
@@ -1982,9 +1852,8 @@ psm->te->h = headerFree(psm->te->h);
        break;
     case PSM_NOTIFY:
     {  void * ptr;
-/*@-nullpass@*/ /* FIX: psm->te may be NULL */
+/* FIX: psm->te may be NULL */
        ptr = rpmtsNotify(ts, psm->te, psm->what, psm->amount, psm->total);
-/*@-nullpass@*/
     }  break;
     case PSM_DESTROY:
        break;
@@ -2018,10 +1887,8 @@ psm->te->h = headerFree(psm->te->h);
            }
 
            xx = chdir("/");
-           /*@-superuser@*/
            if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
                rc = chroot(rootDir);
-           /*@=superuser@*/
            psm->chrootDone = 1;
            (void) rpmtsSetChrootDone(ts, 1);
        }
@@ -2031,10 +1898,8 @@ psm->te->h = headerFree(psm->te->h);
        if (psm->chrootDone) {
            const char * rootDir = rpmtsRootDir(ts);
            const char * currDir = rpmtsCurrDir(ts);
-           /*@-superuser@*/
            if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
                rc = chroot(".");
-           /*@=superuser@*/
            psm->chrootDone = 0;
            (void) rpmtsSetChrootDone(ts, 0);
            if (currDir != NULL)        /* XXX can't happen */
@@ -2057,11 +1922,9 @@ psm->te->h = headerFree(psm->te->h);
     {  const char * payload_compressor = NULL;
        char * t;
 
-       /*@-branchstate@*/
        if (!hge(fi->h, RPMTAG_PAYLOADCOMPRESSOR, NULL,
                            (void **) &payload_compressor, NULL))
            payload_compressor = "gzip";
-       /*@=branchstate@*/
        psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio"));
        *t = '\0';
        t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
@@ -2163,11 +2026,8 @@ assert(psm->mi == NULL);
 
     default:
        break;
-/*@i@*/    }
-    /*@=branchstate@*/
+   }
 
-    /*@-nullstate@*/   /* FIX: psm->oh and psm->fi->h may be NULL. */
+       /* FIX: psm->oh and psm->fi->h may be NULL. */
     return rc;
-    /*@=nullstate@*/
 }
-/*@=bounds =nullpass@*/
index 01a1103..3e72792 100644 (file)
--- a/lib/psm.h
+++ b/lib/psm.h
@@ -8,10 +8,7 @@
 
 #include <rpmsq.h>
 
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _psm_debug;
-/*@=exportlocal@*/
 
 /**
  */
@@ -64,28 +61,17 @@ typedef enum pkgStage_e {
 struct rpmpsm_s {
     struct rpmsqElem sq;       /*!< Scriptlet/signal queue element. */
 
-/*@refcounted@*/
     rpmts ts;                  /*!< transaction set */
-/*@dependent@*/ /*@null@*/
     rpmte te;                  /*!< current transaction element */
-/*@refcounted@*/ /*@relnull@*/
     rpmfi fi;                  /*!< transaction element file info */
-/*@relnull@*/
     FD_t cfd;                  /*!< Payload file handle. */
-/*@relnull@*/
     FD_t fd;                   /*!< Repackage file handle. */
     Header oh;                 /*!< Repackage header. */
-/*@null@*/
     rpmdbMatchIterator mi;
-/*@observer@*/
     const char * stepName;
-/*@only@*/ /*@null@*/
     const char * rpmio_flags;
-/*@only@*/ /*@null@*/
     const char * failedFile;
-/*@only@*/ /*@null@*/
     const char * pkgURL;       /*!< Repackage URL. */
-/*@dependent@*/
     const char * pkgfn;                /*!< Repackage file name. */
     int scriptTag;             /*!< Scriptlet data tag. */
     int progTag;               /*!< Scriptlet interpreter tag. */
@@ -100,11 +86,9 @@ struct rpmpsm_s {
     unsigned long total;       /*!< Callback total. */
     rpmRC rc;
     pkgStage goal;
-/*@unused@*/
     pkgStage stage;            /*!< Current psm stage. */
     pkgStage nstage;           /*!< Next psm stage. */
 
-/*@refs@*/
     int nrefs;                 /*!< Reference count. */
 };
 
@@ -118,18 +102,12 @@ extern "C" {
  * @param msg
  * @return             NULL always
  */
-/*@unused@*/ /*@null@*/
-rpmpsm rpmpsmUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmpsm psm,
-               /*@null@*/ const char * msg)
-       /*@modifies psm @*/;
+rpmpsm rpmpsmUnlink (rpmpsm psm,
+               const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@-exportlocal@*/
-/*@null@*/
-rpmpsm XrpmpsmUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmpsm psm,
-               /*@null@*/ const char * msg, const char * fn, unsigned ln)
-       /*@modifies psm @*/;
-/*@=exportlocal@*/
+rpmpsm XrpmpsmUnlink (rpmpsm psm,
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmpsmUnlink(_psm, _msg)        XrpmpsmUnlink(_psm, _msg, __FILE__, __LINE__)
 
 /**
@@ -138,17 +116,11 @@ rpmpsm XrpmpsmUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmpsm psm,
  * @param msg
  * @return             new package state machine reference
  */
-/*@unused@*/ /*@newref@*/ /*@null@*/
-rpmpsm rpmpsmLink (/*@null@*/ rpmpsm psm, /*@null@*/ const char * msg)
-       /*@modifies psm @*/;
+rpmpsm rpmpsmLink (rpmpsm psm, const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@-exportlocal@*/
-/*@newref@*/ /*@null@*/
-rpmpsm XrpmpsmLink (/*@null@*/ rpmpsm psm, /*@null@*/ const char * msg,
-               const char * fn, unsigned ln)
-        /*@modifies psm @*/;
-/*@=exportlocal@*/
+rpmpsm XrpmpsmLink (rpmpsm psm, const char * msg,
+               const char * fn, unsigned ln);
 #define        rpmpsmLink(_psm, _msg)  XrpmpsmLink(_psm, _msg, __FILE__, __LINE__)
 
 /**
@@ -156,10 +128,7 @@ rpmpsm XrpmpsmLink (/*@null@*/ rpmpsm psm, /*@null@*/ const char * msg,
  * @param psm          package state machine
  * @return             NULL always
  */
-/*@null@*/
-rpmpsm rpmpsmFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmpsm psm)
-       /*@globals fileSystem @*/
-       /*@modifies psm, fileSystem @*/;
+rpmpsm rpmpsmFree(rpmpsm psm);
 
 /**
  * Create and load a package state machine.
@@ -168,9 +137,7 @@ rpmpsm rpmpsmFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmpsm psm)
  * @param fi           file info set
  * @return             new package state machine
  */
-/*@null@*/
-rpmpsm rpmpsmNew(rpmts ts, /*@null@*/ rpmte te, rpmfi fi)
-       /*@modifies ts, fi @*/;
+rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi);
 
 /**
  * Package state machine driver.
@@ -178,9 +145,7 @@ rpmpsm rpmpsmNew(rpmts ts, /*@null@*/ rpmte te, rpmfi fi)
  * @param stage                next stage
  * @return             0 on success
  */
-rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/;
+rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage);
 #define        rpmpsmUNSAFE    rpmpsmSTAGE
 
 #ifdef __cplusplus
index 1f21921..1bb75ff 100644 (file)
@@ -6,9 +6,7 @@
 #include "system.h"
 
 #ifndef PATH_MAX
-/*@-incondefs@*/       /* FIX: long int? */
 # define PATH_MAX 255
-/*@=incondefs@*/
 #endif
 
 #include <rpmcli.h>
@@ -25,7 +23,6 @@
 #include "debug.h"
 #include "misc.h"
 
-/*@access rpmgi @*/
 
 /**
  */
@@ -35,7 +32,6 @@ static void printFileInfo(char * te, const char * name,
                          unsigned short rdev, unsigned int nlink,
                          const char * owner, const char * group,
                          const char * linkto)
-       /*@modifies *te @*/
 {
     char sizefield[15];
     char ownerfield[8+1], groupfield[8+1];
@@ -51,9 +47,7 @@ static void printFileInfo(char * te, const char * name,
     if (now == 0) {
        now = time(NULL);
        tm = localtime(&now);
-/*@-boundsread@*/
        if (tm) nowtm = *tm;    /* structure assignment */
-/*@=boundsread@*/
     }
 
     strncpy(ownerfield, owner, sizeof(ownerfield));
@@ -110,15 +104,12 @@ static void printFileInfo(char * te, const char * name,
 
 /**
  */
-static inline /*@null@*/ const char * queryHeader(Header h, const char * qfmt)
-       /*@*/
+static inline const char * queryHeader(Header h, const char * qfmt)
 {
     const char * errstr = "(unkown error)";
     const char * str;
 
-/*@-modobserver@*/
     str = headerSprintf(h, qfmt, rpmTagTable, rpmHeaderFormats, &errstr);
-/*@=modobserver@*/
     if (str == NULL)
        rpmError(RPMERR_QFMT, _("incorrect format: %s\n"), errstr);
     return str;
@@ -127,7 +118,6 @@ static inline /*@null@*/ const char * queryHeader(Header h, const char * qfmt)
 /**
  */
 static void flushBuffer(char ** tp, char ** tep, int nonewline)
-       /*@ modifies *tp, *tep @*/
 {
     char *t, *te;
 
@@ -158,13 +148,10 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
     int i;
 
     te = t = xmalloc(tb);
-/*@-boundswrite@*/
     *te = '\0';
-/*@=boundswrite@*/
 
     if (qva->qva_queryFormat != NULL) {
        const char * str = queryHeader(h, qva->qva_queryFormat);
-       /*@-branchstate@*/
        if (str) {
            size_t tx = (te - t);
 
@@ -174,15 +161,10 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
                t = xrealloc(t, tb);
                te = t + tx;
            }
-/*@-boundswrite@*/
-           /*@-usereleased@*/
            te = stpcpy(te, str);
-           /*@=usereleased@*/
-/*@=boundswrite@*/
            str = _free(str);
            flushBuffer(&t, &te, 1);
        }
-       /*@=branchstate@*/
     }
 
     if (!(qva->qva_flags & QUERY_FOR_LIST))
@@ -190,9 +172,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
 
     fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
     if (rpmfiFC(fi) <= 0) {
-/*@-boundswrite@*/
        te = stpcpy(te, _("(contains no files)"));
-/*@=boundswrite@*/
        goto exit;
     }
 
@@ -219,7 +199,6 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
        fstate = rpmfiFState(fi);
        fsize = rpmfiFSize(fi);
        fn = rpmfiFN(fi);
-/*@-bounds@*/
        {   static char hex[] = "0123456789abcdef";
            unsigned const char * s = rpmfiMD5(fi);
            char * p = fmd5;
@@ -231,7 +210,6 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
            }
            *p = '\0';
        }
-/*@=bounds@*/
        fuser = rpmfiFUser(fi);
        fgroup = rpmfiFGroup(fi);
        flink = rpmfiFLink(fi);
@@ -258,7 +236,6 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
            te = t + tx;
        }
 
-/*@-boundswrite@*/
        if (!rpmIsVerbose() && prefix)
            te = stpcpy(te, prefix);
 
@@ -266,38 +243,35 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
            switch (fstate) {
            case RPMFILE_STATE_NORMAL:
                te = stpcpy(te, _("normal        "));
-               /*@switchbreak@*/ break;
+               break;
            case RPMFILE_STATE_REPLACED:
                te = stpcpy(te, _("replaced      "));
-               /*@switchbreak@*/ break;
+               break;
            case RPMFILE_STATE_NOTINSTALLED:
                te = stpcpy(te, _("not installed "));
-               /*@switchbreak@*/ break;
+               break;
            case RPMFILE_STATE_NETSHARED:
                te = stpcpy(te, _("net shared    "));
-               /*@switchbreak@*/ break;
+               break;
            case RPMFILE_STATE_WRONGCOLOR:
                te = stpcpy(te, _("wrong color   "));
-               /*@switchbreak@*/ break;
+               break;
            case RPMFILE_STATE_MISSING:
                te = stpcpy(te, _("(no state)    "));
-               /*@switchbreak@*/ break;
+               break;
            default:
                sprintf(te, _("(unknown %3d) "), fstate);
                te += strlen(te);
-               /*@switchbreak@*/ break;
+               break;
            }
        }
-/*@=boundswrite@*/
 
        if (qva->qva_flags & QUERY_FOR_DUMPFILES) {
            sprintf(te, "%s %d %d %s 0%o ", fn, (int)fsize, fmtime, fmd5, fmode);
            te += strlen(te);
 
            if (fuser && fgroup) {
-/*@-nullpass@*/
                sprintf(te, "%s %s", fuser, fgroup);
-/*@=nullpass@*/
                te += strlen(te);
            } else {
                rpmError(RPMERR_INTERNAL,
@@ -314,9 +288,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
            te += strlen(te);
        } else
        if (!rpmIsVerbose()) {
-/*@-boundswrite@*/
            te = stpcpy(te, fn);
-/*@=boundswrite@*/
        }
        else {
 
@@ -327,10 +299,8 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
            }
 
            if (fuser && fgroup) {
-/*@-nullpass@*/
                printFileInfo(te, fn, fsize, fmode, fmtime, frdev, fnlink,
                                        fuser, fgroup, flink);
-/*@=nullpass@*/
                te += strlen(te);
            } else {
                rpmError(RPMERR_INTERNAL,
@@ -383,9 +353,9 @@ void rpmDisplayQueryTags(FILE * fp)
        /* XXX don't print query tags twice. */
        for (i = 0, t = rpmTagTable; i < rpmTagTableSize; i++, t++) {
            if (t->name == NULL)        /* XXX programmer error. */
-               /*@innercontinue@*/ continue;
+               continue;
            if (!strcmp(t->name, ext->name))
-               /*@innerbreak@*/ break;
+               break;
        }
        if (i >= rpmTagTableSize && ext->type == HEADER_EXT_TAG)
            fprintf(fp, "%s\n", ext->name + 7);
@@ -394,8 +364,6 @@ void rpmDisplayQueryTags(FILE * fp)
 }
 
 static int rpmgiShowMatches(QVA_t qva, rpmts ts)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-        /*@modifies qva, rpmGlobalMacroContext, h_errno, internalState @*/
 {
     rpmgi gi = qva->qva_gi;
     int ec = 0;
@@ -437,7 +405,6 @@ int rpmcliShowMatches(QVA_t qva, rpmts ts)
  * @return             binary nibble
  */
 static inline unsigned char nibble(char c)
-       /*@*/
 {
     if (c >= '0' && c <= '9')
        return (c - '0');
@@ -448,7 +415,7 @@ static inline unsigned char nibble(char c)
     return 0;
 }
 
-/*@-bounds@*/ /* LCL: segfault (realpath annotation?) */
+/* LCL: segfault (realpath annotation?) */
 int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
 {
     int res = 0;
@@ -461,7 +428,6 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
     if (qva->qva_showPackage == NULL)
        return 1;
 
-    /*@-branchstate@*/
     switch (qva->qva_source) {
     case RPMQV_RPM:
        res = rpmgiShowMatches(qva, ts);
@@ -617,14 +583,13 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
                res = rpmcliShowMatches(qva, ts);
            break;
        }
-       /*@fallthrough@*/
     case RPMQV_PATH:
     {   char * fn;
        int myerrno = 0;
 
        for (s = arg; *s != '\0'; s++)
            if (!(*s == '.' || *s == '/'))
-               /*@loopbreak@*/ break;
+               break;
 
        if (*s == '\0') {
            char fnbuf[PATH_MAX];
@@ -713,11 +678,9 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
     }
     
     }
-    /*@=branchstate@*/
    
     return res;
 }
-/*@=bounds@*/
 
 int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_t argv)
 {
@@ -735,9 +698,8 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_t argv)
        if (rpmrc != RPMRC_NOTFOUND)
            return 1;   /* XXX should be no. of failures. */
        
-       /*@-nullpass@*/ /* FIX: argv can be NULL, cast to pass argv array */
+       /* FIX: argv can be NULL, cast to pass argv array */
        ec = rpmQueryVerify(qva, ts, (const char *) argv);
-       /*@=nullpass@*/
        rpmtsEmpty(ts);
        break;
     case RPMQV_RPM:
@@ -750,9 +712,8 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_t argv)
        if (rpmrc != RPMRC_NOTFOUND)
            return 1;   /* XXX should be no. of failures. */
        
-       /*@-nullpass@*/ /* FIX: argv can be NULL, cast to pass argv array */
+       /* FIX: argv can be NULL, cast to pass argv array */
        ec = rpmQueryVerify(qva, ts, NULL);
-       /*@=nullpass@*/
        rpmtsEmpty(ts);
        break;
     case RPMQV_HDLIST:
@@ -765,9 +726,8 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_t argv)
        if (rpmrc != RPMRC_NOTFOUND)
            return 1;   /* XXX should be no. of failures. */
        
-       /*@-nullpass@*/ /* FIX: argv can be NULL, cast to pass argv array */
+       /* FIX: argv can be NULL, cast to pass argv array */
        ec = rpmQueryVerify(qva, ts, NULL);
-       /*@=nullpass@*/
        rpmtsEmpty(ts);
        break;
     case RPMQV_FTSWALK:
@@ -782,9 +742,8 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_t argv)
        if (rpmrc != RPMRC_NOTFOUND)
            return 1;   /* XXX should be no. of failures. */
        
-       /*@-nullpass@*/ /* FIX: argv can be NULL, cast to pass argv array */
+       /* FIX: argv can be NULL, cast to pass argv array */
        ec = rpmQueryVerify(qva, ts, NULL);
-       /*@=nullpass@*/
        rpmtsEmpty(ts);
        break;
     default:
index e988439..9f4b403 100644 (file)
 
 #include "debug.h"
 
-typedef /*@abstract@*/ struct availablePackage_s * availablePackage;
+typedef struct availablePackage_s * availablePackage;
 
-/*@unchecked@*/
 int _rpmal_debug = 0;
 
-/*@access alKey @*/
-/*@access alNum @*/
-/*@access rpmal @*/
-/*@access availablePackage @*/
-
-/*@access fnpyKey @*/  /* XXX suggestedKeys array */
 
 /** \ingroup rpmdep
  * Info about a single package to be installed.
  */
 struct availablePackage_s {
-/*@refcounted@*/ /*@null@*/
     rpmds provides;            /*!< Provides: dependencies. */
-/*@refcounted@*/ /*@null@*/
     rpmfi fi;                  /*!< File info set. */
 
     uint_32 tscolor;           /*!< Transaction color bits. */
 
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
     fnpyKey key;               /*!< Associated file name/python object */
 
 };
 
-typedef /*@abstract@*/ struct availableIndexEntry_s *  availableIndexEntry;
-/*@access availableIndexEntry@*/
+typedef struct availableIndexEntry_s * availableIndexEntry;
 
 /** \ingroup rpmdep
  * A single available item (e.g. a Provides: dependency).
  */
 struct availableIndexEntry_s {
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
     alKey pkgKey;              /*!< Containing package. */
-/*@observer@*/
     const char * entry;                /*!< Dependency name. */
     unsigned short entryLen;   /*!< No. of bytes in name. */
     unsigned short entryIx;    /*!< Dependency index. */
@@ -58,44 +45,37 @@ struct availableIndexEntry_s {
     } type;                    /*!< Type of available item. */
 };
 
-typedef /*@abstract@*/ struct availableIndex_s *       availableIndex;
-/*@access availableIndex@*/
+typedef struct availableIndex_s *      availableIndex;
 
 /** \ingroup rpmdep
  * Index of all available items.
  */
 struct availableIndex_s {
-/*@null@*/
     availableIndexEntry index; /*!< Array of available items. */
     int size;                  /*!< No. of available items. */
     int k;                     /*!< Current index. */
 };
 
-typedef /*@abstract@*/ struct fileIndexEntry_s *       fileIndexEntry;
-/*@access fileIndexEntry@*/
+typedef struct fileIndexEntry_s *      fileIndexEntry;
 
 /** \ingroup rpmdep
  * A file to be installed/removed.
  */
 struct fileIndexEntry_s {
-/*@dependent@*/ /*@relnull@*/
     const char * baseName;     /*!< File basename. */
     int baseNameLen;
     alNum pkgNum;              /*!< Containing package index. */
     uint_32 ficolor;
 };
 
-typedef /*@abstract@*/ struct dirInfo_s *              dirInfo;
-/*@access dirInfo@*/
+typedef struct dirInfo_s *             dirInfo;
 
 /** \ingroup rpmdep
  * A directory to be installed/removed.
  */
 struct dirInfo_s {
-/*@owned@*/ /*@relnull@*/
     const char * dirName;      /*!< Directory path (+ trailing '/'). */
     int dirNameLen;            /*!< No. bytes in directory path. */
-/*@owned@*/
     fileIndexEntry files;      /*!< Array of files in directory. */
     int numFiles;              /*!< No. files in directory. */
 };
@@ -104,7 +84,6 @@ struct dirInfo_s {
  * Set of available packages, items, and directories.
  */
 struct rpmal_s {
-/*@owned@*/ /*@null@*/
     availablePackage list;     /*!< Set of packages. */
     struct availableIndex_s index;     /*!< Set of available items. */
     int delta;                 /*!< Delta for pkg list reallocation. */
@@ -112,7 +91,6 @@ struct rpmal_s {
     int alloced;               /*!< No. of pkgs allocated for list. */
     uint_32 tscolor;           /*!< Transaction color. */
     int numDirs;               /*!< No. of directories. */
-/*@owned@*/ /*@null@*/
     dirInfo dirs;              /*!< Set of directories. */
 };
 
@@ -121,7 +99,6 @@ struct rpmal_s {
  * @param al           available list
  */
 static void rpmalFreeIndex(rpmal al)
-       /*@modifies al @*/
 {
     availableIndex ai = &al->index;
     if (ai->size > 0) {
@@ -136,29 +113,22 @@ static void rpmalFreeIndex(rpmal al)
  * @param al           available list
  * @return             no. of packages in list
  */
-static int alGetSize(/*@null@*/ const rpmal al)
-       /*@*/
+static int alGetSize(const rpmal al)
 {
     return (al != NULL ? al->size : 0);
 }
 #endif
 
-static inline alNum alKey2Num(/*@unused@*/ /*@null@*/ const rpmal al,
-               /*@null@*/ alKey pkgKey)
-       /*@*/
+static inline alNum alKey2Num(const rpmal al,
+               alKey pkgKey)
 {
-    /*@-nullret -temptrans -retalias @*/
     return ((alNum)pkgKey);
-    /*@=nullret =temptrans =retalias @*/
 }
 
-static inline alKey alNum2Key(/*@unused@*/ /*@null@*/ const rpmal al,
-               /*@null@*/ alNum pkgNum)
-       /*@*/
+static inline alKey alNum2Key(const rpmal al,
+               alNum pkgNum)
 {
-    /*@-nullret -temptrans -retalias @*/
     return ((alKey)pkgNum);
-    /*@=nullret =temptrans =retalias @*/
 }
 
 #ifdef DYING
@@ -168,10 +138,8 @@ static inline alKey alNum2Key(/*@unused@*/ /*@null@*/ const rpmal al,
  * @param pkgKey       available package key
  * @return             available package pointer
  */
-/*@dependent@*/ /*@null@*/
-static availablePackage alGetPkg(/*@null@*/ const rpmal al,
-               /*@null@*/ alKey pkgKey)
-       /*@*/
+static availablePackage alGetPkg(const rpmal al,
+               alKey pkgKey)
 {
     alNum pkgNum = alKey2Num(al, pkgKey);
     availablePackage alp = NULL;
@@ -239,12 +207,9 @@ rpmal rpmalFree(rpmal al)
  * @return             result of comparison
  */
 static int dieCompare(const void * one, const void * two)
-       /*@*/
 {
-    /*@-castexpose@*/
     const dirInfo a = (const dirInfo) one;
     const dirInfo b = (const dirInfo) two;
-    /*@=castexpose@*/
     int lenchk = a->dirNameLen - b->dirNameLen;
 
     if (lenchk || a->dirNameLen == 0)
@@ -264,12 +229,9 @@ static int dieCompare(const void * one, const void * two)
  * @return             result of comparison
  */
 static int fieCompare(const void * one, const void * two)
-       /*@*/
 {
-    /*@-castexpose@*/
     const fileIndexEntry a = (const fileIndexEntry) one;
     const fileIndexEntry b = (const fileIndexEntry) two;
-    /*@=castexpose@*/
     int lenchk = a->baseNameLen - b->baseNameLen;
 
     if (lenchk)
@@ -279,7 +241,6 @@ static int fieCompare(const void * one, const void * two)
        return lenchk;
 
 #ifdef NOISY
-/*@-modfilesys@*/
 if (_rpmal_debug) {
 fprintf(stderr, "\t\tstrcmp(%p:%p, %p:%p)", a, a->baseName, b, b->baseName);
 #if 0
@@ -288,7 +249,6 @@ fprintf(stderr, " a %s", a->baseName);
 fprintf(stderr, " b %s", a->baseName);
 fprintf(stderr, "\n");
 }
-/*@=modfilesys@*/
 #endif
 
     return strcmp(a->baseName, b->baseName);
@@ -305,10 +265,8 @@ void rpmalDel(rpmal al, alKey pkgKey)
 
     alp = al->list + pkgNum;
 
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "*** del %p[%d]\n", al->list, (int) pkgNum);
-/*@=modfilesys@*/
 
     /* Delete directory/file info entries from added package list. */
     if ((fi = alp->fi) != NULL)
@@ -330,44 +288,32 @@ fprintf(stderr, "*** del %p[%d]\n", al->list, (int) pkgNum);
 
            (void) rpmfiSetDX(fi, dx);
 
-           /*@-assignexpose -dependenttrans -observertrans@*/
            dieNeedle->dirName = (char *) rpmfiDN(fi);
-           /*@=assignexpose =dependenttrans =observertrans@*/
            dieNeedle->dirNameLen = (dieNeedle->dirName != NULL
                        ? strlen(dieNeedle->dirName) : 0);
-/*@-boundswrite@*/
            die = bsearch(dieNeedle, al->dirs, al->numDirs,
                               sizeof(*dieNeedle), dieCompare);
-/*@=boundswrite@*/
            if (die == NULL)
                continue;
 
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "--- die[%5ld] %p [%3d] %s\n", (die - al->dirs), die, die->dirNameLen, die->dirName);
-/*@=modfilesys@*/
 
            last = die->numFiles;
            fie = die->files + last - 1;
            for (i = last - 1; i >= 0; i--, fie--) {
                if (fie->pkgNum != pkgNum)
-                   /*@innercontinue@*/ continue;
+                   continue;
                die->numFiles--;
 
                if (i < die->numFiles) {
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "\t%p[%3d] memmove(%p:%p,%p:%p,0x%lx) %s <- %s\n", die->files, die->numFiles, fie, fie->baseName, fie+1, (fie+1)->baseName, ((die->numFiles - i) * sizeof(*fie)), fie->baseName, (fie+1)->baseName);
-/*@=modfilesys@*/
 
-/*@-bounds@*/
                    memmove(fie, fie+1, (die->numFiles - i) * sizeof(*fie));
-/*@=bounds@*/
                }
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "\t%p[%3d] memset(%p,0,0x%lx) %p [%3d] %s\n", die->files, die->numFiles, die->files + die->numFiles, sizeof(*fie), fie->baseName, fie->baseNameLen, fie->baseName);
-/*@=modfilesys@*/
                memset(die->files + die->numFiles, 0, sizeof(*fie)); /* overkill */
 
            }
@@ -381,20 +327,14 @@ fprintf(stderr, "\t%p[%3d] memset(%p,0,0x%lx) %p [%3d] %s\n", die->files, die->n
            die->dirName = _free(die->dirName);
            al->numDirs--;
            if ((die - al->dirs) < al->numDirs) {
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "    die[%5ld] memmove(%p,%p,0x%lx)\n", (die - al->dirs), die, die+1, ((al->numDirs - (die - al->dirs)) * sizeof(*die)));
-/*@=modfilesys@*/
 
-/*@-bounds@*/
                memmove(die, die+1, (al->numDirs - (die - al->dirs)) * sizeof(*die));
-/*@=bounds@*/
            }
 
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "    die[%5d] memset(%p,0,0x%lx)\n", al->numDirs, al->dirs + al->numDirs, sizeof(*die));
-/*@=modfilesys@*/
            memset(al->dirs + al->numDirs, 0, sizeof(*al->dirs)); /* overkill */
        }
 
@@ -409,13 +349,10 @@ fprintf(stderr, "    die[%5d] memset(%p,0,0x%lx)\n", al->numDirs, al->dirs + al-
     alp->provides = rpmdsFree(alp->provides);
     alp->fi = rpmfiFree(alp->fi);
 
-/*@-boundswrite@*/
     memset(alp, 0, sizeof(*alp));      /* XXX trash and burn */
-/*@=boundswrite@*/
     return;
 }
 
-/*@-bounds@*/
 alKey rpmalAdd(rpmal * alistp, alKey pkgKey, fnpyKey key,
                rpmds provides, rpmfi fi, uint_32 tscolor)
 {
@@ -447,10 +384,8 @@ alKey rpmalAdd(rpmal * alistp, alKey pkgKey, fnpyKey key,
     alp->key = key;
     alp->tscolor = tscolor;
 
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, (int) pkgNum, tscolor);
-/*@=modfilesys@*/
 
     alp->provides = rpmdsLink(provides, "Provides (rpmalAdd)");
     alp->fi = rpmfiLink(fi, "Files (rpmalAdd)");
@@ -488,7 +423,7 @@ fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, (int) pkgNum, tscolor);
                (void) rpmfiSetDX(fi, i);
                iDN = rpmfiDN(fi);
                if (iDN != NULL && !strcmp(DN, iDN))
-                   /*@innerbreak@*/ break;
+                   break;
            }
            dirUnique[dx] = i;
        }
@@ -505,7 +440,6 @@ fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, (int) pkgNum, tscolor);
            /* Find global dirInfo mapping for first encounter. */
            (void) rpmfiSetDX(fi, dx);
 
-           /*@-assignexpose -dependenttrans -observertrans@*/
            {   DN = rpmfiDN(fi);
 
 #if defined(__ia64__)
@@ -516,7 +450,6 @@ fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, (int) pkgNum, tscolor);
 #endif
                dieNeedle->dirName = DN;
            }
-           /*@=assignexpose =dependenttrans =observertrans@*/
 
            dieNeedle->dirNameLen = (dieNeedle->dirName != NULL
                        ? strlen(dieNeedle->dirName) : 0);
@@ -532,10 +465,8 @@ fprintf(stderr, "*** add %p[%d] 0x%x\n", al->list, (int) pkgNum, tscolor);
                die->dirNameLen = dieNeedle->dirNameLen;
                die->files = NULL;
                die->numFiles = 0;
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "+++ die[%5d] %p [%3d] %s\n", al->numDirs, die, die->dirNameLen, die->dirName);
-/*@=modfilesys@*/
 
                al->numDirs++;
            }
@@ -549,7 +480,7 @@ fprintf(stderr, "+++ die[%5d] %p [%3d] %s\n", al->numDirs, die, die->dirNameLen,
            dx = rpmfiDX(fi);
            while ((next = rpmfiNext(fi)) >= 0) {
                if (dx != rpmfiDX(fi))
-                   /*@innerbreak@*/ break;
+                   break;
            }
            if (next < 0) next = rpmfiFC(fi);   /* XXX reset end-of-list */
 
@@ -559,26 +490,20 @@ fprintf(stderr, "+++ die[%5d] %p [%3d] %s\n", al->numDirs, die, die->dirNameLen,
 
            fie = die->files + die->numFiles;
 
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "    die[%5d] %p->files [%p[%d],%p) -> [%p[%d],%p)\n", dirMapping[dx], die,
 die->files, die->numFiles, die->files+die->numFiles,
 fie, (next - first), fie + (next - first));
-/*@=modfilesys@*/
 
            /* Rewind to first file, generate file index entry for each file. */
            fi = rpmfiInit(fi, first);
            while ((first = rpmfiNext(fi)) >= 0 && first < next) {
-               /*@-assignexpose -dependenttrans -observertrans @*/
                fie->baseName = rpmfiBN(fi);
-               /*@=assignexpose =dependenttrans =observertrans @*/
                fie->baseNameLen = (fie->baseName ? strlen(fie->baseName) : 0);
                fie->pkgNum = pkgNum;
                fie->ficolor = rpmfiFColor(fi);
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "\t%p[%3d] %p:%p[%2d] %s\n", die->files, die->numFiles, fie, fie->baseName, fie->baseNameLen, rpmfiFN(fi));
-/*@=modfilesys@*/
 
                die->numFiles++;
                fie++;
@@ -598,7 +523,6 @@ fprintf(stderr, "\t%p[%3d] %p:%p[%2d] %s\n", die->files, die->numFiles, fie, fie
 assert(((alNum)(alp - al->list)) == pkgNum);
     return ((alKey)(alp - al->list));
 }
-/*@=bounds@*/
 
 /**
  * Compare two available index entries by name (qsort/bsearch).
@@ -607,12 +531,9 @@ assert(((alNum)(alp - al->list)) == pkgNum);
  * @return             result of comparison
  */
 static int indexcmp(const void * one, const void * two)
-       /*@*/
 {
-    /*@-castexpose@*/
     const availableIndexEntry a = (const availableIndexEntry) one;
     const availableIndexEntry b = (const availableIndexEntry) two;
-    /*@=castexpose@*/
     int lenchk;
 
     lenchk = a->entryLen - b->entryLen;
@@ -742,30 +663,24 @@ rpmalAllFileSatisfiesDepend(const rpmal al, const rpmds ds, alKey * keyp)
        goto exit;
     baseName++;
 
-    /*@-branchstate@*/ /* FIX: ret is a problem */
+    /* FIX: ret is a problem */
     for (found = 0, ret = NULL;
         die < al->dirs + al->numDirs && dieCompare(die, dieNeedle) == 0;
         die++)
     {
 
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "==> die %p %s\n", die, (die->dirName ? die->dirName : "(nil)"));
-/*@=modfilesys@*/
 
-/*@-observertrans@*/
        fieNeedle->baseName = baseName;
-/*@=observertrans@*/
        fieNeedle->baseNameLen = strlen(fieNeedle->baseName);
        fie = bsearch(fieNeedle, die->files, die->numFiles,
                       sizeof(*fieNeedle), fieCompare);
        if (fie == NULL)
            continue;   /* XXX shouldn't happen */
 
-/*@-modfilesys@*/
 if (_rpmal_debug)
 fprintf(stderr, "==> fie %p %s\n", fie, (fie->baseName ? fie->baseName : "(nil)"));
-/*@=modfilesys@*/
 
        alp = al->list + fie->pkgNum;
 
@@ -784,7 +699,6 @@ fprintf(stderr, "==> fie %p %s\n", fie, (fie->baseName ? fie->baseName : "(nil)"
            *keyp = alNum2Key(al, fie->pkgNum);
        found++;
     }
-    /*@=branchstate@*/
 
 exit:
     dirName = _free(dirName);
@@ -824,9 +738,7 @@ rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds, alKey * keyp)
        return NULL;
 
     needle = memset(alloca(sizeof(*needle)), 0, sizeof(*needle));
-    /*@-assignexpose -temptrans@*/
     needle->entry = KName;
-    /*@=assignexpose =temptrans@*/
     needle->entryLen = strlen(needle->entry);
 
     match = bsearch(needle, ai->index, ai->size, sizeof(*ai->index), indexcmp);
@@ -856,29 +768,24 @@ rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds, alKey * keyp)
            if (rc)
                rpmdsNotify(ds, _("(added provide)"), 0);
 
-           /*@switchbreak@*/ break;
+           break;
        }
 
-       /*@-branchstate@*/
        if (rc) {
            ret = xrealloc(ret, (found + 2) * sizeof(*ret));
            if (ret)    /* can't happen */
                ret[found] = alp->key;
-/*@-dependenttrans@*/
            if (keyp)
                *keyp = match->pkgKey;
-/*@=dependenttrans@*/
            found++;
        }
-       /*@=branchstate@*/
     }
 
     if (ret)
        ret[found] = NULL;
 
-/*@-nullstate@*/ /* FIX: *keyp may be NULL */
+/* FIX: *keyp may be NULL */
     return ret;
-/*@=nullstate@*/
 }
 
 fnpyKey
index ec90022..1393fb1 100644 (file)
@@ -6,14 +6,11 @@
  * Structures used for managing added/available package lists.
  */
 
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmal_debug;
-/*@=exportlocal@*/
 
 /**
  */
-typedef /*@abstract@*/ struct rpmal_s *                rpmal;
+typedef struct rpmal_s *               rpmal;
 
 #ifdef __cplusplus
 extern "C" {
@@ -24,32 +21,21 @@ extern "C" {
  * @param delta                no. of entries to add on each realloc
  * @return al          new available list
  */
-/*@-exportlocal@*/
-/*@only@*/
-rpmal rpmalCreate(int delta)
-       /*@*/;
-/*@=exportlocal@*/
+rpmal rpmalCreate(int delta);
 
 /**
  * Free available packages, items, and directory members.
  * @param al           available list
  * @return             NULL always
  */
-/*@null@*/
-rpmal rpmalFree(/*@only@*/ /*@null@*/ rpmal al)
-       /*@globals fileSystem @*/
-       /*@modifies al, fileSystem @*/;
+rpmal rpmalFree(rpmal al);
 
 /**
  * Delete package from available list.
  * @param al           available list
  * @param pkgKey       package key
  */
-/*@-exportlocal@*/
-void rpmalDel(/*@null@*/ rpmal al, /*@null@*/ alKey pkgKey)
-       /*@globals fileSystem @*/
-       /*@modifies al, fileSystem @*/;
-/*@=exportlocal@*/
+void rpmalDel(rpmal al, alKey pkgKey);
 
 /**
  * Add package to available list.
@@ -62,12 +48,10 @@ void rpmalDel(/*@null@*/ rpmal al, /*@null@*/ alKey pkgKey)
  * @return             available package index
  */
 alKey rpmalAdd(rpmal * alistp,
-               /*@dependent@*/ /*@null@*/ alKey pkgKey,
-               /*@dependent@*/ /*@null@*/ fnpyKey key,
-               /*@null@*/ rpmds provides, /*@null@*/ rpmfi fi,
-               uint_32 tscolor)
-       /*@globals fileSystem @*/
-       /*@modifies *alistp, provides, fi, fileSystem @*/;
+               alKey pkgKey,
+               fnpyKey key,
+               rpmds provides, rpmfi fi,
+               uint_32 tscolor);
 
 /**
  * Add package provides to available list index.
@@ -76,19 +60,15 @@ alKey rpmalAdd(rpmal * alistp,
  * @param provides     added package provides
  * @param tscolor      transaction color bits
  */
-/*@-exportlocal@*/
 void rpmalAddProvides(rpmal al,
-               /*@dependent@*/ /*@null@*/ alKey pkgKey,
-               /*@null@*/ rpmds provides, uint_32 tscolor)
-       /*@modifies al, provides @*/;
-/*@=exportlocal@*/
+               alKey pkgKey,
+               rpmds provides, uint_32 tscolor);
 
 /**
  * Generate index for available list.
  * @param al           available list
  */
-void rpmalMakeIndex(/*@null@*/ rpmal al)
-       /*@modifies al @*/;
+void rpmalMakeIndex(rpmal al);
 
 /**
  * Check added package file lists for package(s) that provide a file.
@@ -97,13 +77,8 @@ void rpmalMakeIndex(/*@null@*/ rpmal al)
  * @retval keyp                added package key pointer (or NULL)
  * @return             associated package key(s), NULL if none
  */
-/*@-exportlocal@*/
-/*@only@*/ /*@null@*/
-fnpyKey * rpmalAllFileSatisfiesDepend(/*@null@*/ const rpmal al,
-               /*@null@*/ const rpmds ds, /*@null@*/ alKey * keyp)
-       /*@globals fileSystem @*/
-       /*@modifies al, *keyp, fileSystem @*/;
-/*@=exportlocal@*/
+fnpyKey * rpmalAllFileSatisfiesDepend(const rpmal al,
+               const rpmds ds, alKey * keyp);
 
 /**
  * Check added package file lists for package(s) that have a provide.
@@ -112,11 +87,8 @@ fnpyKey * rpmalAllFileSatisfiesDepend(/*@null@*/ const rpmal al,
  * @retval keyp                added package key pointer (or NULL)
  * @return             associated package key(s), NULL if none
  */
-/*@only@*/ /*@null@*/
 fnpyKey * rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds,
-               /*@null@*/ alKey * keyp)
-       /*@globals fileSystem @*/
-       /*@modifies al, *keyp, fileSystem @*/;
+               alKey * keyp);
 
 /**
  * Check added package file lists for first package that has a provide.
@@ -126,11 +98,8 @@ fnpyKey * rpmalAllSatisfiesDepend(const rpmal al, const rpmds ds,
  * @retval keyp                added package key pointer (or NULL)
  * @return             associated package key, NULL if none
  */
-/*@null@*/
 fnpyKey rpmalSatisfiesDepend(const rpmal al, const rpmds ds,
-               /*@null@*/ alKey * keyp)
-       /*@globals fileSystem @*/
-       /*@modifies al, *keyp, fileSystem @*/;
+               alKey * keyp);
 
 #ifdef __cplusplus
 }
index e37fe36..24371cb 100644 (file)
 #include "misc.h"      /* XXX for makeTempFile() */
 #include "debug.h"
 
-/*@access FD_t @*/             /* XXX stealing digests */
-/*@access pgpDig @*/
-/*@access pgpDigParams @*/
-
-/*@unchecked@*/
 int _print_pkts = 0;
 
 /**
  */
-/*@-boundsread@*/
-static int manageFile(/*@out@*/ FD_t *fdp,
-               /*@null@*/ /*@out@*/ const char **fnp,
-               int flags, /*@unused@*/ int rc)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies *fdp, *fnp, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
+static int manageFile(FD_t *fdp,
+               const char **fnp,
+               int flags, int rc)
 {
     const char *fn;
     FD_t fd;
@@ -40,7 +31,6 @@ static int manageFile(/*@out@*/ FD_t *fdp,
     if (fdp == NULL)   /* programmer error */
        return 1;
 
-/*@-boundswrite@*/
     /* close and reset *fdp to NULL */
     if (*fdp && (fnp == NULL || *fnp == NULL)) {
        (void) Fclose(*fdp);
@@ -73,7 +63,6 @@ static int manageFile(/*@out@*/ FD_t *fdp,
        fd = fdFree(fd, "manageFile return");
        return 0;
     }
-/*@=boundswrite@*/
 
     /* no operation */
     if (*fdp != NULL && fnp != NULL && *fnp != NULL)
@@ -82,18 +71,12 @@ static int manageFile(/*@out@*/ FD_t *fdp,
     /* XXX never reached */
     return 1;
 }
-/*@=boundsread@*/
 
 /**
  * Copy header+payload, calculating digest(s) on the fly.
  */
-/*@-boundsread@*/
 static int copyFile(FD_t *sfdp, const char **sfnp,
                FD_t *tfdp, const char **tfnp)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies *sfdp, *sfnp, *tfdp, *tfnp, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
 {
     unsigned char buf[BUFSIZ];
     ssize_t count;
@@ -128,7 +111,6 @@ exit:
     if (*tfdp) (void) manageFile(tfdp, NULL, 0, rc);
     return rc;
 }
-/*@=boundsread@*/
 
 /**
  * Retrieve signer fingerprint from an OpenPGP signature tag.
@@ -138,8 +120,6 @@ exit:
  * @return             0 on success
  */
 static int getSignid(Header sig, int sigtag, unsigned char * signid)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies *signid, fileSystem, internalState @*/
 {
     void * pkt = NULL;
     int_32 pkttyp = 0;
@@ -150,9 +130,7 @@ static int getSignid(Header sig, int sigtag, unsigned char * signid)
        pgpDig dig = pgpNewDig();
 
        if (!pgpPrtPkts(pkt, pktlen, dig, 0)) {
-/*@-bounds@*/
            memcpy(signid, dig->signature.signid, sizeof(dig->signature.signid));
-/*@=bounds@*/
            rc = 0;
        }
      
@@ -169,12 +147,8 @@ static int getSignid(Header sig, int sigtag, unsigned char * signid)
  * @param argv         array of package file names (NULL terminated)
  * @return             0 on success
  */
-static int rpmReSign(/*@unused@*/ rpmts ts,
+static int rpmReSign(rpmts ts,
                QVA_t qva, const char ** argv)
-        /*@globals rpmGlobalMacroContext, h_errno,
-                fileSystem, internalState @*/
-        /*@modifies rpmGlobalMacroContext,
-                fileSystem, internalState @*/
 {
     FD_t fd = NULL;
     FD_t ofd = NULL;
@@ -193,11 +167,8 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
     int xx;
     
     tmprpm[0] = '\0';
-    /*@-branchstate@*/
-/*@-boundsread@*/
     if (argv)
     while ((rpm = *argv++) != NULL)
-/*@=boundsread@*/
     {
 
        fprintf(stdout, "%s:\n", rpm);
@@ -205,9 +176,7 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
        if (manageFile(&fd, &rpm, O_RDONLY, 0))
            goto exit;
 
-/*@-boundswrite@*/
        memset(l, 0, sizeof(*l));
-/*@=boundswrite@*/
        rc = readLead(fd, l);
        if (rc != RPMRC_OK) {
            rpmError(RPMERR_READLEAD, _("%s: not an rpm package\n"), rpm);
@@ -217,13 +186,13 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
        case 1:
            rpmError(RPMERR_BADSIGTYPE, _("%s: Can't sign v1 packaging\n"), rpm);
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case 2:
            rpmError(RPMERR_BADSIGTYPE, _("%s: Can't re-sign v2 packaging\n"), rpm);
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
 
        msg = NULL;
@@ -234,13 +203,13 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
                        (msg && *msg ? msg : "\n"));
            msg = _free(msg);
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case RPMRC_OK:
            if (sigh == NULL) {
                rpmError(RPMERR_SIGGEN, _("%s: No signature available\n"), rpm);
                goto exit;
            }
-           /*@switchbreak@*/ break;
+           break;
        }
        msg = _free(msg);
 
@@ -312,17 +281,16 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
            switch (sigtag) {
            case RPMSIGTAG_DSA:
                xx = headerRemoveEntry(sigh, RPMSIGTAG_GPG);
-               /*@switchbreak@*/ break;
+               break;
            case RPMSIGTAG_RSA:
                xx = headerRemoveEntry(sigh, RPMSIGTAG_PGP);
-               /*@switchbreak@*/ break;
+               break;
            case RPMSIGTAG_GPG:
                xx = headerRemoveEntry(sigh, RPMSIGTAG_DSA);
-               /*@fallthrough@*/
            case RPMSIGTAG_PGP5:
            case RPMSIGTAG_PGP:
                xx = headerRemoveEntry(sigh, RPMSIGTAG_RSA);
-               /*@switchbreak@*/ break;
+               break;
            }
 
            xx = headerRemoveEntry(sigh, sigtag);
@@ -356,10 +324,8 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
            goto exit;
 
        /* Write the lead/signature of the output rpm */
-/*@-boundswrite@*/
        strcpy(tmprpm, rpm);
        strcat(tmprpm, ".XXXXXX");
-/*@=boundswrite@*/
        (void) mktemp(tmprpm);
        trpm = tmprpm;
 
@@ -396,7 +362,6 @@ static int rpmReSign(/*@unused@*/ rpmts ts,
        xx = unlink(sigtarget);
        sigtarget = _free(sigtarget);
     }
-    /*@=branchstate@*/
 
     res = 0;
 
@@ -461,7 +426,6 @@ rpmRC rpmcliImportPubkey(const rpmts ts, const unsigned char * pkt, ssize_t pktl
      || pubp->userid == NULL)
        goto exit;
 
-/*@-boundswrite@*/
     v = t = xmalloc(16+1);
     t = stpcpy(t, pgpHexStr(pubp->signid, sizeof(pubp->signid)));
 
@@ -471,15 +435,13 @@ rpmRC rpmcliImportPubkey(const rpmts ts, const unsigned char * pkt, ssize_t pktl
     n = t = xmalloc(sizeof("gpg()")+8);
     t = stpcpy( stpcpy( stpcpy(t, "gpg("), v+8), ")");
 
-    /*@-nullpass@*/ /* FIX: pubp->userid may be NULL */
+    /* FIX: pubp->userid may be NULL */
     u = t = xmalloc(sizeof("gpg()")+strlen(pubp->userid));
     t = stpcpy( stpcpy( stpcpy(t, "gpg("), pubp->userid), ")");
-    /*@=nullpass@*/
 
     evr = t = xmalloc(sizeof("4X:-")+strlen(v)+strlen(r));
     t = stpcpy(t, (pubp->version == 4 ? "4:" : "3:"));
     t = stpcpy( stpcpy( stpcpy(t, v), "-"), r);
-/*@=boundswrite@*/
 
     /* Check for pre-existing header. */
 
@@ -562,12 +524,8 @@ exit:
  * @return             0 on success
  */
 static int rpmcliImportPubkeys(const rpmts ts,
-               /*@unused@*/ QVA_t qva,
-               /*@null@*/ const char ** argv)
-       /*@globals RPMVERSION, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
+               QVA_t qva,
+               const char ** argv)
 {
     const char * fn;
     const unsigned char * pkt = NULL;
@@ -579,10 +537,7 @@ static int rpmcliImportPubkeys(const rpmts ts,
 
     if (argv == NULL) return res;
 
-    /*@-branchstate@*/
-/*@-boundsread@*/
     while ((fn = *argv++) != NULL) {
-/*@=boundsread@*/
 
        rpmtsClean(ts);
        pkt = _free(pkt);
@@ -621,7 +576,6 @@ static int rpmcliImportPubkeys(const rpmts ts,
        }
 
     }
-    /*@=branchstate@*/
     
 rpmtsClean(ts);
     pkt = _free(pkt);
@@ -629,7 +583,6 @@ rpmtsClean(ts);
     return res;
 }
 
-/*@unchecked@*/
 static unsigned char header_magic[8] = {
         0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00
 };
@@ -638,8 +591,6 @@ static unsigned char header_magic[8] = {
  * @todo If the GPG key was known available, the md5 digest could be skipped.
  */
 static int readFile(FD_t fd, const char * fn, pgpDig dig)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies fd, *dig, fileSystem, internalState @*/
 {
     unsigned char buf[4*BUFSIZ];
     ssize_t count;
@@ -696,7 +647,7 @@ static int readFile(FD_t fd, const char * fn, pgpDig dig)
 assert(dig->md5ctx == NULL);
            dig->md5ctx = fddig->hashctx;
            fddig->hashctx = NULL;
-           /*@switchbreak@*/ break;
+           break;
        case PGPHASHALGO_SHA1:
 #if HAVE_BEECRYPT_API_H
        case PGPHASHALGO_SHA256:
@@ -706,9 +657,9 @@ assert(dig->md5ctx == NULL);
 assert(dig->sha1ctx == NULL);
            dig->sha1ctx = fddig->hashctx;
            fddig->hashctx = NULL;
-           /*@switchbreak@*/ break;
+           break;
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
     }
 
@@ -743,9 +694,7 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
     int nosignatures = !(qva->qva_flags & VERIFY_SIGNATURE);
 
     {
-/*@-boundswrite@*/
        memset(l, 0, sizeof(*l));
-/*@=boundswrite@*/
        rc = readLead(fd, l);
        if (rc != RPMRC_OK) {
            rpmError(RPMERR_READLEAD, _("%s: not an rpm package\n"), fn);
@@ -757,9 +706,9 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
            rpmError(RPMERR_BADSIGTYPE, _("%s: No signature available (v1.0 RPM)\n"), fn);
            res++;
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
 
        msg = NULL;
@@ -771,14 +720,14 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
            msg = _free(msg);
            res++;
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case RPMRC_OK:
            if (sigh == NULL) {
                rpmError(RPMERR_SIGGEN, _("%s: No signature available\n"), fn);
                res++;
                goto exit;
            }
-           /*@switchbreak@*/ break;
+           break;
        }
        msg = _free(msg);
 
@@ -867,14 +816,14 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                    res++;
                    goto exit;
                }
-               /*@switchbreak@*/ break;
+               break;
            case RPMSIGTAG_SHA1:
                if (nodigests)
                     continue;
                /* XXX Don't bother with header sha1 if header dsa. */
                if (!nosignatures && sigtag == RPMSIGTAG_DSA)
                    continue;
-               /*@switchbreak@*/ break;
+               break;
            case RPMSIGTAG_LEMD5_2:
            case RPMSIGTAG_LEMD5_1:
            case RPMSIGTAG_MD5:
@@ -886,15 +835,14 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                 */
                if (!nosignatures && sigtag == RPMSIGTAG_PGP)
                    continue;
-               /*@switchbreak@*/ break;
+               break;
            default:
                continue;
-               /*@notreached@*/ /*@switchbreak@*/ break;
+               break;
            }
 
            res3 = rpmVerifySignature(ts, result);
 
-/*@-bounds@*/
            if (res3) {
                if (rpmIsVerbose()) {
                    b = stpcpy(b, "    ");
@@ -906,27 +854,26 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                    case RPMSIGTAG_SIZE:
                        b = stpcpy(b, "SIZE ");
                        res2 = 1;
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_SHA1:
                        b = stpcpy(b, "SHA1 ");
                        res2 = 1;
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_LEMD5_2:
                    case RPMSIGTAG_LEMD5_1:
                    case RPMSIGTAG_MD5:
                        b = stpcpy(b, "MD5 ");
                        res2 = 1;
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_RSA:
                        b = stpcpy(b, "RSA ");
                        res2 = 1;
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_PGP5:        /* XXX legacy */
                    case RPMSIGTAG_PGP:
                        switch (res3) {
                        case RPMRC_NOKEY:
                            res2 = 1;
-                           /*@fallthrough@*/
                        case RPMRC_NOTTRUSTED:
                        {   int offset = 6;
                            b = stpcpy(b, "(MD5) (PGP) ");
@@ -946,17 +893,17 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                                *u = '\0';
                              }
                            }
-                       }   /*@innerbreak@*/ break;
+                       }   break;
                        default:
                            b = stpcpy(b, "MD5 PGP ");
                            res2 = 1;
-                           /*@innerbreak@*/ break;
+                           break;
                        }
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_DSA:
                        b = stpcpy(b, "(SHA1) DSA ");
                        res2 = 1;
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_GPG:
                        /* Do not consider this a failure */
                        switch (res3) {
@@ -969,17 +916,17 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                                *m = '\0';
                            }
                            res2 = 1;
-                           /*@innerbreak@*/ break;
+                           break;
                        default:
                            b = stpcpy(b, "GPG ");
                            res2 = 1;
-                           /*@innerbreak@*/ break;
+                           break;
                        }
-                       /*@switchbreak@*/ break;
+                       break;
                    default:
                        b = stpcpy(b, "?UnknownSignatureType? ");
                        res2 = 1;
-                       /*@switchbreak@*/ break;
+                       break;
                    }
                }
            } else {
@@ -990,35 +937,34 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
                    switch (sigtag) {
                    case RPMSIGTAG_SIZE:
                        b = stpcpy(b, "size ");
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_SHA1:
                        b = stpcpy(b, "sha1 ");
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_LEMD5_2:
                    case RPMSIGTAG_LEMD5_1:
                    case RPMSIGTAG_MD5:
                        b = stpcpy(b, "md5 ");
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_RSA:
                        b = stpcpy(b, "rsa ");
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_PGP5:        /* XXX legacy */
                    case RPMSIGTAG_PGP:
                        b = stpcpy(b, "(md5) pgp ");
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_DSA:
                        b = stpcpy(b, "(sha1) dsa ");
-                       /*@switchbreak@*/ break;
+                       break;
                    case RPMSIGTAG_GPG:
                        b = stpcpy(b, "gpg ");
-                       /*@switchbreak@*/ break;
+                       break;
                    default:
                        b = stpcpy(b, "??? ");
-                       /*@switchbreak@*/ break;
+                       break;
                    }
                }
            }
-/*@=bounds@*/
        }
        hi = headerFreeIterator(hi);
 
@@ -1074,16 +1020,16 @@ int rpmcliSign(rpmts ts, QVA_t qva, const char ** argv)
        break;
     case RPMSIGN_IMPORT_PUBKEY:
        return rpmcliImportPubkeys(ts, qva, argv);
-       /*@notreached@*/ break;
+       break;
     case RPMSIGN_NEW_SIGNATURE:
     case RPMSIGN_ADD_SIGNATURE:
     case RPMSIGN_DEL_SIGNATURE:
        return rpmReSign(ts, qva, argv);
-       /*@notreached@*/ break;
+       break;
     case RPMSIGN_NONE:
     default:
        return -1;
-       /*@notreached@*/ break;
+       break;
     }
 
     while ((arg = *argv++) != NULL) {
index d972d9a..8d090c8 100644 (file)
 /** \ingroup rpmcli
  * Should version 3 packages be produced?
  */
-/*@-redecl@*/
-/*@unchecked@*/
 extern int _noDirTokens;
-/*@=redecl@*/
 
 #ifdef __cplusplus
 extern "C" {
@@ -26,22 +23,16 @@ extern "C" {
 /** \ingroup rpmcli
  * Popt option table for options shared by all modes and executables.
  */
-/*@unchecked@*/
 extern struct poptOption               rpmcliAllPoptTable[];
 
-/*@unchecked@*/
 extern int ftsOpts;
 
-/*@unchecked@*/
 extern struct poptOption               rpmcliFtsPoptTable[];
 
-/*@unchecked@*/ /*@observer@*/ /*@null@*/
 extern const char * rpmcliPipeOutput;
 
-/*@unchecked@*/ /*@observer@*/ /*@null@*/
 extern const char * rpmcliRcfile;
 
-/*@unchecked@*/ /*@observer@*/ /*@null@*/
 extern const char * rpmcliRootDir;
 
 /**
@@ -51,24 +42,14 @@ extern const char * rpmcliRootDir;
  * @param optionsTable         popt option table
  * @return                     popt context (or NULL)
  */
-/*@null@*/
 poptContext
-rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable)
-       /*@globals rpmCLIMacroContext, rpmGlobalMacroContext, h_errno, stderr, 
-               fileSystem, internalState @*/
-       /*@modifies rpmCLIMacroContext, rpmGlobalMacroContext, stderr, 
-               fileSystem, internalState @*/;
+rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable);
 
 /**
  * Make sure that rpm configuration has been read.
  * @warning Options like --rcfile and --verbose must precede callers option.
  */
-/*@mayexit@*/
-void rpmcliConfigured(void)
-       /*@globals rpmCLIMacroContext, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies rpmCLIMacroContext, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+void rpmcliConfigured(void);
 
 /**
  * Destroy most everything needed by an rpm CLI executable context.
@@ -76,8 +57,7 @@ void rpmcliConfigured(void)
  * @return                     NULL always
  */
 poptContext
-rpmcliFini(/*@only@*/ /*@null@*/ poptContext optCon)
-       /*@modifies optCon @*/;
+rpmcliFini(poptContext optCon);
 
 /**
  * Common/global popt tokens used for command line option tables.
@@ -93,7 +73,6 @@ rpmcliFini(/*@only@*/ /*@null@*/ poptContext optCon)
 
 /* ==================================================================== */
 /** \name RPMQV */
-/*@{*/
 
 /** \ingroup rpmcli
  * Query/Verify argument qualifiers.
@@ -149,7 +128,6 @@ typedef enum rpmVerifyAttrs_e {
  * @todo Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs?.
  */
 typedef enum rpmQueryFlags_e {
-/*@-enummemuse@*/
     QUERY_FOR_DEFAULT  = 0,            /*!< */
     QUERY_MD5          = (1 << 0),     /*!< from --nomd5 */
     QUERY_SIZE         = (1 << 1),     /*!< from --nosize */
@@ -168,7 +146,6 @@ typedef enum rpmQueryFlags_e {
     QUERY_SIGNATURE    = (1 << 20),    /*!< verify: from --nosignature */
     QUERY_PATCHES      = (1 << 21),    /*!< verify: from --nopatches */
     QUERY_HDRCHK       = (1 << 22),    /*!< verify: from --nohdrchk */
-/*@=enummemuse@*/
     QUERY_FOR_LIST     = (1 << 23),    /*!< query:  from --list */
     QUERY_FOR_STATE    = (1 << 24),    /*!< query:  from --state */
     QUERY_FOR_DOCS     = (1 << 25),    /*!< query:  from --docfiles */
@@ -183,7 +160,6 @@ typedef enum rpmQueryFlags_e {
 /** \ingroup rpmcli
  * Bit(s) from common command line options.
  */
-/*@unchecked@*/
 extern rpmQueryFlags rpmcliQueryFlags;
 
 /** \ingroup rpmcli
@@ -191,9 +167,7 @@ extern rpmQueryFlags rpmcliQueryFlags;
  * @todo Merge rpmQueryFlags, rpmVerifyFlags, and rpmVerifyAttrs values?.
  */
 typedef enum rpmVerifyFlags_e {
-/*@-enummemuse@*/
     VERIFY_DEFAULT     = 0,            /*!< */
-/*@=enummemuse@*/
     VERIFY_MD5         = (1 << 0),     /*!< from --nomd5 */
     VERIFY_SIZE                = (1 << 1),     /*!< from --nosize */
     VERIFY_LINKTO      = (1 << 2),     /*!< from --nolinkto */
@@ -211,13 +185,11 @@ typedef enum rpmVerifyFlags_e {
     VERIFY_SIGNATURE   = (1 << 20),    /*!< verify: from --nosignature */
     VERIFY_PATCHES     = (1 << 21),    /*!< verify: from --nopatches */
     VERIFY_HDRCHK      = (1 << 22),    /*!< verify: from --nohdrchk */
-/*@-enummemuse@*/
     VERIFY_FOR_LIST    = (1 << 23),    /*!< query:  from --list */
     VERIFY_FOR_STATE   = (1 << 24),    /*!< query:  from --state */
     VERIFY_FOR_DOCS    = (1 << 25),    /*!< query:  from --docfiles */
     VERIFY_FOR_CONFIG  = (1 << 26),    /*!< query:  from --configfiles */
     VERIFY_FOR_DUMPFILES= (1 << 27)    /*!< query:  from --dump */
-/*@=enummemuse@*/
        /* bits 28-31 used in rpmVerifyAttrs */
 } rpmVerifyFlags;
 
@@ -240,9 +212,7 @@ typedef struct rpmQVKArguments_s * QVA_t;
  * @param h            header to use for query/verify
  * @return             0 on success
  */
-typedef        int (*QVF_t) (QVA_t qva, rpmts ts, Header h)
-       /*@globals fileSystem @*/
-       /*@modifies qva, ts, fileSystem @*/;
+typedef        int (*QVF_t) (QVA_t qva, rpmts ts, Header h);
 
 /** \ingroup rpmcli
  * Function to query spec file.
@@ -252,11 +222,7 @@ typedef    int (*QVF_t) (QVA_t qva, rpmts ts, Header h)
  * @param arg          query argument
  * @return             0 on success
  */
-typedef        int (*QSpecF_t) (rpmts ts, QVA_t qva, const char * arg)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, qva, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+typedef        int (*QSpecF_t) (rpmts ts, QVA_t qva, const char * arg);
 
 /** \ingroup rpmcli
  * Describe query/verify/signature command line operation.
@@ -266,24 +232,16 @@ struct rpmQVKArguments_s {
     int        qva_sourceCount;/*!< Exclusive option check (>1 is error). */
     rpmQueryFlags qva_flags;   /*!< Bit(s) to control operation. */
     rpmfileAttrs qva_fflags;   /*!< Bit(s) to filter on attribute. */
-/*@only@*/ /*@null@*/
     rpmdbMatchIterator qva_mi; /*!< Match iterator on selected headers. */
-/*@refccounted@*/ /*@relnull@*/
     rpmgi qva_gi;              /*!< Generalized iterator on args. */
     rpmRC qva_rc;              /*!< Current return code. */
 
-/*@null@*/
     QVF_t qva_showPackage;     /*!< Function to display iterator matches. */
-/*@null@*/
     QSpecF_t qva_specQuery;    /*!< Function to query spec file. */
-/*@unused@*/
     int qva_verbose;           /*!< (unused) */
-/*@only@*/ /*@null@*/
     const char * qva_queryFormat;/*!< Format for headerSprintf(). */
     int sign;                  /*!< Is a passphrase needed? */
-/*@observer@*/
     const char * passPhrase;   /*!< Pass phrase. */
-/*@observer@*/ /*@null@*/
     const char * qva_prefix;   /*!< Path to top of install tree. */
     char       qva_mode;
                /*!<
@@ -300,27 +258,22 @@ struct rpmQVKArguments_s {
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct rpmQVKArguments_s rpmQVKArgs;
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct poptOption rpmQVSourcePoptTable[];
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern int specedit;
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct poptOption rpmQueryPoptTable[];
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct poptOption rpmVerifyPoptTable[];
 
 /** \ingroup rpmcli
@@ -334,17 +287,13 @@ extern struct poptOption rpmVerifyPoptTable[];
  * @param ts           transaction set
  * @return             result of last non-zero showPackage() return
  */
-int rpmcliShowMatches(QVA_t qva, rpmts ts)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies qva, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmcliShowMatches(QVA_t qva, rpmts ts);
 
 /** \ingroup rpmcli
  * Display list of tags that can be used in --queryformat.
  * @param fp   file handle to use for display
  */
-void rpmDisplayQueryTags(FILE * fp)
-       /*@globals fileSystem @*/
-       /*@modifies *fp, fileSystem @*/;
+void rpmDisplayQueryTags(FILE * fp);
 
 /** \ingroup rpmcli
  * Common query/verify source interface, called once for each CLI arg.
@@ -358,11 +307,7 @@ void rpmDisplayQueryTags(FILE * fp)
  * @param arg          name of source to query/verify
  * @return             showPackage() result, 1 if rpmdbInitIterator() is NULL
  */
-int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies qva, ts, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg);
 
 /** \ingroup rpmcli
  * Display results of package query.
@@ -372,9 +317,7 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, const char * arg)
  * @param h            header to use for query
  * @return             0 always
  */
-int showQueryPackage(QVA_t qva, rpmts ts, Header h)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int showQueryPackage(QVA_t qva, rpmts ts, Header h);
 
 /** \ingroup rpmcli
  * Iterate over query/verify arg list.
@@ -383,11 +326,7 @@ int showQueryPackage(QVA_t qva, rpmts ts, Header h)
  * @param argv         query argument(s) (or NULL)
  * @return             0 on success, else no. of failures
  */
-int rpmcliArgIter(rpmts ts, QVA_t qva, /*@null@*/ ARGV_t argv)
-       /*@globals ftsOpts, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, qva, ftsOpts, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+int rpmcliArgIter(rpmts ts, QVA_t qva, ARGV_t argv);
 
 /** \ingroup rpmcli
  * Display package information.
@@ -397,11 +336,7 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, /*@null@*/ ARGV_t argv)
  * @param argv         query argument(s) (or NULL)
  * @return             0 on success, else no. of failures
  */
-int rpmcliQuery(rpmts ts, QVA_t qva, /*@null@*/ const char ** argv)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, qva, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+int rpmcliQuery(rpmts ts, QVA_t qva, const char ** argv);
 
 /** \ingroup rpmcli
  * Verify file attributes (including MD5 sum).
@@ -412,13 +347,8 @@ int rpmcliQuery(rpmts ts, QVA_t qva, /*@null@*/ const char ** argv)
  * @param omitMask     bit(s) to disable verify checks
  * @return             0 on success (or not installed), 1 on error
  */
-/*@-incondefs@*/
 int rpmVerifyFile(const rpmts ts, rpmfi fi,
-               /*@out@*/ rpmVerifyAttrs * res, rpmVerifyAttrs omitMask)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fi, *res, fileSystem, internalState @*/
-       /*@requires maxSet(res) >= 0 @*/;
-/*@=incondefs@*/
+               rpmVerifyAttrs * res, rpmVerifyAttrs omitMask);
 
 /** \ingroup rpmcli
  * Display results of package verify.
@@ -427,9 +357,7 @@ int rpmVerifyFile(const rpmts ts, rpmfi fi,
  * @param h            header to use for verify
  * @return             result of last non-zero verify return
  */
-int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int showVerifyPackage(QVA_t qva, rpmts ts, Header h);
 
 /**
  * Check package and header signatures.
@@ -439,10 +367,7 @@ int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
  * @param fn           package file name
  * @return             0 on success, 1 on failure
  */
-int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd, const char * fn)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies qva, ts, fd, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/;
+int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd, const char * fn);
 
 /** \ingroup rpmcli
  * Verify package install.
@@ -452,16 +377,10 @@ int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd, const char * fn)
  * @param argv         verify argument(s) (or NULL)
  * @return             0 on success, else no. of failures
  */
-int rpmcliVerify(rpmts ts, QVA_t qva, /*@null@*/ const char ** argv)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, qva, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+int rpmcliVerify(rpmts ts, QVA_t qva, const char ** argv);
 
-/*@}*/
 /* ==================================================================== */
 /** \name RPMBT */
-/*@{*/
 
 /** \ingroup rpmcli
  * Describe build command line request.
@@ -469,13 +388,9 @@ int rpmcliVerify(rpmts ts, QVA_t qva, /*@null@*/ const char ** argv)
 struct rpmBuildArguments_s {
     rpmQueryFlags qva_flags;   /*!< Bit(s) to control verification. */
     int buildAmount;           /*!< Bit(s) to control operation. */
-/*@null@*/
     const char * buildRootOverride; /*!< from --buildroot */
-/*@null@*/
     char * targets;            /*!< Target platform(s), comma separated. */
-/*@observer@*/
     const char * passPhrase;   /*!< Pass phrase. */
-/*@only@*/ /*@null@*/
     const char * cookie;       /*!< NULL for binary, ??? for source, rpm's */
     int force;                 /*!< from --force */
     int noBuild;               /*!< from --nobuild */
@@ -486,7 +401,6 @@ struct rpmBuildArguments_s {
     int useCatalog;            /*!< from --usecatalog */
     char buildMode;            /*!< Build mode (one of "btBC") */
     char buildChar;            /*!< Build stage (one of "abcilps ") */
-/*@observer@*/ /*@null@*/
     const char * rootdir;
 };
 
@@ -496,29 +410,20 @@ typedef   struct rpmBuildArguments_s *    BTA_t;
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct rpmBuildArguments_s      rpmBTArgs;
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct poptOption               rpmBuildPoptTable[];
 
-/*@}*/
 /* ==================================================================== */
 /** \name RPMEIU */
-/*@{*/
 /* --- install/upgrade/erase modes */
 
-/*@unchecked@*/
 extern int rpmcliPackagesTotal;
-/*@unchecked@*/
 extern int rpmcliHashesCurrent;
-/*@unchecked@*/
 extern int rpmcliHashesTotal;
-/*@unchecked@*/
 extern int rpmcliProgressCurrent;
-/*@unchecked@*/
 extern int rpmcliProgressTotal;
 
 /** \ingroup rpmcli
@@ -535,19 +440,12 @@ extern int rpmcliProgressTotal;
  * @param data         private data (e.g. rpmInstallInterfaceFlags)
  * @return             per-callback data (e.g. an opened FD_t)
  */
-/*@null@*/
-void * rpmShowProgress(/*@null@*/ const void * arg,
+void * rpmShowProgress(const void * arg,
                const rpmCallbackType what,
                const unsigned long amount,
                const unsigned long total,
-               /*@null@*/ fnpyKey key,
-               /*@null@*/ void * data)
-       /*@globals rpmcliHashesCurrent,
-               rpmcliProgressCurrent, rpmcliProgressTotal,
-               h_errno, fileSystem, internalState @*/
-       /*@modifies rpmcliHashesCurrent,
-               rpmcliProgressCurrent, rpmcliProgressTotal,
-               fileSystem, internalState @*/;
+               fnpyKey key,
+               void * data);
 
 /** \ingroup rpmcli
  * Install source rpm package.
@@ -558,12 +456,8 @@ void * rpmShowProgress(/*@null@*/ const void * arg,
  * @return             0 on success
  */
 int rpmInstallSource(rpmts ts, const char * arg,
-               /*@null@*/ /*@out@*/ const char ** specFilePtr,
-               /*@null@*/ /*@out@*/ const char ** cookie)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState@*/
-       /*@modifies ts, *specFilePtr, *cookie, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const char ** specFilePtr,
+               const char ** cookie);
 
 /** \ingroup rpmcli
  * Describe database command line requests.
@@ -578,11 +472,8 @@ struct rpmInstallArguments_s {
     int numRelocations;
     int noDeps;
     int incldocs;
-/*@owned@*/ /*@null@*/
     rpmRelocation * relocations;
-/*@null@*/
     const char * prefix;
-/*@observer@*/ /*@null@*/
     const char * rootdir;
 };
 
@@ -594,11 +485,7 @@ struct rpmInstallArguments_s {
  * @return             0 on success
  */
 int rpmInstall(rpmts ts, struct rpmInstallArguments_s * ia,
-               /*@null@*/ const char ** fileArgv)
-       /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState@*/
-       /*@modifies ts, ia, rpmcliPackagesTotal, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const char ** fileArgv);
 
 /** \ingroup rpmcli
  * Erase binary rpm package.
@@ -609,10 +496,7 @@ int rpmInstall(rpmts ts, struct rpmInstallArguments_s * ia,
  */
 
 int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia,
-               /*@null@*/ const char ** argv)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, ia, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const char ** argv);
 
 /** \ingroup rpmcli
  * Rollback transactions, erasing new, reinstalling old, package(s).
@@ -622,26 +506,18 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia,
  * @return             0 on success
  */
 int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia,
-               /*@null@*/ const char ** argv)
-       /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, ia, rpmcliPackagesTotal, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const char ** argv);
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct rpmInstallArguments_s rpmIArgs;
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct poptOption rpmInstallPoptTable[];
 
-/*@}*/
 /* ==================================================================== */
 /** \name RPMDB */
-/*@{*/
 /* --- database modes */
 
 /** \ingroup rpmcli
@@ -655,18 +531,14 @@ struct rpmDatabaseArguments_s {
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct rpmDatabaseArguments_s rpmDBArgs;
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct poptOption rpmDatabasePoptTable[];
 
-/*@}*/
 /* ==================================================================== */
 /** \name RPMK */
-/*@{*/
 
 /** \ingroup rpmcli
  * Import public key packet(s).
@@ -677,16 +549,11 @@ extern struct poptOption rpmDatabasePoptTable[];
  * @return             RPMRC_OK/RPMRC_FAIL
  */
 rpmRC rpmcliImportPubkey(const rpmts ts,
-               const unsigned char * pkt, ssize_t pktlen)
-       /*@globals RPMVERSION, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const unsigned char * pkt, ssize_t pktlen);
 
 /** \ingroup rpmcli
  * Bit(s) to control rpmReSign() operation.
  */
-/*@-typeuse@*/
 typedef enum rpmSignFlags_e {
     RPMSIGN_NONE               = 0,
     RPMSIGN_CHK_SIGNATURE      = 'K',  /*!< from --checksig */
@@ -695,11 +562,9 @@ typedef enum rpmSignFlags_e {
     RPMSIGN_DEL_SIGNATURE      = 'D',  /*!< from --delsign */
     RPMSIGN_IMPORT_PUBKEY      = 'I',  /*!< from --import */
 } rpmSignFlags;
-/*@=typeuse@*/
 
 /** \ingroup rpmcli
  */
-/*@unchecked@*/
 extern struct poptOption rpmSignPoptTable[];
 
 /** \ingroup rpmcli
@@ -709,13 +574,7 @@ extern struct poptOption rpmSignPoptTable[];
  * @param argv         array of arguments (NULL terminated)
  * @return             0 on success
  */
-int rpmcliSign(rpmts ts, QVA_t qva, /*@null@*/ const char ** argv)
-       /*@globals RPMVERSION, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, qva, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
-
-/*@}*/
+int rpmcliSign(rpmts ts, QVA_t qva, const char ** argv);
 
 #ifdef __cplusplus
 }
index a668a6c..e903ec2 100644 (file)
 /**
  * Enable noisy range comparison debugging message?
  */
-/*@unchecked@*/
 static int _noisy_range_comparison_debug_message = 0;
 
-/*@unchecked@*/
 int _rpmds_debug = 0;
 
-/*@unchecked@*/
 int _rpmds_nopromote = 1;
 
-/*@unchecked@*/
-/*@-exportheadervar@*/
 int _rpmds_unspecified_epoch_noise = 0;
-/*@=exportheadervar@*/
 
 rpmds XrpmdsUnlink(rpmds ds, const char * msg, const char * fn, unsigned ln)
 {
     if (ds == NULL) return NULL;
-/*@-modfilesys@*/
 if (_rpmds_debug && msg != NULL)
 fprintf(stderr, "--> ds %p -- %d %s at %s:%u\n", ds, ds->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
     ds->nrefs--;
     return NULL;
 }
@@ -43,12 +35,10 @@ rpmds XrpmdsLink(rpmds ds, const char * msg, const char * fn, unsigned ln)
     if (ds == NULL) return NULL;
     ds->nrefs++;
 
-/*@-modfilesys@*/
 if (_rpmds_debug && msg != NULL)
 fprintf(stderr, "--> ds %p ++ %d %s at %s:%u\n", ds, ds->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
 
-    /*@-refcounttrans@*/ return ds; /*@=refcounttrans@*/
+    return ds;
 }
 
 rpmds rpmdsFree(rpmds ds)
@@ -62,10 +52,8 @@ rpmds rpmdsFree(rpmds ds)
     if (ds->nrefs > 1)
        return rpmdsUnlink(ds, ds->Type);
 
-/*@-modfilesys@*/
 if (_rpmds_debug < 0)
 fprintf(stderr, "*** ds %p\t%s[%d]\n", ds, ds->Type, ds->Count);
-/*@=modfilesys@*/
 
     if (ds->tagN == RPMTAG_PROVIDENAME) {
        tagEVR = RPMTAG_PROVIDEVERSION;
@@ -89,32 +77,23 @@ fprintf(stderr, "*** ds %p\t%s[%d]\n", ds, ds->Type, ds->Count);
     } else
        return NULL;
 
-    /*@-branchstate@*/
     if (ds->Count > 0) {
        ds->N = hfd(ds->N, ds->Nt);
        ds->EVR = hfd(ds->EVR, ds->EVRt);
-       /*@-evalorder@*/
        ds->Flags = (ds->h != NULL ? hfd(ds->Flags, ds->Ft) : _free(ds->Flags));
-       /*@=evalorder@*/
        ds->h = headerFree(ds->h);
     }
-    /*@=branchstate@*/
 
     ds->DNEVR = _free(ds->DNEVR);
     ds->Color = _free(ds->Color);
     ds->Refs = _free(ds->Refs);
 
     (void) rpmdsUnlink(ds, ds->Type);
-    /*@-refcounttrans -usereleased@*/
-/*@-boundswrite@*/
     memset(ds, 0, sizeof(*ds));                /* XXX trash and burn */
-/*@=boundswrite@*/
     ds = _free(ds);
-    /*@=refcounttrans =usereleased@*/
     return NULL;
 }
 
-/*@unchecked@*/ /*@observer@*/
 static const char * beehiveToken = "redhatbuilddependency";
 
 /**
@@ -123,8 +102,6 @@ static const char * beehiveToken = "redhatbuilddependency";
  * @returns            0 == false, 1 == true
  */
 static int archFilter(const char * arch)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     static int oneshot = 0;
     int negate = 0;    /* assume no negation. */
@@ -149,10 +126,8 @@ static int archFilter(const char * arch)
                rc = (!strcmp(arch, myarch) ? 0 : 1);
            else
                rc = (!strcmp(arch, myarch) ? 1 : 0);
-/*@-modfilesys@*/
 if (_rpmds_debug < 0)
 fprintf(stderr, "=== strcmp(\"%s\", \"%s\") negate %d rc %d\n", arch, myarch, negate, rc);
-/*@=modfilesys@*/
        }
     } else {
        int archScore = rpmMachineScore(RPM_MACHTABLE_INSTARCH, arch);
@@ -160,10 +135,8 @@ fprintf(stderr, "=== strcmp(\"%s\", \"%s\") negate %d rc %d\n", arch, myarch, ne
            rc = (archScore > 0 ? 0 : 1);
        else
            rc = (archScore > 0 ? 1 : 0);
-/*@-modfilesys@*/
 if (_rpmds_debug < 0)
 fprintf(stderr, "=== archScore(\"%s\") %d negate %d rc %d\n", arch, archScore, negate, rc);
-/*@=modfilesys@*/
     }
     return rc;
 }
@@ -174,11 +147,8 @@ fprintf(stderr, "=== archScore(\"%s\") %d negate %d rc %d\n", arch, archScore, n
  * @param token                namespace string
  * @returns            filtered dependency set
  */
-/*@null@*/
-static rpmds rpmdsFilter(/*@null@*/ /*@returned@*/ rpmds ds,
-               /*@null@*/ const char * token)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ds, rpmGlobalMacroContext, fileSystem, internalState @*/
+static rpmds rpmdsFilter(rpmds ds,
+               const char * token)
 {
     size_t toklen;
     rpmds fds;
@@ -213,10 +183,8 @@ static rpmds rpmdsFilter(/*@null@*/ /*@returned@*/ rpmds ds,
            continue;
        if (*(fe = N + len - 1) != ')')
            continue;
-/*@-modfilesys@*/
 if (_rpmds_debug < 0)
 fprintf(stderr, "*** f \"%s\"\n", f);
-/*@=modfilesys@*/
        g = f + 1;
        state = 0;
        gN = NULL;
@@ -230,26 +198,22 @@ fprintf(stderr, "*** f \"%s\"\n", f);
                nb = sizeof(buf) - 1;
            (void) strncpy(buf, g, nb);
            buf[nb] = '\0';
-/*@-branchstate@*/
            switch (state) {
            case 0:             /* g is unwrapped N */
                gN = xstrdup(buf);
-               /*@switchbreak@*/ break;
+               break;
            default:            /* g is next arch score token. */
                /* arch score tokens are compared assuming || */
                if (archFilter(buf))
                    ignore = 0;
-               /*@switchbreak@*/ break;
+               break;
            }
-/*@=branchstate@*/
            state++;
        }
        if (ignore) {
            int Count = rpmdsCount(fds);
-/*@-modfilesys@*/
 if (_rpmds_debug < 0)
 fprintf(stderr, "***   deleting N[%d:%d] = \"%s\"\n", i, Count, N);
-/*@=modfilesys@*/
            if (i < (Count - 1)) {
                memmove((fds->N + i), (fds->N + i + 1), (Count - (i+1)) * sizeof(*fds->N));
                if (fds->EVR != NULL)
@@ -260,23 +224,17 @@ fprintf(stderr, "***   deleting N[%d:%d] = \"%s\"\n", i, Count, N);
            }
            fds->Count--;
        } else if (gN != NULL) {
-/*@-modobserver -observertrans@*/
            char * t = (char *) N;
            (void) strcpy(t, gN);
-/*@=modobserver =observertrans@*/
-/*@-modfilesys@*/
 if (_rpmds_debug < 0)
 fprintf(stderr, "*** unwrapping N[%d] = \"%s\"\n", i, N);
-/*@=modfilesys@*/
        }
        gN = _free(gN);
     }
     fds = rpmdsFree(fds);
 
 exit:
-    /*@-refcounttrans@*/
     return ds;
-    /*@=refcounttrans@*/
 }
 
 rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
@@ -322,7 +280,6 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
     } else
        goto exit;
 
-    /*@-branchstate@*/
     if (hge(h, tagN, &Nt, (void **) &N, &Count)
      && N != NULL && Count > 0)
     {
@@ -341,28 +298,22 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
 
        xx = hge(h, tagEVR, &ds->EVRt, (void **) &ds->EVR, NULL);
        xx = hge(h, tagF, &ds->Ft, (void **) &ds->Flags, NULL);
-/*@-boundsread@*/
        if (!scareMem && ds->Flags != NULL)
            ds->Flags = memcpy(xmalloc(ds->Count * sizeof(*ds->Flags)),
                                 ds->Flags, ds->Count * sizeof(*ds->Flags));
        xx = hge(h, tagBT, &BTt, (void **) &BTp, NULL);
        ds->BT = (xx && BTp != NULL && BTt == RPM_INT32_TYPE ? *BTp : 0);
-/*@=boundsread@*/
        ds->Color = xcalloc(Count, sizeof(*ds->Color));
        ds->Refs = xcalloc(Count, sizeof(*ds->Refs));
 
-/*@-modfilesys@*/
 if (_rpmds_debug < 0)
 fprintf(stderr, "*** ds %p\t%s[%d]\n", ds, ds->Type, ds->Count);
-/*@=modfilesys@*/
 
     }
-    /*@=branchstate@*/
 
 exit:
-    /*@-nullstate@*/ /* FIX: ds->Flags may be NULL */
+    /* FIX: ds->Flags may be NULL */
     ds = rpmdsLink(ds, (ds ? ds->Type : NULL));
-    /*@=nullstate@*/
 
     if (!nofilter)
        ds = rpmdsFilter(ds, beehiveToken);
@@ -377,7 +328,6 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
 
     nb = 0;
     if (dspfx) nb += strlen(dspfx) + 1;
-/*@-boundsread@*/
     if (ds->N[ds->i])  nb += strlen(ds->N[ds->i]);
     /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
     if (ds->Flags != NULL && (ds->Flags[ds->i] & RPMSENSE_SENSEMASK)) {
@@ -391,9 +341,7 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
        if (nb) nb++;
        nb += strlen(ds->EVR[ds->i]);
     }
-/*@=boundsread@*/
 
-/*@-boundswrite@*/
     t = tbuf = xmalloc(nb + 1);
     if (dspfx) {
        t = stpcpy(t, dspfx);
@@ -414,7 +362,6 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
        t = stpcpy(t, ds->EVR[ds->i]);
     }
     *t = '\0';
-/*@=boundswrite@*/
     return tbuf;
 }
 
@@ -451,7 +398,6 @@ rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
     xx = hge(h, RPMTAG_EPOCH, NULL, (void **)&ep, NULL);
 
     t = xmalloc(sizeof(*N) + strlen(n) + 1);
-/*@-boundswrite@*/
     N = (const char **) t;
     t += sizeof(*N);
     *t = '\0';
@@ -469,7 +415,6 @@ rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
        t += strlen(t);
     }
     t = stpcpy( stpcpy( stpcpy( t, v), "-"), r);
-/*@=boundswrite@*/
 
     ds = xcalloc(1, sizeof(*ds));
     ds->h = NULL;
@@ -480,18 +425,13 @@ rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
     ds->Nt = -1;       /* XXX to insure that hfd will free */
     ds->EVR = EVR;
     ds->EVRt = -1;     /* XXX to insure that hfd will free */
-/*@-boundswrite@*/
     ds->Flags = xmalloc(sizeof(*ds->Flags));   ds->Flags[0] = Flags;
-/*@=boundswrite@*/
     ds->i = 0;
     {  char pre[2];
-/*@-boundsread@*/
        pre[0] = ds->Type[0];
-/*@=boundsread@*/
        pre[1] = '\0';
-       /*@-nullstate@*/ /* LCL: ds->Type may be NULL ??? */
+       /* LCL: ds->Type may be NULL ??? */
        ds->DNEVR = rpmdsNewDNEVR(pre, ds);
-       /*@=nullstate@*/
     }
 
 exit:
@@ -528,20 +468,14 @@ rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int_32 Flags)
        ds->BT = now;
     }
     ds->Count = 1;
-    /*@-assignexpose@*/
-/*@-boundswrite@*/
     ds->N = xmalloc(sizeof(*ds->N));           ds->N[0] = N;
     ds->Nt = -1;       /* XXX to insure that hfd will free */
     ds->EVR = xmalloc(sizeof(*ds->EVR));       ds->EVR[0] = EVR;
     ds->EVRt = -1;     /* XXX to insure that hfd will free */
-    /*@=assignexpose@*/
     ds->Flags = xmalloc(sizeof(*ds->Flags));   ds->Flags[0] = Flags;
-/*@=boundswrite@*/
     ds->i = 0;
     {  char t[2];
-/*@-boundsread@*/
        t[0] = ds->Type[0];
-/*@=boundsread@*/
        t[1] = '\0';
        ds->DNEVR = rpmdsNewDNEVR(t, ds);
     }
@@ -576,10 +510,8 @@ const char * rpmdsDNEVR(const rpmds ds)
     const char * DNEVR = NULL;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
        if (ds->DNEVR != NULL)
            DNEVR = ds->DNEVR;
-/*@=boundsread@*/
     }
     return DNEVR;
 }
@@ -589,10 +521,8 @@ const char * rpmdsN(const rpmds ds)
     const char * N = NULL;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
        if (ds->N != NULL)
            N = ds->N[ds->i];
-/*@=boundsread@*/
     }
     return N;
 }
@@ -602,10 +532,8 @@ const char * rpmdsEVR(const rpmds ds)
     const char * EVR = NULL;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
        if (ds->EVR != NULL)
            EVR = ds->EVR[ds->i];
-/*@=boundsread@*/
     }
     return EVR;
 }
@@ -615,10 +543,8 @@ int_32 rpmdsFlags(const rpmds ds)
     int_32 Flags = 0;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
        if (ds->Flags != NULL)
            Flags = ds->Flags[ds->i];
-/*@=boundsread@*/
     }
     return Flags;
 }
@@ -675,10 +601,8 @@ uint_32 rpmdsColor(const rpmds ds)
     uint_32 Color = 0;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
        if (ds->Color != NULL)
            Color = ds->Color[ds->i];
-/*@=boundsread@*/
     }
     return Color;
 }
@@ -688,12 +612,10 @@ uint_32 rpmdsSetColor(const rpmds ds, uint_32 color)
     uint_32 ocolor = 0;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-bounds@*/
        if (ds->Color != NULL) {
            ocolor = ds->Color[ds->i];
            ds->Color[ds->i] = color;
        }
-/*@=bounds@*/
     }
     return ocolor;
 }
@@ -703,10 +625,8 @@ int_32 rpmdsRefs(const rpmds ds)
     int_32 Refs = 0;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-boundsread@*/
        if (ds->Refs != NULL)
            Refs = ds->Refs[ds->i];
-/*@=boundsread@*/
     }
     return Refs;
 }
@@ -716,12 +636,10 @@ int_32 rpmdsSetRefs(const rpmds ds, int_32 refs)
     int_32 orefs = 0;
 
     if (ds != NULL && ds->i >= 0 && ds->i < ds->Count) {
-/*@-bounds@*/
        if (ds->Refs != NULL) {
            orefs = ds->Refs[ds->i];
            ds->Refs[ds->i] = refs;
        }
-/*@=bounds@*/
     }
     return orefs;
 }
@@ -739,8 +657,7 @@ void rpmdsNotify(rpmds ds, const char * where, int rc)
                (where != NULL ? where : ""));
 }
 
-int rpmdsNext(/*@null@*/ rpmds ds)
-       /*@modifies ds @*/
+int rpmdsNext(rpmds ds)
 {
     int i = -1;
 
@@ -751,37 +668,28 @@ int rpmdsNext(/*@null@*/ rpmds ds)
            ds->DNEVR = _free(ds->DNEVR);
            t[0] = ((ds->Type != NULL) ? ds->Type[0] : '\0');
            t[1] = '\0';
-           /*@-nullstate@*/
            ds->DNEVR = rpmdsNewDNEVR(t, ds);
-           /*@=nullstate@*/
 
        } else
            ds->i = -1;
 
-/*@-modfilesys @*/
 if (_rpmds_debug  < 0 && i != -1)
 fprintf(stderr, "*** ds %p\t%s[%d]: %s\n", ds, (ds->Type ? ds->Type : "?Type?"), i, (ds->DNEVR ? ds->DNEVR : "?DNEVR?"));
-/*@=modfilesys @*/
 
     }
 
     return i;
 }
 
-rpmds rpmdsInit(/*@null@*/ rpmds ds)
-       /*@modifies ds @*/
+rpmds rpmdsInit(rpmds ds)
 {
     if (ds != NULL)
        ds->i = -1;
-    /*@-refcounttrans@*/
     return ds;
-    /*@=refcounttrans@*/
 }
 
-/*@-bounds@*/
-static /*@null@*/
-const char ** rpmdsDupArgv(/*@null@*/ const char ** argv, int argc)
-       /*@*/
+static
+const char ** rpmdsDupArgv(const char ** argv, int argc)
 {
     const char ** av;
     size_t nb = 0;
@@ -803,23 +711,16 @@ assert(argv[ac] != NULL);
        t = stpcpy(t, argv[ac]) + 1;
     }
     av[ac] = NULL;
-/*@-nullret@*/
     return av;
-/*@=nullret@*/
 }
-/*@=bounds@*/
 
-/*@null@*/
 static rpmds rpmdsDup(const rpmds ods)
-       /*@modifies ods @*/
 {
     rpmds ds = xcalloc(1, sizeof(*ds));
     size_t nb;
 
     ds->h = (ods->h != NULL ? headerLink(ods->h) : NULL);
-/*@-assignexpose@*/
     ds->Type = ods->Type;
-/*@=assignexpose@*/
     ds->tagN = ods->tagN;
     ds->Count = ods->Count;
     ds->i = ods->i;
@@ -848,9 +749,8 @@ assert(ods->Flags != NULL);
        : memcpy(xmalloc(nb), ods->Flags, nb) );
     ds->Ft = ods->Ft;
 
-/*@-compmempass@*/ /* FIX: ds->Flags is kept, not only */
+/* FIX: ds->Flags is kept, not only */
     return rpmdsLink(ds, (ds ? ds->Type : NULL));
-/*@=compmempass@*/
 
 }
 
@@ -869,12 +769,10 @@ int rpmdsFind(rpmds ds, const rpmds ods)
        comparison = strcmp(ods->N[ods->i], ds->N[ds->i]);
 
        /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
-/*@-nullderef@*/
        if (comparison == 0 && ods->EVR && ds->EVR)
            comparison = strcmp(ods->EVR[ods->i], ds->EVR[ds->i]);
        if (comparison == 0 && ods->Flags && ds->Flags)
            comparison = (ods->Flags[ods->i] - ds->Flags[ds->i]);
-/*@=nullderef@*/
 
        if (comparison < 0)
            ds->u = ds->i;
@@ -899,14 +797,12 @@ int save;
        return -1;
 
     /* If not initialized yet, dup the 1st entry. */
-/*@-branchstate@*/
     if (*dsp == NULL) {
        save = ods->Count;
        ods->Count = 1;
        *dsp = rpmdsDup(ods);
        ods->Count = save;
     }
-/*@=branchstate@*/
     ds = *dsp;
     if (ds == NULL)
        return -1;
@@ -935,7 +831,6 @@ save = ods->i;
        ds->N = N;
        
        /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
-/*@-nullderef -nullpass -nullptrarith @*/
 assert(ods->EVR != NULL);
 assert(ods->Flags != NULL);
 
@@ -954,15 +849,12 @@ assert(ods->Flags != NULL);
        Flags[ds->u] = ods->Flags[ods->i];
        ds->Flags = _free(ds->Flags);
        ds->Flags = Flags;
-/*@=nullderef =nullpass =nullptrarith @*/
 
        ds->i = ds->Count;
        ds->Count++;
 
     }
-/*@-nullderef@*/
 ods->i = save;
-/*@=nullderef@*/
     return 0;
 }
 
@@ -975,11 +867,9 @@ ods->i = save;
  */
 static
 void parseEVR(char * evr,
-               /*@exposed@*/ /*@out@*/ const char ** ep,
-               /*@exposed@*/ /*@out@*/ const char ** vp,
-               /*@exposed@*/ /*@out@*/ const char ** rp)
-       /*@modifies *ep, *vp, *rp @*/
-       /*@requires maxSet(ep) >= 0 /\ maxSet(vp) >= 0 /\ maxSet(rp) >= 0 @*/
+               const char ** ep,
+               const char ** vp,
+               const char ** rp)
 {
     const char *epoch;
     const char *version;               /* assume only version is present */
@@ -994,17 +884,13 @@ void parseEVR(char * evr,
        epoch = evr;
        *s++ = '\0';
        version = s;
-       /*@-branchstate@*/
        if (*epoch == '\0') epoch = "0";
-       /*@=branchstate@*/
     } else {
        epoch = NULL;   /* XXX disable epoch compare if missing */
        version = evr;
     }
     if (se) {
-/*@-boundswrite@*/
        *se++ = '\0';
-/*@=boundswrite@*/
        release = se;
     } else {
        release = NULL;
@@ -1024,7 +910,6 @@ int rpmdsCompare(const rpmds A, const rpmds B)
     int result;
     int sense;
 
-/*@-boundsread@*/
     /* Different names don't overlap. */
     if (strcmp(A->N[A->i], B->N[B->i])) {
        result = 0;
@@ -1032,7 +917,6 @@ int rpmdsCompare(const rpmds A, const rpmds B)
     }
 
     /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */
-/*@-nullderef@*/
     if (!(A->EVR && A->Flags && B->EVR && B->Flags)) {
        result = 1;
        goto exit;
@@ -1051,12 +935,10 @@ int rpmdsCompare(const rpmds A, const rpmds B)
     }
 
     /* Both AEVR and BEVR exist. */
-/*@-boundswrite@*/
     aEVR = xstrdup(A->EVR[A->i]);
     parseEVR(aEVR, &aE, &aV, &aR);
     bEVR = xstrdup(B->EVR[B->i]);
     parseEVR(bEVR, &bE, &bV, &bR);
-/*@=boundswrite@*/
 
     /* Compare {A,B} [epoch:]version[-release] */
     sense = 0;
@@ -1078,7 +960,6 @@ int rpmdsCompare(const rpmds A, const rpmds B)
        if (sense == 0 && aR && *aR && bR && *bR)
            sense = rpmvercmp(aR, bR);
     }
-/*@=boundsread@*/
     aEVR = _free(aEVR);
     bEVR = _free(bEVR);
 
@@ -1094,7 +975,6 @@ int rpmdsCompare(const rpmds A, const rpmds B)
         ((A->Flags[A->i] & RPMSENSE_GREATER) && (B->Flags[B->i] & RPMSENSE_GREATER)))) {
        result = 1;
     }
-/*@=nullderef@*/
 
 exit:
     if (_noisy_range_comparison_debug_message)
@@ -1116,11 +996,9 @@ void rpmdsProblem(rpmps ps, const char * pkgNEVR, const rpmds ds,
 
     if (ps == NULL) return;
 
-    /*@-branchstate@*/
     if (Name == NULL) Name = "?N?";
     if (EVR == NULL) EVR = "?EVR?";
     if (DNEVR == NULL) DNEVR = "? ?N? ?OP? ?EVR?";
-    /*@=branchstate@*/
 
     rpmMessage(RPMMESS_DEBUG, _("package %s has unsatisfied %s: %s\n"),
            pkgNEVR, ds->Type, DNEVR+2);
@@ -1145,10 +1023,8 @@ int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
     if (req->EVR == NULL || req->Flags == NULL)
        return 1;
 
-/*@-boundsread@*/
     if (!(req->Flags[req->i] & RPMSENSE_SENSEMASK) || !req->EVR[req->i] || *req->EVR[req->i] == '\0')
        return 1;
-/*@=boundsread@*/
 
     /* Get provides information from header */
     provides = rpmdsInit(rpmdsNew(h, RPMTAG_PROVIDENAME, scareMem));
@@ -1172,10 +1048,8 @@ int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
     while (rpmdsNext(provides) >= 0) {
 
        /* Filter out provides that came along for the ride. */
-/*@-boundsread@*/
        if (strcmp(provides->N[provides->i], req->N[req->i]))
            continue;
-/*@=boundsread@*/
 
        result = rpmdsCompare(provides, req);
 
@@ -1205,15 +1079,12 @@ int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
     if (req->EVR == NULL || req->Flags == NULL)
        return rc;
 
-/*@-boundsread@*/
     if (!((req->Flags[req->i] & RPMSENSE_SENSEMASK) && req->EVR[req->i] && *req->EVR[req->i]))
        return rc;
-/*@=boundsread@*/
 
     /* Get package information from header */
     (void) headerNVR(h, &pkgN, &v, &r);
 
-/*@-boundswrite@*/
     t = alloca(21 + strlen(v) + 1 + strlen(r) + 1);
     pkgEVR = t;
     *t = '\0';
@@ -1223,7 +1094,6 @@ int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
            t++;
     }
     (void) stpcpy( stpcpy( stpcpy(t, v) , "-") , r);
-/*@=boundswrite@*/
 
     if ((pkg = rpmdsSingle(RPMTAG_PROVIDENAME, pkgN, pkgEVR, pkgFlags)) != NULL) {
        if (nopromote)
index 124456c..c0c7dc1 100644 (file)
 
 /**
  */
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmds_debug;
-/*@=exportlocal@*/
 
 /**
  */
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmds_nopromote;
-/*@=exportlocal@*/
 
 #if defined(_RPMDS_INTERNAL)
 /**
  * A package dependency set.
  */
 struct rpmds_s {
-/*@observer@*/
     const char * Type;         /*!< Tag name. */
-/*@only@*/ /*@null@*/
     const char * DNEVR;                /*!< Formatted dependency string. */
-/*@refcounted@*/ /*@null@*/
     Header h;                  /*!< Header for dependency set (or NULL) */
-/*@only@*/
     const char ** N;           /*!< Name. */
-/*@only@*/ /*@null@*/
     const char ** EVR;         /*!< Epoch-Version-Release. */
-/*@only@*/ /*@null@*/
     int_32 * Flags;            /*!< Bit(s) identifying context/comparison. */
-/*@only@*/ /*@null@*/
     uint_32 * Color;           /*!< Bit(s) calculated from file color(s). */
-/*@only@*/ /*@null@*/
     int_32 * Refs;             /*!< No. of file refs. */
     int_32 BT;                 /*!< Package build time tie breaker. */
     rpmTag tagN;               /*!< Header tag. */
@@ -51,7 +37,6 @@ struct rpmds_s {
     unsigned l;                        /*!< Low element (bsearch). */
     unsigned u;                        /*!< High element (bsearch). */
     int nopromote;             /*!< Don't promote Epoch: in rpmdsCompare()? */
-/*@refs@*/
     int nrefs;                 /*!< Reference count. */
 };
 #endif /* _RPMDS_INTERNAL */
@@ -66,18 +51,12 @@ extern "C" {
  * @param msg
  * @return             NULL always
  */
-/*@unused@*/ /*@null@*/
-rpmds rpmdsUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmds ds,
-               /*@null@*/ const char * msg)
-       /*@modifies ds @*/;
+rpmds rpmdsUnlink (rpmds ds,
+               const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@-exportlocal@*/
-/*@null@*/
-rpmds XrpmdsUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmds ds,
-               /*@null@*/ const char * msg, const char * fn, unsigned ln)
-       /*@modifies ds @*/;
-/*@=exportlocal@*/
+rpmds XrpmdsUnlink (rpmds ds,
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmdsUnlink(_ds, _msg)  XrpmdsUnlink(_ds, _msg, __FILE__, __LINE__)
 
 /**
@@ -86,15 +65,11 @@ rpmds XrpmdsUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmds ds,
  * @param msg
  * @return             new dependency set reference
  */
-/*@unused@*/ /*@newref@*/ /*@null@*/
-rpmds rpmdsLink (/*@null@*/ rpmds ds, /*@null@*/ const char * msg)
-       /*@modifies ds @*/;
+rpmds rpmdsLink (rpmds ds, const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@newref@*/ /*@null@*/
-rpmds XrpmdsLink (/*@null@*/ rpmds ds, /*@null@*/ const char * msg,
-               const char * fn, unsigned ln)
-        /*@modifies ds @*/;
+rpmds XrpmdsLink (rpmds ds, const char * msg,
+               const char * fn, unsigned ln);
 #define        rpmdsLink(_ds, _msg)    XrpmdsLink(_ds, _msg, __FILE__, __LINE__)
 
 /**
@@ -102,9 +77,7 @@ rpmds XrpmdsLink (/*@null@*/ rpmds ds, /*@null@*/ const char * msg,
  * @param ds           dependency set
  * @return             NULL always
  */
-/*@null@*/
-rpmds rpmdsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmds ds)
-       /*@modifies ds@*/;
+rpmds rpmdsFree(rpmds ds);
 /**
  * Create and load a dependency set.
  * @deprecated Only scareMem = 0 will be permitted.
@@ -113,10 +86,7 @@ rpmds rpmdsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmds ds)
  * @param flags                scareMem(0x1), nofilter(0x2)
  * @return             new dependency set
  */
-/*@null@*/
-rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies h, rpmGlobalMacroContext, fileSystem, internalState @*/;
+rpmds rpmdsNew(Header h, rpmTag tagN, int flags);
 
 /**
  * Return new formatted dependency string.
@@ -124,9 +94,7 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int flags)
  * @param ds           dependency set
  * @return             new formatted dependency (malloc'ed)
  */
-/*@only@*/
-char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
-       /*@*/;
+char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds);
 
 /**
  * Create, load and initialize a dependency for this header. 
@@ -135,9 +103,7 @@ char * rpmdsNewDNEVR(const char * dspfx, const rpmds ds)
  * @param Flags                comparison flags
  * @return             new dependency set
  */
-/*@null@*/
-rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
-       /*@*/;
+rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags);
 
 /**
  * Create, load and initialize a dependency set of size 1.
@@ -147,25 +113,21 @@ rpmds rpmdsThis(Header h, rpmTag tagN, int_32 Flags)
  * @param Flags                comparison flags
  * @return             new dependency set
  */
-/*@null@*/
-rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int_32 Flags)
-       /*@*/;
+rpmds rpmdsSingle(rpmTag tagN, const char * N, const char * EVR, int_32 Flags);
 
 /**
  * Return dependency set count.
  * @param ds           dependency set
  * @return             current count
  */
-int rpmdsCount(/*@null@*/ const rpmds ds)
-       /*@*/;
+int rpmdsCount(const rpmds ds);
 
 /**
  * Return dependency set index.
  * @param ds           dependency set
  * @return             current index
  */
-int rpmdsIx(/*@null@*/ const rpmds ds)
-       /*@*/;
+int rpmdsIx(const rpmds ds);
 
 /**
  * Set dependency set index.
@@ -173,59 +135,49 @@ int rpmdsIx(/*@null@*/ const rpmds ds)
  * @param ix           new index
  * @return             current index
  */
-int rpmdsSetIx(/*@null@*/ rpmds ds, int ix)
-       /*@modifies ds @*/;
+int rpmdsSetIx(rpmds ds, int ix);
 
 /**
  * Return current formatted dependency string.
  * @param ds           dependency set
  * @return             current dependency DNEVR, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmdsDNEVR(/*@null@*/ const rpmds ds)
-       /*@*/;
+extern const char * rpmdsDNEVR(const rpmds ds);
 
 /**
  * Return current dependency name.
  * @param ds           dependency set
  * @return             current dependency name, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmdsN(/*@null@*/ const rpmds ds)
-       /*@*/;
+extern const char * rpmdsN(const rpmds ds);
 
 /**
  * Return current dependency epoch-version-release.
  * @param ds           dependency set
  * @return             current dependency EVR, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmdsEVR(/*@null@*/ const rpmds ds)
-       /*@*/;
+extern const char * rpmdsEVR(const rpmds ds);
 
 /**
  * Return current dependency flags.
  * @param ds           dependency set
  * @return             current dependency flags, 0 on invalid
  */
-int_32 rpmdsFlags(/*@null@*/ const rpmds ds)
-       /*@*/;
+int_32 rpmdsFlags(const rpmds ds);
 
 /**
  * Return current dependency type.
  * @param ds           dependency set
  * @return             current dependency type, 0 on invalid
  */
-rpmTag rpmdsTagN(/*@null@*/ const rpmds ds)
-       /*@*/;
+rpmTag rpmdsTagN(const rpmds ds);
 
 /**
  * Return dependency build time.
  * @param ds           dependency set
  * @return             dependency build time, 0 on invalid
  */
-time_t rpmdsBT(/*@null@*/ const rpmds ds)
-       /*@*/;
+time_t rpmdsBT(const rpmds ds);
 
 /**
  * Set dependency build time.
@@ -233,8 +185,7 @@ time_t rpmdsBT(/*@null@*/ const rpmds ds)
  * @param BT           build time
  * @return             dependency build time, 0 on invalid
  */
-time_t rpmdsSetBT(/*@null@*/ const rpmds ds, time_t BT)
-       /*@modifies ds @*/;
+time_t rpmdsSetBT(const rpmds ds, time_t BT);
 
 /**
  * Return current "Don't promote Epoch:" flag.
@@ -249,8 +200,7 @@ time_t rpmdsSetBT(/*@null@*/ const rpmds ds, time_t BT)
  * @param ds           dependency set
  * @return             current "Don't promote Epoch:" flag
  */
-int rpmdsNoPromote(/*@null@*/ const rpmds ds)
-       /*@*/;
+int rpmdsNoPromote(const rpmds ds);
 
 /**
  * Set "Don't promote Epoch:" flag.
@@ -258,16 +208,14 @@ int rpmdsNoPromote(/*@null@*/ const rpmds ds)
  * @param nopromote    Should an unspecified Epoch: be treated as Epoch: 0?
  * @return             previous "Don't promote Epoch:" flag
  */
-int rpmdsSetNoPromote(/*@null@*/ rpmds ds, int nopromote)
-       /*@modifies ds @*/;
+int rpmdsSetNoPromote(rpmds ds, int nopromote);
 
 /**
  * Return current dependency color.
  * @param ds           dependency set
  * @return             current dependency color
  */
-uint_32 rpmdsColor(/*@null@*/ const rpmds ds)
-       /*@*/;
+uint_32 rpmdsColor(const rpmds ds);
 
 /**
  * Return current dependency color.
@@ -275,16 +223,14 @@ uint_32 rpmdsColor(/*@null@*/ const rpmds ds)
  * @param color                new dependency color
  * @return             previous dependency color
  */
-uint_32 rpmdsSetColor(/*@null@*/ const rpmds ds, uint_32 color)
-       /*@modifies ds @*/;
+uint_32 rpmdsSetColor(const rpmds ds, uint_32 color);
 
 /**
  * Return current dependency file refs.
  * @param ds           dependency set
  * @return             current dependency file refs, -1 on global
  */
-int_32 rpmdsRefs(/*@null@*/ const rpmds ds)
-       /*@*/;
+int_32 rpmdsRefs(const rpmds ds);
 
 /**
  * Return current dependency color.
@@ -292,8 +238,7 @@ int_32 rpmdsRefs(/*@null@*/ const rpmds ds)
  * @param refs         new dependency refs
  * @return             previous dependency refs
  */
-int_32 rpmdsSetRefs(/*@null@*/ const rpmds ds, int_32 refs)
-       /*@modifies ds @*/;
+int_32 rpmdsSetRefs(const rpmds ds, int_32 refs);
 
 /**
  * Notify of results of dependency match.
@@ -301,28 +246,22 @@ int_32 rpmdsSetRefs(/*@null@*/ const rpmds ds, int_32 refs)
  * @param where                where dependency was resolved (or NULL)
  * @param rc           0 == YES, otherwise NO
  */
-/*@-globuse@*/ /* FIX: rpmMessage annotation is a lie */
-void rpmdsNotify(/*@null@*/ rpmds ds, /*@null@*/ const char * where, int rc)
-       /*@globals fileSystem @*/
-       /*@modifies fileSystem @*/;
-/*@=globuse@*/
+/* FIX: rpmMessage annotation is a lie */
+void rpmdsNotify(rpmds ds, const char * where, int rc);
 
 /**
  * Return next dependency set iterator index.
  * @param ds           dependency set
  * @return             dependency set iterator index, -1 on termination
  */
-int rpmdsNext(/*@null@*/ rpmds ds)
-       /*@modifies ds @*/;
+int rpmdsNext(rpmds ds);
 
 /**
  * Initialize dependency set iterator.
  * @param ds           dependency set
  * @return             dependency set
  */
-/*@null@*/
-rpmds rpmdsInit(/*@null@*/ rpmds ds)
-       /*@modifies ds @*/;
+rpmds rpmdsInit(rpmds ds);
 
 /**
  * Find a dependency set element using binary search.
@@ -330,9 +269,7 @@ rpmds rpmdsInit(/*@null@*/ rpmds ds)
  * @param ods          dependency set element to find.
  * @return             dependency index (or -1 if not found)
  */
-/*@null@*/
-int rpmdsFind(rpmds ds, /*@null@*/ const rpmds ods)
-       /*@modifies ds @*/;
+int rpmdsFind(rpmds ds, const rpmds ods);
 
 /**
  * Merge a dependency set maintaining (N,EVR,Flags) sorted order.
@@ -340,9 +277,7 @@ int rpmdsFind(rpmds ds, /*@null@*/ const rpmds ods)
  * @param ods          dependency set to merge
  * @return             (merged) dependency index
  */
-/*@null@*/
-int rpmdsMerge(/*@out@*/ rpmds * dsp, /*@null@*/ rpmds ods)
-       /*@modifies *dsp, ods @*/;
+int rpmdsMerge(rpmds * dsp, rpmds ods);
 
 /**
  * Compare two versioned dependency ranges, looking for overlap.
@@ -350,8 +285,7 @@ int rpmdsMerge(/*@out@*/ rpmds * dsp, /*@null@*/ rpmds ods)
  * @param B            2nd dependency
  * @return             1 if dependencies overlap, 0 otherwise
  */
-int rpmdsCompare(const rpmds A, const rpmds B)
-       /*@*/;
+int rpmdsCompare(const rpmds A, const rpmds B);
 
 /**
  * Report a Requires: or Conflicts: dependency problem.
@@ -361,10 +295,9 @@ int rpmdsCompare(const rpmds A, const rpmds B)
  * @param suggestedKeys        filename or python object address
  * @param adding       dependency problem is from added package set?
  */
-void rpmdsProblem(/*@null@*/ rpmps ps, const char * pkgNEVR, const rpmds ds,
-               /*@only@*/ /*@null@*/ const fnpyKey * suggestedKeys,
-               int adding)
-       /*@modifies ps @*/;
+void rpmdsProblem(rpmps ps, const char * pkgNEVR, const rpmds ds,
+               const fnpyKey * suggestedKeys,
+               int adding);
 
 /**
  * Compare package provides dependencies from header with a single dependency.
@@ -373,9 +306,7 @@ void rpmdsProblem(/*@null@*/ rpmps ps, const char * pkgNEVR, const rpmds ds,
  * @param nopromote    Don't promote Epoch: in comparison?
  * @return             1 if any dependency overlaps, 0 otherwise
  */
-int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies h, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote);
 
 /**
  * Compare package name-version-release from header with a single dependency.
@@ -384,8 +315,7 @@ int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
  * @param nopromote    Don't promote Epoch: in comparison?
  * @return             1 if dependency overlaps, 0 otherwise
  */
-int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote)
-       /*@*/;
+int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote);
 
 #ifdef __cplusplus
 }
index acd4185..dfbc123 100644 (file)
 
 #include "debug.h"
 
-/*@access rpmte @*/
 
-/*@unchecked@*/
 int _rpmfi_debug = 0;
 
 rpmfi XrpmfiUnlink(rpmfi fi, const char * msg, const char * fn, unsigned ln)
 {
     if (fi == NULL) return NULL;
-/*@-modfilesys@*/
 if (_rpmfi_debug && msg != NULL)
 fprintf(stderr, "--> fi %p -- %d %s at %s:%u\n", fi, fi->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
     fi->nrefs--;
     return NULL;
 }
@@ -47,11 +43,9 @@ rpmfi XrpmfiLink(rpmfi fi, const char * msg, const char * fn, unsigned ln)
 {
     if (fi == NULL) return NULL;
     fi->nrefs++;
-/*@-modfilesys@*/
 if (_rpmfi_debug && msg != NULL)
 fprintf(stderr, "--> fi %p ++ %d %s at %s:%u\n", fi, fi->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
-    /*@-refcounttrans@*/ return fi; /*@=refcounttrans@*/
+    return fi;
 }
 
 int rpmfiFC(rpmfi fi)
@@ -82,9 +76,7 @@ int rpmfiSetFX(rpmfi fi, int fx)
     if (fi != NULL && fx >= 0 && fx < fi->fc) {
        i = fi->i;
        fi->i = fx;
-/*@-boundsread@*/
        fi->j = fi->dil[fi->i];
-/*@=boundsread@*/
     }
     return i;
 }
@@ -110,10 +102,8 @@ const char * rpmfiBN(rpmfi fi)
     const char * BN = NULL;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->bnl != NULL)
            BN = fi->bnl[fi->i];
-/*@=boundsread@*/
     }
     return BN;
 }
@@ -123,10 +113,8 @@ const char * rpmfiDN(rpmfi fi)
     const char * DN = NULL;
 
     if (fi != NULL && fi->j >= 0 && fi->j < fi->dc) {
-/*@-boundsread@*/
        if (fi->dnl != NULL)
            DN = fi->dnl[fi->j];
-/*@=boundsread@*/
     }
     return DN;
 }
@@ -135,19 +123,15 @@ const char * rpmfiFN(rpmfi fi)
 {
     const char * FN = "";
 
-    /*@-branchstate@*/
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
        char * t;
        if (fi->fn == NULL)
            fi->fn = xmalloc(fi->fnlen);
        FN = t = fi->fn;
-/*@-boundswrite@*/
        *t = '\0';
        t = stpcpy(t, fi->dnl[fi->dil[fi->i]]);
        t = stpcpy(t, fi->bnl[fi->i]);
-/*@=boundswrite@*/
     }
-    /*@=branchstate@*/
     return FN;
 }
 
@@ -156,10 +140,8 @@ uint_32 rpmfiFFlags(rpmfi fi)
     int_32 FFlags = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fflags != NULL)
            FFlags = fi->fflags[fi->i];
-/*@=boundsread@*/
     }
     return FFlags;
 }
@@ -169,10 +151,8 @@ uint_32 rpmfiVFlags(rpmfi fi)
     int_32 VFlags = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->vflags != NULL)
            VFlags = fi->vflags[fi->i];
-/*@=boundsread@*/
     }
     return VFlags;
 }
@@ -182,10 +162,8 @@ int_16 rpmfiFMode(rpmfi fi)
     int_16 fmode = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fmodes != NULL)
            fmode = fi->fmodes[fi->i];
-/*@=boundsread@*/
     }
     return fmode;
 }
@@ -195,10 +173,8 @@ rpmfileState rpmfiFState(rpmfi fi)
     rpmfileState fstate = RPMFILE_STATE_MISSING;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fstates != NULL)
            fstate = fi->fstates[fi->i];
-/*@=boundsread@*/
     }
     return fstate;
 }
@@ -208,10 +184,8 @@ const unsigned char * rpmfiMD5(rpmfi fi)
     unsigned char * MD5 = NULL;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->md5s != NULL)
            MD5 = fi->md5s + (16 * fi->i);
-/*@=boundsread@*/
     }
     return MD5;
 }
@@ -221,10 +195,8 @@ const char * rpmfiFLink(rpmfi fi)
     const char * flink = NULL;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->flinks != NULL)
            flink = fi->flinks[fi->i];
-/*@=boundsread@*/
     }
     return flink;
 }
@@ -234,10 +206,8 @@ int_32 rpmfiFSize(rpmfi fi)
     int_32 fsize = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fsizes != NULL)
            fsize = fi->fsizes[fi->i];
-/*@=boundsread@*/
     }
     return fsize;
 }
@@ -247,10 +217,8 @@ int_16 rpmfiFRdev(rpmfi fi)
     int_16 frdev = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->frdevs != NULL)
            frdev = fi->frdevs[fi->i];
-/*@=boundsread@*/
     }
     return frdev;
 }
@@ -260,10 +228,8 @@ int_32 rpmfiFInode(rpmfi fi)
     int_32 finode = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->finodes != NULL)
            finode = fi->finodes[fi->i];
-/*@=boundsread@*/
     }
     return finode;
 }
@@ -283,11 +249,9 @@ uint_32 rpmfiFColor(rpmfi fi)
     uint_32 fcolor = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fcolors != NULL)
            /* XXX ignore all but lsnibble for now. */
            fcolor = (fi->fcolors[fi->i] & 0x0f);
-/*@=boundsread@*/
     }
     return fcolor;
 }
@@ -298,11 +262,9 @@ const char * rpmfiFClass(rpmfi fi)
     int cdictx;
 
     if (fi != NULL && fi->fcdictx != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        cdictx = fi->fcdictx[fi->i];
        if (fi->cdict != NULL && cdictx >= 0 && cdictx < fi->ncdict)
            fclass = fi->cdict[cdictx];
-/*@=boundsread@*/
     }
     return fclass;
 }
@@ -312,10 +274,8 @@ const char * rpmfiFContext(rpmfi fi)
     const char * fcontext = NULL;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fcontexts != NULL)
            fcontext = fi->fcontexts[fi->i];
-/*@=boundsread@*/
     }
     return fcontext;
 }
@@ -327,19 +287,15 @@ int_32 rpmfiFDepends(rpmfi fi, const uint_32 ** fddictp)
     const uint_32 * fddict = NULL;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fddictn != NULL)
            fddictn = fi->fddictn[fi->i];
        if (fddictn > 0 && fi->fddictx != NULL)
            fddictx = fi->fddictx[fi->i];
        if (fi->ddict != NULL && fddictx >= 0 && (fddictx+fddictn) <= fi->nddict)
            fddict = fi->ddict + fddictx;
-/*@=boundsread@*/
     }
-/*@-boundswrite -dependenttrans -onlytrans @*/
     if (fddictp)
        *fddictp = fddict;
-/*@=boundswrite =dependenttrans =onlytrans @*/
     return fddictn;
 }
 
@@ -349,7 +305,6 @@ int_32 rpmfiFNlink(rpmfi fi)
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
        /* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */
-/*@-boundsread@*/
        if (fi->finodes && fi->frdevs) {
            int_32 finode = fi->finodes[fi->i];
            int_16 frdev = fi->frdevs[fi->i];
@@ -360,7 +315,6 @@ int_32 rpmfiFNlink(rpmfi fi)
                    nlink++;
            }
        }
-/*@=boundsread@*/
     }
     return nlink;
 }
@@ -370,10 +324,8 @@ int_32 rpmfiFMtime(rpmfi fi)
     int_32 fmtime = 0;
 
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fmtimes != NULL)
            fmtime = fi->fmtimes[fi->i];
-/*@=boundsread@*/
     }
     return fmtime;
 }
@@ -384,10 +336,8 @@ const char * rpmfiFUser(rpmfi fi)
 
     /* XXX add support for ancient RPMTAG_FILEUIDS? */
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fuser != NULL)
            fuser = fi->fuser[fi->i];
-/*@=boundsread@*/
     }
     return fuser;
 }
@@ -398,10 +348,8 @@ const char * rpmfiFGroup(rpmfi fi)
 
     /* XXX add support for ancient RPMTAG_FILEGIDS? */
     if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
-/*@-boundsread@*/
        if (fi->fgroup != NULL)
            fgroup = fi->fgroup[fi->i];
-/*@=boundsread@*/
     }
     return fgroup;
 }
@@ -413,17 +361,13 @@ int rpmfiNext(rpmfi fi)
     if (fi != NULL && ++fi->i >= 0) {
        if (fi->i < fi->fc) {
            i = fi->i;
-/*@-boundsread@*/
            if (fi->dil != NULL)
                fi->j = fi->dil[fi->i];
-/*@=boundsread@*/
        } else
            fi->i = -1;
 
-/*@-modfilesys @*/
 if (_rpmfi_debug  < 0 && i != -1)
 fprintf(stderr, "*** fi %p\t%s[%d] %s%s\n", fi, (fi->Type ? fi->Type : "?Type?"), i, (i >= 0 ? fi->dnl[fi->j] : ""), (i >= 0 ? fi->bnl[fi->i] : ""));
-/*@=modfilesys @*/
 
     }
 
@@ -439,9 +383,7 @@ rpmfi rpmfiInit(rpmfi fi, int fx)
        }
     }
 
-    /*@-refcounttrans@*/
     return fi;
-    /*@=refcounttrans@*/
 }
 
 int rpmfiNextD(rpmfi fi)
@@ -454,10 +396,8 @@ int rpmfiNextD(rpmfi fi)
        else
            fi->j = -1;
 
-/*@-modfilesys @*/
 if (_rpmfi_debug  < 0 && j != -1)
 fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, (fi->Type ? fi->Type : "?Type?"), j);
-/*@=modfilesys @*/
 
     }
 
@@ -473,9 +413,7 @@ rpmfi rpmfiInitD(rpmfi fi, int dx)
            fi = NULL;
     }
 
-    /*@-refcounttrans@*/
     return fi;
-    /*@=refcounttrans@*/
 }
 
 /**
@@ -483,9 +421,8 @@ rpmfi rpmfiInitD(rpmfi fi, int dx)
  * @param ft           file type
  * @return             string to identify a file type
  */
-static /*@observer@*/
+static
 const char * ftstring (fileTypes ft)
-       /*@*/
 {
     switch (ft) {
     case XDIR: return "directory";
@@ -497,7 +434,6 @@ const char * ftstring (fileTypes ft)
     case REG:  return "file";
     default:   return "unknown file type";
     }
-    /*@notreached@*/
 }
 
 fileTypes whatis(uint_16 mode)
@@ -506,16 +442,12 @@ fileTypes whatis(uint_16 mode)
     if (S_ISCHR(mode)) return CDEV;
     if (S_ISBLK(mode)) return BDEV;
     if (S_ISLNK(mode)) return LINK;
-/*@-unrecog@*/
     if (S_ISSOCK(mode))        return SOCK;
-/*@=unrecog@*/
     if (S_ISFIFO(mode))        return PIPE;
     return REG;
 }
 
-/*@-boundsread@*/
 int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
-       /*@*/
 {
     fileTypes awhat = whatis(rpmfiFMode(afi));
     fileTypes bwhat = whatis(rpmfiFMode(bfi));
@@ -540,9 +472,7 @@ int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
 
     return 0;
 }
-/*@=boundsread@*/
 
-/*@-boundsread@*/
 fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
 {
     const char * fn = rpmfiFN(nfi);
@@ -601,10 +531,8 @@ fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
                return FA_CREATE;       /* unmodified config file, replace. */
        }
        nmd5 = rpmfiMD5(nfi);
-/*@-nullpass@*/
        if (omd5 && nmd5 && !memcmp(omd5, nmd5, 16))
            return FA_SKIP;     /* identical file, don't bother. */
-/*@=nullpass@*/
     } else /* dbWhat == LINK */ {
        const char * oFLink, * nFLink;
        oFLink = rpmfiFLink(ofi);
@@ -615,10 +543,8 @@ fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
            return FA_CREATE;   /* unmodified config file, replace. */
        }
        nFLink = rpmfiFLink(nfi);
-/*@-nullpass@*/
        if (oFLink && nFLink && !strcmp(oFLink, nFLink))
            return FA_SKIP;     /* identical file, don't bother. */
-/*@=nullpass@*/
     }
 
     /*
@@ -629,9 +555,7 @@ fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
      */
     return save;
 }
-/*@=boundsread@*/
 
-/*@-boundsread@*/
 int rpmfiConfigConflict(const rpmfi fi)
 {
     const char * fn = rpmfiFN(fi);
@@ -672,9 +596,7 @@ int rpmfiConfigConflict(const rpmfi fi)
 
     return 1;
 }
-/*@=boundsread@*/
 
-/*@observer@*/
 const char * rpmfiTypeString(rpmfi fi)
 {
     switch(rpmteType(fi->te)) {
@@ -682,7 +604,6 @@ const char * rpmfiTypeString(rpmfi fi)
     case TR_REMOVED:   return "   erase";
     default:           return "???";
     }
-    /*@noteached@*/
 }
 
 #define alloca_strdup(_s)      strcpy(alloca(strlen(_s)+1), (_s))
@@ -696,12 +617,9 @@ const char * rpmfiTypeString(rpmfi fi)
  * @param actions      file dispositions
  * @return             header with relocated files
  */
-/*@-bounds@*/
 static
 Header relocateFileList(const rpmts ts, rpmfi fi,
                Header origH, fileAction * actions)
-       /*@globals h_errno, rpmGlobalMacroContext @*/
-       /*@modifies ts, fi, origH, actions, rpmGlobalMacroContext @*/
 {
     rpmte p = rpmtsRelocateElement(ts);
     HGE_t hge = fi->hge;
@@ -780,28 +698,24 @@ assert(p != NULL);
        /* FIXME: Trailing /'s will confuse us greatly. Internal ones will 
           too, but those are more trouble to fix up. :-( */
        t = alloca_strdup(p->relocs[i].oldPath);
-       /*@-branchstate@*/
        relocations[i].oldPath = (t[0] == '/' && t[1] == '\0')
            ? t
            : stripTrailingChar(t, '/');
-       /*@=branchstate@*/
 
        /* An old path w/o a new path is valid, and indicates exclusion */
        if (p->relocs[i].newPath) {
            int del;
 
            t = alloca_strdup(p->relocs[i].newPath);
-           /*@-branchstate@*/
            relocations[i].newPath = (t[0] == '/' && t[1] == '\0')
                ? t
                : stripTrailingChar(t, '/');
-           /*@=branchstate@*/
 
-           /*@-nullpass@*/     /* FIX:  relocations[i].oldPath == NULL */
+               /* FIX:  relocations[i].oldPath == NULL */
            /* Verify that the relocation's old path is in the header. */
            for (j = 0; j < numValid; j++) {
                if (!strcmp(validRelocations[j], relocations[i].oldPath))
-                   /*@innerbreak@*/ break;
+                   break;
            }
 
            /* XXX actions check prevents problem from being appended twice. */
@@ -814,7 +728,6 @@ assert(p != NULL);
            }
            del =
                strlen(relocations[i].newPath) - strlen(relocations[i].oldPath);
-           /*@=nullpass@*/
 
            if (del > reldel)
                reldel = del;
@@ -832,12 +745,11 @@ assert(p != NULL);
            if (relocations[j - 1].oldPath == NULL || /* XXX can't happen */
                relocations[j    ].oldPath == NULL || /* XXX can't happen */
        strcmp(relocations[j - 1].oldPath, relocations[j].oldPath) <= 0)
-               /*@innercontinue@*/ continue;
-           /*@-usereleased@*/ /* LCL: ??? */
+               continue;
+           /* LCL: ??? */
            tmpReloc = relocations[j - 1];
            relocations[j - 1] = relocations[j];
            relocations[j] = tmpReloc;
-           /*@=usereleased@*/
            madeSwap = 1;
        }
        if (!madeSwap) break;
@@ -868,13 +780,13 @@ assert(p != NULL);
            for (j = 0; j < numRelocations; j++) {
                if (relocations[j].oldPath == NULL || /* XXX can't happen */
                    strcmp(validRelocations[i], relocations[j].oldPath))
-                   /*@innercontinue@*/ continue;
+                   continue;
                /* On install, a relocate to NULL means skip the path. */
                if (relocations[j].newPath) {
                    actualRelocations[numActual] = relocations[j].newPath;
                    numActual++;
                }
-               /*@innerbreak@*/ break;
+               break;
            }
            if (j == numRelocations) {
                actualRelocations[numActual] = validRelocations[i];
@@ -918,12 +830,10 @@ assert(p != NULL);
 
        len = reldel +
                strlen(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1;
-       /*@-branchstate@*/
        if (len >= fileAlloced) {
            fileAlloced = len * 2;
            fn = xrealloc(fn, fileAlloced);
        }
-       /*@=branchstate@*/
 
 assert(fn != NULL);            /* XXX can't happen */
        *fn = '\0';
@@ -932,7 +842,7 @@ assert(fn != NULL);         /* XXX can't happen */
 if (fColors != NULL) {
 /* XXX pkgs may not have unique dirNames, so color all dirNames that match. */
 for (j = 0; j < dirCount; j++) {
-if (strcmp(dirNames[dirIndexes[i]], dirNames[j])) /*@innercontinue@*/ continue;
+if (strcmp(dirNames[dirIndexes[i]], dirNames[j])) continue;
 dColors[j] |= fColors[i];
 }
 }
@@ -946,29 +856,28 @@ dColors[j] |= fColors[i];
         */
        for (j = numRelocations - 1; j >= 0; j--) {
            if (relocations[j].oldPath == NULL) /* XXX can't happen */
-               /*@innercontinue@*/ continue;
+               continue;
            len = strcmp(relocations[j].oldPath, "/")
                ? strlen(relocations[j].oldPath)
                : 0;
 
            if (fnlen < len)
-               /*@innercontinue@*/ continue;
+               continue;
            /*
             * Only subdirectories or complete file paths may be relocated. We
             * don't check for '\0' as our directory names all end in '/'.
             */
            if (!(fn[len] == '/' || fnlen == len))
-               /*@innercontinue@*/ continue;
+               continue;
 
            if (strncmp(relocations[j].oldPath, fn, len))
-               /*@innercontinue@*/ continue;
-           /*@innerbreak@*/ break;
+               continue;
+           break;
        }
        if (j < 0) continue;
 
-/*@-nullderef@*/ /* FIX: fModes may be NULL */
+/* FIX: fModes may be NULL */
        ft = whatis(fModes[i]);
-/*@=nullderef@*/
 
        /* On install, a relocate to NULL means skip the path. */
        if (relocations[j].newPath == NULL) {
@@ -978,10 +887,10 @@ dColors[j] |= fColors[i];
                    len = strlen(dirNames[j]) - 1;
                    while (len > 0 && dirNames[j][len-1] == '/') len--;
                    if (fnlen != len)
-                       /*@innercontinue@*/ continue;
+                       continue;
                    if (strncmp(fn, dirNames[j], fnlen))
-                       /*@innercontinue@*/ continue;
-                   /*@innerbreak@*/ break;
+                       continue;
+                   break;
                }
            }
            if (actions) {
@@ -1007,20 +916,19 @@ dColors[j] |= fColors[i];
                fnlen = te - fn;
            } else
                te = fn + strlen(fn);
-           /*@-nullpass -nullderef@*/  /* LCL: te != NULL here. */
+               /* LCL: te != NULL here. */
            if (strcmp(baseNames[i], te)) /* basename changed too? */
                baseNames[i] = alloca_strdup(te);
            *te = '\0';                 /* terminate new directory name */
-           /*@=nullpass =nullderef@*/
        }
 
        /* Does this directory already exist in the directory list? */
        for (j = 0; j < dirCount; j++) {
            if (fnlen != strlen(dirNames[j]))
-               /*@innercontinue@*/ continue;
+               continue;
            if (strncmp(fn, dirNames[j], fnlen))
-               /*@innercontinue@*/ continue;
-           /*@innerbreak@*/ break;
+               continue;
+           break;
        }
        
        if (j < dirCount) {
@@ -1055,23 +963,23 @@ dColors[j] |= fColors[i];
            /* XXX Don't autorelocate uncolored directories. */
            if (j == p->autorelocatex
             && (dColors[i] == 0 || !(dColors[i] & mydColor)))
-               /*@innercontinue@*/ continue;
+               continue;
 
            if (relocations[j].oldPath == NULL) /* XXX can't happen */
-               /*@innercontinue@*/ continue;
+               continue;
            len = strcmp(relocations[j].oldPath, "/")
                ? strlen(relocations[j].oldPath)
                : 0;
 
            if (len && strncmp(relocations[j].oldPath, dirNames[i], len))
-               /*@innercontinue@*/ continue;
+               continue;
 
            /*
             * Only subdirectories or complete file paths may be relocated. We
             * don't check for '\0' as our directory names all end in '/'.
             */
            if (dirNames[i][len] != '/')
-               /*@innercontinue@*/ continue;
+               continue;
 
            if (relocations[j].newPath) { /* Relocate the path */
                const char * s = relocations[j].newPath;
@@ -1133,13 +1041,10 @@ dColors[j] |= fColors[i];
 
     baseNames = hfd(baseNames, RPM_STRING_ARRAY_TYPE);
     dirNames = hfd(dirNames, RPM_STRING_ARRAY_TYPE);
-/*@-dependenttrans@*/
     fn = _free(fn);
-/*@=dependenttrans@*/
 
     return h;
 }
-/*@=bounds@*/
 
 rpmfi rpmfiFree(rpmfi fi)
 {
@@ -1150,10 +1055,8 @@ rpmfi rpmfiFree(rpmfi fi)
     if (fi->nrefs > 1)
        return rpmfiUnlink(fi, fi->Type);
 
-/*@-modfilesys@*/
 if (_rpmfi_debug < 0)
 fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
-/*@=modfilesys@*/
 
     /* Free pre- and post-transaction script and interpreter strings. */
     fi->pretrans = _free(fi->pretrans);
@@ -1161,7 +1064,6 @@ fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
     fi->posttrans = _free(fi->posttrans);
     fi->posttransprog = _free(fi->posttransprog);
 
-    /*@-branchstate@*/
     if (fi->fc > 0) {
        fi->bnl = hfd(fi->bnl, -1);
        fi->dnl = hfd(fi->dnl, -1);
@@ -1178,7 +1080,6 @@ fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
 
        fi->fstates = _free(fi->fstates);
 
-       /*@-evalorder@*/
        if (!fi->keep_header && fi->h == NULL) {
            fi->fmtimes = _free(fi->fmtimes);
            fi->fmodes = _free(fi->fmodes);
@@ -1196,9 +1097,7 @@ fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
            fi->fddictn = _free(fi->fddictn);
 
        }
-       /*@=evalorder@*/
     }
-    /*@=branchstate@*/
 
     fi->fsm = freeFSM(fi->fsm);
 
@@ -1217,11 +1116,9 @@ fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
 
     fi->h = headerFree(fi->h);
 
-    /*@-nullstate -refcounttrans -usereleased@*/
     (void) rpmfiUnlink(fi, fi->Type);
     memset(fi, 0, sizeof(*fi));                /* XXX trash and burn */
     fi = _free(fi);
-    /*@=nullstate =refcounttrans =usereleased@*/
 
     return NULL;
 }
@@ -1232,7 +1129,6 @@ fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, fi->Type, fi->fc);
  * @return             binary nibble
  */
 static inline unsigned char nibble(char c)
-       /*@*/
 {
     if (c >= '0' && c <= '9')
        return (c - '0');
@@ -1417,12 +1313,11 @@ if (fi->actions == NULL)
        i = p->nrelocs;
        if (newPath != NULL && *newPath != '\0' && p->relocs != NULL)
        for (i = 0; i < p->nrelocs; i++) {
-/*@-nullpass@*/ /* XXX {old,new}Path might be NULL */
+/* XXX {old,new}Path might be NULL */
           if (strcmp(p->relocs[i].oldPath, "/"))
                continue;
           if (strcmp(p->relocs[i].newPath, newPath))
                continue;
-/*@=nullpass@*/
           break;
        }
 
@@ -1445,9 +1340,8 @@ if (fi->actions == NULL)
 /* XXX DYING */
 if (fi->actions == NULL)
        fi->actions = xcalloc(fi->fc, sizeof(*fi->actions));
-       /*@-compdef@*/ /* FIX: fi-md5s undefined */
+       /* FIX: fi-md5s undefined */
        foo = relocateFileList(ts, fi, h, fi->actions);
-       /*@=compdef@*/
        fi->h = headerFree(fi->h);
        fi->h = headerLink(foo);
        foo = headerFree(foo);
@@ -1493,18 +1387,15 @@ if (fi->actions == NULL)
     fi->fperms = 0644;
 
 exit:
-/*@-modfilesys@*/
 if (_rpmfi_debug < 0)
 fprintf(stderr, "*** fi %p\t%s[%d]\n", fi, Type, (fi ? fi->fc : 0));
-/*@=modfilesys@*/
 
-    /*@-compdef -nullstate@*/ /* FIX: rpmfi null annotations */
+    /* FIX: rpmfi null annotations */
     return rpmfiLink(fi, (fi ? fi->Type : NULL));
-    /*@=compdef =nullstate@*/
 }
 
 void rpmfiBuildFClasses(Header h,
-       /*@out@*/ const char *** fclassp, /*@out@*/ int * fcp)
+       const char *** fclassp, int * fcp)
 {
     int scareMem = 0;
     rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
@@ -1545,21 +1436,18 @@ void rpmfiBuildFClasses(Header h,
        *t++ = '\0';
     }
     av[ac] = NULL;     /* XXX tag arrays are not NULL terminated. */
-    /*@=branchstate@*/
 
 exit:
     fi = rpmfiFree(fi);
-    /*@-branchstate@*/
     if (fclassp)
        *fclassp = av;
     else
        av = _free(av);
-    /*@=branchstate@*/
     if (fcp) *fcp = ac;
 }
 
 void rpmfiBuildFDeps(Header h, rpmTag tagN,
-       /*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp)
+       const char *** fdepsp, int * fcp)
 {
     int scareMem = 0;
     rpmfi fi = rpmfiNew(NULL, h, RPMTAG_BASENAMES, scareMem);
@@ -1600,11 +1488,11 @@ void rpmfiBuildFDeps(Header h, rpmTag tagN,
            ix = *ddict++;
            mydt = ((ix >> 24) & 0xff);
            if (mydt != deptype)
-               /*@innercontinue@*/ continue;
+               continue;
            ix &= 0x00ffffff;
            (void) rpmdsSetIx(ds, ix-1);
            if (rpmdsNext(ds) < 0)
-               /*@innercontinue@*/ continue;
+               continue;
            DNEVR = rpmdsDNEVR(ds);
            if (DNEVR != NULL)
                nb += strlen(DNEVR+2) + 1;
@@ -1616,7 +1504,6 @@ void rpmfiBuildFDeps(Header h, rpmTag tagN,
     av = xmalloc(nb);
     t = ((char *) av) + ((ac + 1) * sizeof(*av));
     ac = 0;
-    /*@-branchstate@*/
     fi = rpmfiInit(fi, 0);
     if (fi != NULL)
     while (rpmfiNext(fi) >= 0) {
@@ -1628,11 +1515,11 @@ void rpmfiBuildFDeps(Header h, rpmTag tagN,
            ix = *ddict++;
            mydt = ((ix >> 24) & 0xff);
            if (mydt != deptype)
-               /*@innercontinue@*/ continue;
+               continue;
            ix &= 0x00ffffff;
            (void) rpmdsSetIx(ds, ix-1);
            if (rpmdsNext(ds) < 0)
-               /*@innercontinue@*/ continue;
+               continue;
            DNEVR = rpmdsDNEVR(ds);
            if (DNEVR != NULL) {
                t = stpcpy(t, DNEVR+2);
@@ -1642,17 +1529,14 @@ void rpmfiBuildFDeps(Header h, rpmTag tagN,
        }
        *t++ = '\0';
     }
-    /*@=branchstate@*/
     av[ac] = NULL;     /* XXX tag arrays are not NULL terminated. */
 
 exit:
     fi = rpmfiFree(fi);
     ds = rpmdsFree(ds);
-    /*@-branchstate@*/
     if (fdepsp)
        *fdepsp = av;
     else
        av = _free(av);
-    /*@=branchstate@*/
     if (fcp) *fcp = ac;
 }
index f6135d5..4251b84 100644 (file)
@@ -6,10 +6,7 @@
  * Structure(s) used for file info tag sets.
  */
 
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmfi_debug;
-/*@=exportlocal@*/
 
 #if defined(_RPMFI_INTERNAL)
 /**
@@ -32,76 +29,59 @@ struct rpmfi_s {
     int i;                     /*!< Current file index. */
     int j;                     /*!< Current directory index. */
 
-/*@observer@*/
     const char * Type;         /*!< Tag name. */
 
     rpmTag tagN;               /*!< Header tag. */
-/*@refcounted@*/ /*@null@*/
     Header h;                  /*!< Header for file info set (or NULL) */
 
-/*@only@*/ /*?null?*/
+/*?null?*/
     const char ** bnl;         /*!< Base name(s) (from header) */
-/*@only@*/ /*?null?*/
+/*?null?*/
     const char ** dnl;         /*!< Directory name(s) (from header) */
 
-/*@only@*/ /*@relnull@*/
     const char ** fmd5s;       /*!< File MD5 sum(s) (from header) */
-/*@only@*/ /*@relnull@*/
     const char ** flinks;      /*!< File link(s) (from header) */
-/*@only@*/ /*@null@*/
     const char ** flangs;      /*!< File lang(s) (from header) */
 
-/*@only@*/ /*@relnull@*/
           uint_32 * dil;       /*!< Directory indice(s) (from header) */
-/*@only@*/ /*?null?*/
+/*?null?*/
     const uint_32 * fflags;    /*!< File flag(s) (from header) */
-/*@only@*/ /*?null?*/
+/*?null?*/
     const uint_32 * fsizes;    /*!< File size(s) (from header) */
-/*@only@*/ /*?null?*/
+/*?null?*/
     const uint_32 * fmtimes;   /*!< File modification time(s) (from header) */
-/*@only@*/ /*?null?*/
+/*?null?*/
           uint_16 * fmodes;    /*!< File mode(s) (from header) */
-/*@only@*/ /*?null?*/
+/*?null?*/
     const uint_16 * frdevs;    /*!< File rdev(s) (from header) */
-/*@only@*/ /*?null?*/
+/*?null?*/
     const uint_32 * finodes;   /*!< File inodes(s) (from header) */
 
-/*@only@*/ /*@null@*/
     const char ** fuser;       /*!< File owner(s) (from header) */
-/*@only@*/ /*@null@*/
     const char ** fgroup;      /*!< File group(s) (from header) */
 
-/*@only@*/ /*@null@*/
     char * fstates;            /*!< File state(s) (from header) */
 
-/*@only@*/ /*@null@*/
     const uint_32 * fcolors;   /*!< File color bits (header) */
 
-/*@only@*/ /*@null@*/
     const char ** fcontexts;   /*! FIle security contexts. */
 
-/*@only@*/ /*@null@*/
     const char ** cdict;       /*!< File class dictionary (header) */
     int_32 ncdict;             /*!< No. of class entries. */
-/*@only@*/ /*@null@*/
     const uint_32 * fcdictx;   /*!< File class dictionary index (header) */
 
-/*@only@*/ /*@null@*/
     const uint_32 * ddict;     /*!< File depends dictionary (header) */
     int_32 nddict;             /*!< No. of depends entries. */
-/*@only@*/ /*@null@*/
     const uint_32 * fddictx;   /*!< File depends dictionary start (header) */
-/*@only@*/ /*@null@*/
     const uint_32 * fddictn;   /*!< File depends dictionary count (header) */
 
-/*@only@*/ /*?null?*/
+/*?null?*/
     const uint_32 * vflags;    /*!< File verify flag(s) (from header) */
 
     int_32 dc;                 /*!< No. of directories. */
     int_32 fc;                 /*!< No. of files. */
 
 /*=============================*/
-/*@dependent@*/ /*@relnull@*/
     rpmte te;
 
     HGE_t hge;                 /*!< Vector to headerGetEntry() */
@@ -114,30 +94,19 @@ struct rpmfi_s {
     gid_t gid;                 /*!< File gid (default). */
     uint_32 flags;             /*!< File flags (default). */
     fileAction action;         /*!< File disposition (default). */
-/*@owned@*/ /*@relnull@*/
     fileAction * actions;      /*!< File disposition(s). */
-/*@owned@*/
     struct fingerPrint_s * fps;        /*!< File fingerprint(s). */
-/*@owned@*/
     const char ** obnl;                /*!< Original basename(s) (from header) */
-/*@owned@*/
     const char ** odnl;                /*!< Original dirname(s) (from header) */
-/*@unused@*/
     int_32 * odil;             /*!< Original dirindex(s) (from header) */
 
-/*@only@*/ /*@relnull@*/
     unsigned char * md5s;      /*!< File md5 sums in binary. */
 
-/*@only@*/ /*@null@*/
     const char * pretrans;
-/*@only@*/ /*@null@*/
     const char * pretransprog;
-/*@only@*/ /*@null@*/
     const char * posttrans;
-/*@only@*/ /*@null@*/
     const char * posttransprog;
 
-/*@only@*/ /*@null@*/
     char * fn;                 /*!< File name buffer. */
     int fnlen;                 /*!< FIle name buffer length. */
 
@@ -147,25 +116,20 @@ struct rpmfi_s {
     unsigned int archiveSize;
     mode_t dperms;             /*!< Directory perms (0755) if not mapped. */
     mode_t fperms;             /*!< File perms (0644) if not mapped. */
-/*@only@*/ /*@null@*/
     const char ** apath;
     int mapflags;
-/*@owned@*/ /*@null@*/
     int * fmapflags;
-/*@owned@*/
     FSM_t fsm;                 /*!< File state machine data. */
     int keep_header;           /*!< Keep header? */
     uint_32 color;             /*!< Color bit(s) from file color union. */
-/*@owned@*/
     sharedFileInfo replaced;   /*!< (TR_ADDED) */
-/*@owned@*/
     uint_32 * replacedSizes;   /*!< (TR_ADDED) */
     unsigned int record;       /*!< (TR_REMOVED) */
     int magic;
 #define        RPMFIMAGIC      0x09697923
 /*=============================*/
 
-/*@refs@*/ int nrefs;          /*!< Reference count. */
+int nrefs;             /*!< Reference count. */
 };
 
 #endif /* _RPMFI_INTERNAL */
@@ -180,10 +144,8 @@ extern "C" {
  * @param msg
  * @return             NULL always
  */
-/*@unused@*/ /*@null@*/
-rpmfi rpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
-               /*@null@*/ const char * msg)
-       /*@modifies fi @*/;
+rpmfi rpmfiUnlink (rpmfi fi,
+               const char * msg);
 
 /** @todo Remove debugging entry from the ABI.
  * @param fi           file info set
@@ -192,12 +154,8 @@ rpmfi rpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
  * @param ln
  * @return             NULL always
  */
-/*@-exportlocal@*/
-/*@null@*/
-rpmfi XrpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
-               /*@null@*/ const char * msg, const char * fn, unsigned ln)
-       /*@modifies fi @*/;
-/*@=exportlocal@*/
+rpmfi XrpmfiUnlink (rpmfi fi,
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmfiUnlink(_fi, _msg) XrpmfiUnlink(_fi, _msg, __FILE__, __LINE__)
 
 /**
@@ -206,9 +164,7 @@ rpmfi XrpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi,
  * @param msg
  * @return             new file info set reference
  */
-/*@unused@*/ /*@null@*/
-rpmfi rpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg)
-       /*@modifies fi @*/;
+rpmfi rpmfiLink (rpmfi fi, const char * msg);
 
 /** @todo Remove debugging entry from the ABI.
  * @param fi           file info set
@@ -217,10 +173,8 @@ rpmfi rpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg)
  * @param ln
  * @return             NULL always
  */
-/*@null@*/
-rpmfi XrpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg,
-               const char * fn, unsigned ln)
-        /*@modifies fi @*/;
+rpmfi XrpmfiLink (rpmfi fi, const char * msg,
+               const char * fn, unsigned ln);
 #define        rpmfiLink(_fi, _msg)    XrpmfiLink(_fi, _msg, __FILE__, __LINE__)
 
 /**
@@ -228,17 +182,14 @@ rpmfi XrpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg,
  * @param fi           file info set
  * @return             current file count
  */
-int rpmfiFC(/*@null@*/ rpmfi fi)
-       /*@*/;
+int rpmfiFC(rpmfi fi);
 
 /**
  * Return current file index from file info set.
  * @param fi           file info set
  * @return             current file index
  */
-/*@unused@*/
-int rpmfiFX(/*@null@*/ rpmfi fi)
-       /*@*/;
+int rpmfiFX(rpmfi fi);
 
 /**
  * Set current file index in file info set.
@@ -246,25 +197,21 @@ int rpmfiFX(/*@null@*/ rpmfi fi)
  * @param fx           new file index
  * @return             current file index
  */
-/*@unused@*/
-int rpmfiSetFX(/*@null@*/ rpmfi fi, int fx)
-       /*@modifies fi @*/;
+int rpmfiSetFX(rpmfi fi, int fx);
 
 /**
  * Return directory count from file info set.
  * @param fi           file info set
  * @return             current directory count
  */
-int rpmfiDC(/*@null@*/ rpmfi fi)
-       /*@*/;
+int rpmfiDC(rpmfi fi);
 
 /**
  * Return current directory index from file info set.
  * @param fi           file info set
  * @return             current directory index
  */
-int rpmfiDX(/*@null@*/ rpmfi fi)
-       /*@*/;
+int rpmfiDX(rpmfi fi);
 
 /**
  * Set current directory index in file info set.
@@ -272,147 +219,119 @@ int rpmfiDX(/*@null@*/ rpmfi fi)
  * @param dx           new directory index
  * @return             current directory index
  */
-int rpmfiSetDX(/*@null@*/ rpmfi fi, int dx)
-       /*@modifies fi @*/;
+int rpmfiSetDX(rpmfi fi, int dx);
 
 /**
  * Return current base name from file info set.
  * @param fi           file info set
  * @return             current base name, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmfiBN(/*@null@*/ rpmfi fi)
-       /*@*/;
+extern const char * rpmfiBN(rpmfi fi);
 
 /**
  * Return current directory name from file info set.
  * @param fi           file info set
  * @return             current directory, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmfiDN(/*@null@*/ rpmfi fi)
-       /*@*/;
+extern const char * rpmfiDN(rpmfi fi);
 
 /**
  * Return current file name from file info set.
  * @param fi           file info set
  * @return             current file name
  */
-/*@observer@*/
-extern const char * rpmfiFN(/*@null@*/ rpmfi fi)
-       /*@modifies fi @*/;
+extern const char * rpmfiFN(rpmfi fi);
 
 /**
  * Return current file flags from file info set.
  * @param fi           file info set
  * @return             current file flags, 0 on invalid
  */
-uint_32 rpmfiFFlags(/*@null@*/ rpmfi fi)
-       /*@*/;
+uint_32 rpmfiFFlags(rpmfi fi);
 
 /**
  * Return current file verify flags from file info set.
  * @param fi           file info set
  * @return             current file verify flags, 0 on invalid
  */
-uint_32 rpmfiVFlags(/*@null@*/ rpmfi fi)
-       /*@*/;
+uint_32 rpmfiVFlags(rpmfi fi);
 
 /**
  * Return current file mode from file info set.
  * @param fi           file info set
  * @return             current file mode, 0 on invalid
  */
-int_16 rpmfiFMode(/*@null@*/ rpmfi fi)
-       /*@*/;
+int_16 rpmfiFMode(rpmfi fi);
 
 /**
  * Return current file state from file info set.
  * @param fi           file info set
  * @return             current file state, 0 on invalid
  */
-rpmfileState rpmfiFState(/*@null@*/ rpmfi fi)
-       /*@*/;
+rpmfileState rpmfiFState(rpmfi fi);
 
 /**
  * Return current file (binary) md5 digest from file info set.
  * @param fi           file info set
  * @return             current file md5 digest, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const unsigned char * rpmfiMD5(/*@null@*/ rpmfi fi)
-       /*@*/;
+extern const unsigned char * rpmfiMD5(rpmfi fi);
 
 /**
  * Return current file linkto (i.e. symlink(2) target) from file info set.
  * @param fi           file info set
  * @return             current file linkto, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmfiFLink(/*@null@*/ rpmfi fi)
-       /*@*/;
+extern const char * rpmfiFLink(rpmfi fi);
 
 /**
  * Return current file size from file info set.
  * @param fi           file info set
  * @return             current file size, 0 on invalid
  */
-int_32 rpmfiFSize(/*@null@*/ rpmfi fi)
-       /*@*/;
+int_32 rpmfiFSize(rpmfi fi);
 
 /**
  * Return current file rdev from file info set.
  * @param fi           file info set
  * @return             current file rdev, 0 on invalid
  */
-int_16 rpmfiFRdev(/*@null@*/ rpmfi fi)
-       /*@*/;
+int_16 rpmfiFRdev(rpmfi fi);
 
 /**
  * Return current file inode from file info set.
  * @param fi           file info set
  * @return             current file inode, 0 on invalid
  */
-int_32 rpmfiFInode(/*@null@*/ rpmfi fi)
-       /*@*/;
+int_32 rpmfiFInode(rpmfi fi);
 
 /**
  * Return union of all file color bits from file info set.
  * @param fi           file info set
  * @return             current color
  */
-uint_32 rpmfiColor(/*@null@*/ rpmfi fi)
-       /*@*/;
+uint_32 rpmfiColor(rpmfi fi);
 
 /**
  * Return current file color bits from file info set.
  * @param fi           file info set
  * @return             current file color
  */
-uint_32 rpmfiFColor(/*@null@*/ rpmfi fi)
-       /*@*/;
+uint_32 rpmfiFColor(rpmfi fi);
 
 /**
  * Return current file class from file info set.
  * @param fi           file info set
  * @return             current file class, 0 on invalid
  */
-/*@-exportlocal@*/
-/*@observer@*/ /*@null@*/
-extern const char * rpmfiFClass(/*@null@*/ rpmfi fi)
-       /*@*/;
-/*@=exportlocal@*/
+extern const char * rpmfiFClass(rpmfi fi);
 
 /**
  * Return current file security context from file info set.
  * @param fi           file info set
  * @return             current file context, 0 on invalid
  */
-/*@-exportlocal@*/
-/*@observer@*/ /*@null@*/
-extern const char * rpmfiFContext(/*@null@*/ rpmfi fi)
-       /*@*/;
-/*@=exportlocal@*/
+extern const char * rpmfiFContext(rpmfi fi);
 
 /**
  * Return current file depends dictionary from file info set.
@@ -420,51 +339,43 @@ extern const char * rpmfiFContext(/*@null@*/ rpmfi fi)
  * @retval *fddictp    file depends dictionary array (or NULL)
  * @return             no. of file depends entries, 0 on invalid
  */
-int_32 rpmfiFDepends(/*@null@*/ rpmfi fi,
-               /*@out@*/ /*@null@*/ const uint_32 ** fddictp)
-       /*@modifies *fddictp @*/;
+int_32 rpmfiFDepends(rpmfi fi,
+               const uint_32 ** fddictp);
 
 /**
  * Return (calculated) current file nlink count from file info set.
  * @param fi           file info set
  * @return             current file nlink count, 0 on invalid
  */
-int_32 rpmfiFNlink(/*@null@*/ rpmfi fi)
-       /*@*/;
+int_32 rpmfiFNlink(rpmfi fi);
 
 /**
  * Return current file modify time from file info set.
  * @param fi           file info set
  * @return             current file modify time, 0 on invalid
  */
-int_32 rpmfiFMtime(/*@null@*/ rpmfi fi)
-       /*@*/;
+int_32 rpmfiFMtime(rpmfi fi);
 
 /**
  * Return current file owner from file info set.
  * @param fi           file info set
  * @return             current file owner, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmfiFUser(/*@null@*/ rpmfi fi)
-       /*@*/;
+extern const char * rpmfiFUser(rpmfi fi);
 
 /**
  * Return current file group from file info set.
  * @param fi           file info set
  * @return             current file group, NULL on invalid
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmfiFGroup(/*@null@*/ rpmfi fi)
-       /*@*/;
+extern const char * rpmfiFGroup(rpmfi fi);
 
 /**
  * Return next file iterator index.
  * @param fi           file info set
  * @return             file iterator index, -1 on termination
  */
-int rpmfiNext(/*@null@*/ rpmfi fi)
-       /*@modifies fi @*/;
+int rpmfiNext(rpmfi fi);
 
 /**
  * Initialize file iterator index.
@@ -472,18 +383,14 @@ int rpmfiNext(/*@null@*/ rpmfi fi)
  * @param fx           file iterator index
  * @return             file info set
  */
-/*@null@*/
-rpmfi rpmfiInit(/*@null@*/ rpmfi fi, int fx)
-       /*@modifies fi @*/;
+rpmfi rpmfiInit(rpmfi fi, int fx);
 
 /**
  * Return next directory iterator index.
  * @param fi           file info set
  * @return             directory iterator index, -1 on termination
  */
-/*@unused@*/
-int rpmfiNextD(/*@null@*/ rpmfi fi)
-       /*@modifies fi @*/;
+int rpmfiNextD(rpmfi fi);
 
 /**
  * Initialize directory iterator index.
@@ -491,19 +398,14 @@ int rpmfiNextD(/*@null@*/ rpmfi fi)
  * @param dx           directory iterator index
  * @return             file info set, NULL if dx is out of range
  */
-/*@unused@*/ /*@null@*/
-rpmfi rpmfiInitD(/*@null@*/ rpmfi fi, int dx)
-       /*@modifies fi @*/;
+rpmfi rpmfiInitD(rpmfi fi, int dx);
 
 /**
  * Destroy a file info set.
  * @param fi           file info set
  * @return             NULL always
  */
-/*@null@*/
-rpmfi rpmfiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi)
-       /*@globals fileSystem @*/
-       /*@modifies fi, fileSystem @*/;
+rpmfi rpmfiFree(rpmfi fi);
 
 /**
  * Create and load a file info set.
@@ -514,10 +416,7 @@ rpmfi rpmfiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi)
  * @param scareMem     Use pointers to refcounted header memory?
  * @return             new file info set
  */
-/*@null@*/
-rpmfi rpmfiNew(/*@null@*/ const rpmts ts, Header h, rpmTag tagN, int scareMem)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
-       /*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/;
+rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, int scareMem);
 
 /**
  * Retrieve file classes from header.
@@ -529,9 +428,7 @@ rpmfi rpmfiNew(/*@null@*/ const rpmts ts, Header h, rpmTag tagN, int scareMem)
  * @retval *fcp                number of files
  */
 void rpmfiBuildFClasses(Header h,
-               /*@out@*/ const char *** fclassp, /*@out@*/ int * fcp)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/
-       /*@modifies h, *fclassp, *fcp, rpmGlobalMacroContext, fileSystem @*/;
+               const char *** fclassp, int * fcp);
 
 
 /**
@@ -545,18 +442,14 @@ void rpmfiBuildFClasses(Header h,
  * @retval *fcp                number of files
  */
 void rpmfiBuildFDeps(Header h, rpmTag tagN,
-               /*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies h, *fdepsp, *fcp,
-               rpmGlobalMacroContext, fileSystem, internalState @*/;
+               const char *** fdepsp, int * fcp);
 
 /**
  * Return file type from mode_t.
  * @param mode         file mode bits (from header)
  * @return             file type
  */
-fileTypes whatis(uint_16 mode)
-       /*@*/;
+fileTypes whatis(uint_16 mode);
 
 /**
  * Return file info comparison.
@@ -564,8 +457,7 @@ fileTypes whatis(uint_16 mode)
  * @param bfi          2nd file info
  * @return             0 if identical
  */
-int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
-       /*@*/;
+int rpmfiCompare(const rpmfi afi, const rpmfi bfi);
 
 /**
  * Return file disposition.
@@ -574,28 +466,21 @@ int rpmfiCompare(const rpmfi afi, const rpmfi bfi)
  * @param skipMissing  OK to skip missing files?
  * @return             file dispostion
  */
-fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies nfi, fileSystem, internalState @*/;
+fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing);
 
 /**
  * Return whether file is conflicting config
  * @param fi           file info
  * @return             1 if config file and file on disk conflicts
  */
-int rpmfiConfigConflict(const rpmfi fi)
-       /*@*/;
+int rpmfiConfigConflict(const rpmfi fi);
 
 /**
  * Return formatted string representation of package disposition.
  * @param fi           file info set
  * @return             formatted string
  */
-/*@-redef@*/
-/*@observer@*/
-const char * rpmfiTypeString(rpmfi fi)
-       /*@*/;
-/*@=redef@*/
+const char * rpmfiTypeString(rpmfi fi);
 
 #ifdef __cplusplus
 }
index 7791a96..49ea93a 100644 (file)
@@ -1,4 +1,3 @@
-/*@-modfilesys@*/
 /** \ingroup rpmio
  * \file rpmio/rpmio.c
  */
 
 #include "debug.h"
 
-/*@access fnpyKey @*/
-/*@access rpmdbMatchIterator @*/
-/*@access rpmts @*/
-/*@access rpmps @*/
 
-/*@unchecked@*/
 int _rpmgi_debug = 0;
 
-/*@unchecked@*/
 rpmgiFlags giFlags = RPMGI_NONE;
 
-/*@unchecked@*/
 static int indent = 2;
 
-/*@unchecked@*/ /*@observer@*/
 static const char * ftsInfoStrings[] = {
     "UNKNOWN",
     "D",
@@ -50,16 +41,12 @@ static const char * ftsInfoStrings[] = {
     "W",
 };
 
-/*@observer@*/
 static const char * ftsInfoStr(int fts_info)
-       /*@*/
 {
 
     if (!(fts_info >= 1 && fts_info <= 14))
        fts_info = 0;
-/*@-compmempass@*/
     return ftsInfoStrings[ fts_info ];
-/*@=compmempass@*/
 }
 
 /**
@@ -69,10 +56,7 @@ static const char * ftsInfoStr(int fts_info)
  * @param fmode                open mode
  * @return             file handle
  */
-/*@null@*/
 static FD_t rpmgiOpen(const char * path, const char * fmode)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies rpmGlobalMacroContext, h_errno, internalState @*/
 {
     const char * fn = rpmExpand(path, NULL);
     FD_t fd = Fopen(fn, fmode);
@@ -94,8 +78,6 @@ static FD_t rpmgiOpen(const char * path, const char * fmode)
  * @return             RPMRC_OK on success
  */
 static rpmRC rpmgiLoadManifest(rpmgi gi, const char * path)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/
 {
     FD_t fd = rpmgiOpen(path, "r.ufdio");
     rpmRC rpmrc = RPMRC_FAIL;
@@ -113,10 +95,7 @@ static rpmRC rpmgiLoadManifest(rpmgi gi, const char * path)
  * @param path         file path
  * @return             header (NULL on failure)
  */
-/*@null@*/
 static Header rpmgiReadHeader(rpmgi gi, const char * path)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/
 {
     FD_t fd = rpmgiOpen(path, "r.ufdio");
     Header h = NULL;
@@ -152,10 +131,7 @@ static Header rpmgiReadHeader(rpmgi gi, const char * path)
  * @param gi           generalized iterator
  * @return             RPMRC_OK on success
  */
-/*@null@*/
 static rpmRC rpmgiLoadReadHeader(rpmgi gi)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/
 {
     rpmRC rpmrc = RPMRC_NOTFOUND;
     Header h = NULL;
@@ -201,9 +177,7 @@ static rpmRC rpmgiLoadReadHeader(rpmgi gi)
  * @param gi           generalized iterator
  * @return             RPMRC_OK on success
  */
-/*@null@*/
 static rpmRC rpmgiWalkPathFilter(rpmgi gi)
-       /*@*/
 {
     FTSENT * fts = gi->fts;
     rpmRC rpmrc = RPMRC_NOTFOUND;
@@ -250,10 +224,7 @@ rpmMessage(RPMMESS_DEBUG, "FTS_%s\t%*s %s%s\n", ftsInfoStr(fts->fts_info),
  * @param gi           generalized iterator
  * @return             RPMRC_OK on success
  */
-/*@null@*/
 static rpmRC rpmgiWalkReadHeader(rpmgi gi)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/
 {
     rpmRC rpmrc = RPMRC_NOTFOUND;
 
@@ -285,9 +256,7 @@ static rpmRC rpmgiWalkReadHeader(rpmgi gi)
  * @param argv         arg list to be globbed (or NULL)
  * @returns            RPMRC_OK on success
  */
-static rpmRC rpmgiGlobArgv(rpmgi gi, /*@null@*/ ARGV_t argv)
-       /*@globals internalState @*/
-       /*@modifies gi, internalState @*/
+static rpmRC rpmgiGlobArgv(rpmgi gi, ARGV_t argv)
 {
     const char * arg;
     rpmRC rpmrc = RPMRC_OK;
@@ -301,9 +270,8 @@ static rpmRC rpmgiGlobArgv(rpmgi gi, /*@null@*/ ARGV_t argv)
        if (argv != NULL) {
            while (argv[ac] != NULL)
                ac++;
-/*@-nullstate@*/ /* XXX argv is not NULL */
+/* XXX argv is not NULL */
            xx = argvAppend(&gi->argv, argv);
-/*@=nullstate@*/
        }
        gi->argc = ac;
        return rpmrc;
@@ -328,8 +296,6 @@ static rpmRC rpmgiGlobArgv(rpmgi gi, /*@null@*/ ARGV_t argv)
  * @returns            RPMRC_OK on success
  */
 static rpmRC rpmgiInitFilter(rpmgi gi)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/
 {
     rpmRC rpmrc = RPMRC_OK;
     ARGV_t av;
@@ -350,7 +316,6 @@ fprintf(stderr, "*** gi %p\tmi %p\n", gi, gi->mi);
        tag = RPMTAG_NAME;
 
        /* Parse for "tag=pattern" args. */
-/*@-branchstate@*/
        if ((ae = strchr(a, '=')) != NULL) {
            *ae++ = '\0';
            tag = tagValue(a);
@@ -360,7 +325,6 @@ fprintf(stderr, "*** gi %p\tmi %p\n", gi, gi->mi);
            }
            pat = ae;
        }
-/*@=branchstate@*/
 
        if (!res) {
 if (_rpmgi_debug  < 0)
@@ -399,7 +363,7 @@ rpmgi XrpmgiLink(rpmgi gi, const char * msg, const char * fn, unsigned ln)
 if (_rpmgi_debug && msg != NULL)
 fprintf(stderr, "--> gi %p ++ %d %s at %s:%u\n", gi, gi->nrefs, msg, fn, ln);
 
-    /*@-refcounttrans@*/ return gi; /*@=refcounttrans@*/
+    return gi;
 }
 
 rpmgi rpmgiFree(rpmgi gi)
@@ -412,7 +376,6 @@ rpmgi rpmgiFree(rpmgi gi)
 
     (void) rpmgiUnlink(gi, __FUNCTION__);
 
-/*@-usereleased@*/
 
     gi->hdrPath = _free(gi->hdrPath);
     gi->h = headerFree(gi->h);
@@ -434,10 +397,7 @@ rpmgi rpmgiFree(rpmgi gi)
     gi->ts = rpmtsFree(gi->ts);
 
     memset(gi, 0, sizeof(*gi));                /* XXX trash and burn */
-/*@-refcounttrans@*/
     gi = _free(gi);
-/*@=refcounttrans@*/
-/*@=usereleased@*/
     return NULL;
 }
 
@@ -450,9 +410,7 @@ rpmgi rpmgiNew(rpmts ts, int tag, const void * keyp, size_t keylen)
 
     gi->ts = rpmtsLink(ts, __FUNCTION__);
     gi->tag = tag;
-/*@-assignexpose@*/
     gi->keyp = keyp;
-/*@=assignexpose@*/
     gi->keylen = keylen;
 
     gi->flags = 0;
@@ -475,7 +433,7 @@ rpmgi rpmgiNew(rpmts ts, int tag, const void * keyp, size_t keylen)
     return gi;
 }
 
-rpmRC rpmgiNext(/*@null@*/ rpmgi gi)
+rpmRC rpmgiNext(rpmgi gi)
 {
     char hnum[32];
     rpmRC rpmrc = RPMRC_NOTFOUND;
@@ -489,7 +447,6 @@ rpmRC rpmgiNext(/*@null@*/ rpmgi gi)
     gi->hdrPath = _free(gi->hdrPath);
     hnum[0] = '\0';
 
-/*@-branchstate@*/
     if (++gi->i >= 0)
     switch (gi->tag) {
     default:
@@ -600,7 +557,6 @@ fprintf(stderr, "*** gi %p\t%p[%d]: %s\n", gi, gi->argv, gi->i, gi->argv[gi->i])
            gi->hdrPath = xstrdup(gi->fts->fts_path);
        break;
     }
-/*@=branchstate@*/
 
     if ((gi->flags & RPMGI_TSADD) && gi->h != NULL) {
        /* XXX rpmgi hack: Save header in transaction element. */
@@ -629,7 +585,6 @@ enditer:
            if (rpmIsVerbose())
                rpmpsPrint(NULL, ps);
 
-/*@-branchstate@*/
            if (ts->suggests != NULL && ts->nsuggests > 0) {
                rpmMessage(RPMMESS_VERBOSE, _("    Suggested resolutions:\n"));
                for (i = 0; i < ts->nsuggests; i++) {
@@ -645,7 +600,6 @@ enditer:
                }
                ts->suggests = _free(ts->suggests);
            }
-/*@=branchstate@*/
 
        }
        ps = rpmpsFree(ps);
@@ -672,16 +626,12 @@ const char * rpmgiHdrPath(rpmgi gi)
 
 Header rpmgiHeader(rpmgi gi)
 {
-/*@-compdef -refcounttrans -retexpose -usereleased@*/
     return (gi != NULL ? gi->h : NULL);
-/*@=compdef =refcounttrans =retexpose =usereleased@*/
 }
 
 rpmts rpmgiTs(rpmgi gi)
 {
-/*@-compdef -refcounttrans -retexpose -usereleased@*/
     return (gi != NULL ? gi->ts : NULL);
-/*@=compdef =refcounttrans =retexpose =usereleased@*/
 }
 
 rpmRC rpmgiSetArgs(rpmgi gi, ARGV_t argv, int ftsOpts, rpmgiFlags flags)
@@ -691,4 +641,3 @@ rpmRC rpmgiSetArgs(rpmgi gi, ARGV_t argv, int ftsOpts, rpmgiFlags flags)
     return rpmgiGlobArgv(gi, argv);
 }
 
-/*@=modfilesys@*/
index 91c9c2f..c1701f3 100644 (file)
 
 /**
  */
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmgi_debug;
-/*@=exportlocal@*/
 
 /**
  */
@@ -29,47 +26,36 @@ typedef enum rpmgiFlags_e {
     RPMGI_NOHEADER     = (1 << 4)
 } rpmgiFlags;
 
-/*@unchecked@*/
 extern rpmgiFlags giFlags;
 
 #if defined(_RPMGI_INTERNAL)
 /** \ingroup rpmio
  */
 struct rpmgi_s {
-/*@refcounted@*/
     rpmts ts;                  /*!< Iterator transaction set. */
     int tag;                   /*!< Iterator type. */
-/*@kept@*/ /*@relnull@*/
     const void * keyp;         /*!< Iterator key. */
     size_t keylen;             /*!< Iterator key length. */
 
     rpmgiFlags flags;          /*!< Iterator control bits. */
     int active;                        /*!< Iterator is active? */
     int i;                     /*!< Element index. */
-/*@null@*/
     const char * hdrPath;      /*!< Path to current iterator header. */
-/*@refcounted@*/ /*@null@*/
     Header h;                  /*!< Current iterator header. */
 
-/*@null@*/
     rpmtsi tsi;
 
-/*@null@*/
     rpmdbMatchIterator mi;
 
-/*@refcounted@*/
     FD_t fd;
 
     ARGV_t argv;
     int argc;
 
     int ftsOpts;
-/*@null@*/
     FTS * ftsp;
-/*@relnull@*/
     FTSENT * fts;
 
-/*@refs@*/
     int nrefs;                 /*!< Reference count. */
 };
 #endif
@@ -84,18 +70,12 @@ extern "C" {
  * @param msg
  * @return             NULL always
  */
-/*@unused@*/ /*@null@*/
-rpmgi rpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
-               /*@null@*/ const char * msg)
-       /*@modifies gi @*/;
+rpmgi rpmgiUnlink (rpmgi gi,
+               const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@-exportlocal@*/
-/*@null@*/
-rpmgi XrpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
-               /*@null@*/ const char * msg, const char * fn, unsigned ln)
-       /*@modifies gi @*/;
-/*@=exportlocal@*/
+rpmgi XrpmgiUnlink (rpmgi gi,
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmgiUnlink(_gi, _msg)  XrpmgiUnlink(_gi, _msg, __FILE__, __LINE__)
 
 /**
@@ -104,25 +84,18 @@ rpmgi XrpmgiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi,
  * @param msg
  * @return             new generalized iterator reference
  */
-/*@unused@*/ /*@newref@*/ /*@null@*/
-rpmgi rpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg)
-       /*@modifies gi @*/;
+rpmgi rpmgiLink (rpmgi gi, const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@newref@*/ /*@null@*/
-rpmgi XrpmgiLink (/*@null@*/ rpmgi gi, /*@null@*/ const char * msg,
-               const char * fn, unsigned ln)
-        /*@modifies gi @*/;
+rpmgi XrpmgiLink (rpmgi gi, const char * msg,
+               const char * fn, unsigned ln);
 #define        rpmgiLink(_gi, _msg)    XrpmgiLink(_gi, _msg, __FILE__, __LINE__)
 
 /** Destroy a generalized iterator.
  * @param gi           generalized iterator
  * @return             NULL always
  */
-/*@null@*/
-rpmgi rpmgiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-        /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
+rpmgi rpmgiFree(rpmgi gi);
 
 /**
  * Return a generalized iterator.
@@ -132,47 +105,36 @@ rpmgi rpmgiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmgi gi)
  * @param keylen       key data length (0 will use strlen(keyp))
  * @return             new iterator
  */
-/*@null@*/
-rpmgi rpmgiNew(rpmts ts, int tag, /*@kept@*/ /*@null@*/ const void * keyp,
-               size_t keylen)
-       /*@globals internalState @*/
-       /*@modifies ts, internalState @*/;
+rpmgi rpmgiNew(rpmts ts, int tag, const void * keyp,
+               size_t keylen);
 
 /**
  * Perform next iteration step.
  * @param gi           generalized iterator
  * @returns            RPMRC_OK on success, RPMRC_NOTFOUND on EOI
  */
-rpmRC rpmgiNext(/*@null@*/ rpmgi gi)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-        /*@modifies gi, rpmGlobalMacroContext, h_errno, internalState @*/;
+rpmRC rpmgiNext(rpmgi gi);
 
 /**
  * Return current header path.
  * @param gi           generalized iterator
  * @returns            header path
  */
-/*@observer@*/ /*@null@*/
-const char * rpmgiHdrPath(rpmgi gi)
-       /*@*/;
+const char * rpmgiHdrPath(rpmgi gi);
 
 /**
  * Return current iteration header.
  * @param gi           generalized iterator
  * @returns            header
  */
-/*@null@*/
-Header rpmgiHeader(/*@null@*/ rpmgi gi)
-        /*@*/;
+Header rpmgiHeader(rpmgi gi);
 
 /**
  * Return current iteration transaction set.
  * @param gi           generalized iterator
  * @returns            transaction set
  */
-/*@null@*/
-rpmts rpmgiTs(/*@null@*/ rpmgi gi)
-        /*@*/;
+rpmts rpmgiTs(rpmgi gi);
 
 /**
  * Load iterator args.
@@ -182,10 +144,8 @@ rpmts rpmgiTs(/*@null@*/ rpmgi gi)
  * @param flags                iterator flags
  * @returns            RPMRC_OK on success
  */
-rpmRC rpmgiSetArgs(rpmgi gi, /*@null@*/ ARGV_t argv,
-               int ftsOpts, rpmgiFlags flags)
-       /*@globals internalState @*/
-       /*@modifies gi, internalState @*/;
+rpmRC rpmgiSetArgs(rpmgi gi, ARGV_t argv,
+               int ftsOpts, rpmgiFlags flags);
 
 #ifdef __cplusplus
 }
index 2606e89..407b31c 100644 (file)
 #include "manifest.h"
 #include "debug.h"
 
-/*@access rpmts @*/    /* XXX ts->goal, ts->dbmode */
-/*@access IDTX @*/
-/*@access IDT @*/
-
-/*@unchecked@*/
 int rpmcliPackagesTotal = 0;
-/*@unchecked@*/
 int rpmcliHashesCurrent = 0;
-/*@unchecked@*/
 int rpmcliHashesTotal = 0;
-/*@unchecked@*/
 int rpmcliProgressCurrent = 0;
-/*@unchecked@*/
 int rpmcliProgressTotal = 0;
 
 /**
@@ -38,20 +29,14 @@ int rpmcliProgressTotal = 0;
  * @param total                final
  */
 static void printHash(const unsigned long amount, const unsigned long total)
-       /*@globals rpmcliHashesCurrent, rpmcliHashesTotal,
-               rpmcliProgressCurrent, fileSystem @*/
-       /*@modifies rpmcliHashesCurrent, rpmcliHashesTotal,
-               rpmcliProgressCurrent, fileSystem @*/
 {
     int hashesNeeded;
 
     rpmcliHashesTotal = (isatty (STDOUT_FILENO) ? 44 : 50);
 
     if (rpmcliHashesCurrent != rpmcliHashesTotal) {
-/*@+relaxtypes@*/
        float pct = (total ? (((float) amount) / total) : 1.0);
        hashesNeeded = (rpmcliHashesTotal * pct) + 0.5;
-/*@=relaxtypes@*/
        while (hashesNeeded > rpmcliHashesCurrent) {
            if (isatty (STDOUT_FILENO)) {
                int i;
@@ -75,11 +60,9 @@ static void printHash(const unsigned long amount, const unsigned long total)
            if (isatty(STDOUT_FILENO)) {
                for (i = 1; i < rpmcliHashesCurrent; i++)
                    (void) putchar ('#');
-/*@+relaxtypes@*/
                pct = (rpmcliProgressTotal
                    ? (((float) rpmcliProgressCurrent) / rpmcliProgressTotal)
                    : 1);
-/*@=relaxtypes@*/
                fprintf(stdout, " [%3d%%]", (int)((100 * pct) + 0.5));
            }
            fprintf(stdout, "\n");
@@ -88,37 +71,27 @@ static void printHash(const unsigned long amount, const unsigned long total)
     }
 }
 
-void * rpmShowProgress(/*@null@*/ const void * arg,
+void * rpmShowProgress(const void * arg,
                        const rpmCallbackType what,
                        const unsigned long amount,
                        const unsigned long total,
-                       /*@null@*/ fnpyKey key,
-                       /*@null@*/ void * data)
-       /*@globals rpmcliHashesCurrent, rpmcliProgressCurrent, rpmcliProgressTotal,
-               fileSystem @*/
-       /*@modifies rpmcliHashesCurrent, rpmcliProgressCurrent, rpmcliProgressTotal,
-               fileSystem @*/
+                       fnpyKey key,
+                       void * data)
 {
-/*@-abstract -castexpose @*/
     Header h = (Header) arg;
-/*@=abstract =castexpose @*/
     char * s;
     int flags = (int) ((long)data);
     void * rc = NULL;
-/*@-abstract -assignexpose @*/
     const char * filename = (const char *)key;
-/*@=abstract =assignexpose @*/
     static FD_t fd = NULL;
     int xx;
 
     switch (what) {
     case RPMCALLBACK_INST_OPEN_FILE:
-/*@-boundsread@*/
        if (filename == NULL || filename[0] == '\0')
            return NULL;
-/*@=boundsread@*/
        fd = Fopen(filename, "r.ufdio");
-       /*@-type@*/ /* FIX: still necessary? */
+       /* FIX: still necessary? */
        if (fd == NULL || Ferror(fd)) {
            rpmError(RPMERR_OPEN, _("open of %s failed: %s\n"), filename,
                        Fstrerror(fd));
@@ -128,16 +101,12 @@ void * rpmShowProgress(/*@null@*/ const void * arg,
            }
        } else
            fd = fdLink(fd, "persist (showProgress)");
-       /*@=type@*/
-/*@+voidabstract@*/
        return (void *)fd;
-/*@=voidabstract@*/
-       /*@notreached@*/ break;
+       break;
 
     case RPMCALLBACK_INST_CLOSE_FILE:
-       /*@-type@*/ /* FIX: still necessary? */
+       /* FIX: still necessary? */
        fd = fdFree(fd, "persist (showProgress)");
-       /*@=type@*/
        if (fd != NULL) {
            xx = Fclose(fd);
            fd = NULL;
@@ -169,14 +138,12 @@ void * rpmShowProgress(/*@null@*/ const void * arg,
 
     case RPMCALLBACK_TRANS_PROGRESS:
     case RPMCALLBACK_INST_PROGRESS:
-/*@+relaxtypes@*/
        if (flags & INSTALL_PERCENT)
            fprintf(stdout, "%%%% %f\n", (double) (total
                                ? ((((float) amount) / total) * 100)
                                : 100.0));
        else if (flags & INSTALL_HASH)
            printHash(amount, total);
-/*@=relaxtypes@*/
        (void) fflush(stdout);
        break;
 
@@ -252,36 +219,29 @@ void * rpmShowProgress(/*@null@*/ const void * arg,
     return rc;
 }      
 
-typedef /*@only@*/ /*@null@*/ const char * str_t;
+typedef const char * str_t;
 
 struct rpmEIU {
     Header h;
     FD_t fd;
     int numFailed;
     int numPkgs;
-/*@only@*/
     str_t * pkgURL;
-/*@dependent@*/ /*@null@*/
     str_t * fnp;
-/*@only@*/
     char * pkgState;
     int prevx;
     int pkgx;
     int numRPMS;
     int numSRPMS;
-/*@only@*/ /*@null@*/
     str_t * sourceURL;
     int isSource;
     int argc;
-/*@only@*/ /*@null@*/
     str_t * argv;
-/*@dependent@*/
     rpmRelocation * relocations;
     rpmRC rpmrc;
 };
 
 /** @todo Generalize --freshen policies. */
-/*@-bounds@*/
 int rpmInstall(rpmts ts,
                struct rpmInstallArguments_s * ia,
                const char ** fileArgv)
@@ -290,7 +250,7 @@ int rpmInstall(rpmts ts,
     rpmps ps;
     rpmprobFilterFlags probFilter;
     rpmRelocation * relocations;
-/*@only@*/ /*@null@*/ const char * fileURL = NULL;
+const char * fileURL = NULL;
     int stopInstall = 0;
     const char ** av = NULL;
     rpmVSFlags vsflags, ovsflags, tvsflags;
@@ -338,10 +298,7 @@ int rpmInstall(rpmts ts,
     }
 
     /* Build fully globbed list of arguments in argv[argc]. */
-    /*@-branchstate@*/
-    /*@-temptrans@*/
     for (eiu->fnp = fileArgv; *eiu->fnp != NULL; eiu->fnp++) {
-    /*@=temptrans@*/
        av = _free(av); ac = 0;
        rc = rpmGlob(*eiu->fnp, &ac, &av);
        if (rc || ac == 0) {
@@ -354,7 +311,6 @@ int rpmInstall(rpmts ts,
        eiu->argc += ac;
        eiu->argv[eiu->argc] = NULL;
     }
-    /*@=branchstate@*/
     av = _free(av);    ac = 0;
 
 restart:
@@ -430,12 +386,12 @@ if (fileURL[0] == '=') {
                eiu->numFailed++;
                eiu->pkgURL[eiu->pkgx] = NULL;
                tfn = _free(tfn);
-               /*@switchbreak@*/ break;
+               break;
            }
            eiu->pkgState[eiu->pkgx] = 1;
            eiu->pkgURL[eiu->pkgx] = tfn;
            eiu->pkgx++;
-       }   /*@switchbreak@*/ break;
+       }   break;
        case URL_IS_PATH:
        case URL_IS_DASH:       /* WRONG WRONG WRONG */
        case URL_IS_HKP:        /* WRONG WRONG WRONG */
@@ -443,7 +399,7 @@ if (fileURL[0] == '=') {
            eiu->pkgURL[eiu->pkgx] = fileURL;
            fileURL = NULL;
            eiu->pkgx++;
-           /*@switchbreak@*/ break;
+           break;
        }
     }
     fileURL = _free(fileURL);
@@ -485,15 +441,15 @@ if (fileURL[0] == '=') {
            rpmMessage(RPMMESS_ERROR, _("%s cannot be installed\n"), *eiu->fnp);
            eiu->numFailed++; *eiu->fnp = NULL;
            continue;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case RPMRC_NOTFOUND:
            goto maybe_manifest;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case RPMRC_NOTTRUSTED:
        case RPMRC_NOKEY:
        case RPMRC_OK:
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
 
        eiu->isSource = headerIsEntry(eiu->h, RPMTAG_SOURCEPACKAGE);
@@ -527,7 +483,6 @@ if (fileURL[0] == '=') {
                               _("package %s is not relocatable\n"), name);
                eiu->numFailed++;
                goto exit;
-               /*@notreached@*/
            }
        }
 
@@ -543,10 +498,10 @@ if (fileURL[0] == '=') {
            count = rpmdbGetIteratorCount(mi);
            while ((oldH = rpmdbNextIterator(mi)) != NULL) {
                if (rpmVersionCompare(oldH, eiu->h) < 0)
-                   /*@innercontinue@*/ continue;
+                   continue;
                /* same or newer package already installed */
                count = 0;
-               /*@innerbreak@*/ break;
+               break;
            }
            mi = rpmdbFreeIterator(mi);
            if (count == 0) {
@@ -556,11 +511,9 @@ if (fileURL[0] == '=') {
            /* Package is newer than those currently installed. */
        }
 
-       /*@-abstract@*/
        rc = rpmtsAddInstallElement(ts, eiu->h, (fnpyKey)fileName,
                        (ia->installInterfaceFlags & INSTALL_UPGRADE) != 0,
                        relocations);
-       /*@=abstract@*/
 
        /* XXX reference held by transaction set */
        eiu->h = headerFree(eiu->h);
@@ -571,24 +524,24 @@ if (fileURL[0] == '=') {
        case 0:
            rpmMessage(RPMMESS_DEBUG, _("\tadded binary package [%d]\n"),
                        eiu->numRPMS);
-           /*@switchbreak@*/ break;
+           break;
        case 1:
            rpmMessage(RPMMESS_ERROR,
                            _("error reading from file %s\n"), *eiu->fnp);
            eiu->numFailed++;
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        case 2:
            rpmMessage(RPMMESS_ERROR,
                            _("file %s requires a newer version of RPM\n"),
                            *eiu->fnp);
            eiu->numFailed++;
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        default:
            eiu->numFailed++;
            goto exit;
-           /*@notreached@*/ /*@switchbreak@*/ break;
+           break;
        }
 
        eiu->numRPMS++;
@@ -609,9 +562,8 @@ maybe_manifest:
        }
 
        /* Read list of packages from manifest. */
-/*@-nullstate@*/ /* FIX: *eiu->argv can be NULL */
+/* FIX: *eiu->argv can be NULL */
        rc = rpmReadPackageManifest(eiu->fd, &eiu->argc, &eiu->argv);
-/*@=nullstate@*/
        if (rc != RPMRC_OK)
            rpmError(RPMERR_MANIFEST, _("%s: not an rpm package (or package manifest): %s\n"),
                        *eiu->fnp, Fstrerror(eiu->fd));
@@ -647,7 +599,6 @@ maybe_manifest:
            eiu->numFailed = eiu->numPkgs;
            stopInstall = 1;
 
-           /*@-branchstate@*/
            if (ts->suggests != NULL && ts->nsuggests > 0) {
                rpmMessage(RPMMESS_NORMAL, _("    Suggested resolutions:\n"));
                for (i = 0; i < ts->nsuggests; i++) {
@@ -663,7 +614,6 @@ maybe_manifest:
                }
                ts->suggests = _free(ts->suggests);
            }
-           /*@=branchstate@*/
        }
        ps = rpmpsFree(ps);
     }
@@ -738,7 +688,6 @@ exit:
 
     return eiu->numFailed;
 }
-/*@=bounds@*/
 
 int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia,
                const char ** argv)
@@ -795,7 +744,7 @@ int rpmErase(rpmts ts, struct rpmInstallArguments_s * ia,
                    rpmMessage(RPMMESS_ERROR, _("\"%s\" specifies multiple packages\n"),
                        *arg);
                    numFailed++;
-                   /*@innerbreak@*/ break;
+                   break;
                }
                if (recOffset) {
                    (void) rpmtsAddEraseElement(ts, h, recOffset);
@@ -879,12 +828,10 @@ int rpmInstallSource(rpmts ts, const char * arg,
     }
     if (rc != 0) {
        rpmMessage(RPMMESS_ERROR, _("%s cannot be installed\n"), arg);
-       /*@-unqualifiedtrans@*/
        if (specFilePtr && *specFilePtr)
            *specFilePtr = _free(*specFilePtr);
        if (cookie && *cookie)
            *cookie = _free(*cookie);
-       /*@=unqualifiedtrans@*/
     }
 
     (void) Fclose(fd);
@@ -1003,10 +950,8 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv)
            rpmMessage(RPMMESS_DEBUG, "\t+++ install %s\n",
                        (rp->key ? rp->key : "???"));
 
-/*@-abstract@*/
            rc = rpmtsAddInstallElement(ts, rp->h, (fnpyKey)rp->key,
                               0, ia->relocations);
-/*@=abstract@*/
            if (rc != 0)
                goto exit;
 
@@ -1097,7 +1042,7 @@ int rpmRollback(rpmts ts, struct rpmInstallArguments_s * ia, const char ** argv)
            for (i = 0; i < rtids->nidt; i++) {
                IDT rrp = rtids->idt + i;
                if (rrp->val.u32 != thistid)
-                   /*@innercontinue@*/ continue;
+                   continue;
                if (rrp->key) { /* XXX can't happen */
                    rpmMessage(RPMMESS_NORMAL, _("\tRemoving %s:\n"), rrp->key);
                    (void) unlink(rrp->key);    /* XXX: Should check rc??? */
index 3f78b64..1de8d8c 100644 (file)
@@ -16,7 +16,6 @@
 #include "rpmlead.h"
 #include "debug.h"
 
-/*@unchecked@*/ /*@observer@*/
 static unsigned char lead_magic[] = {
     RPMLEAD_MAGIC0, RPMLEAD_MAGIC1, RPMLEAD_MAGIC2, RPMLEAD_MAGIC3
 };
@@ -27,30 +26,24 @@ rpmRC writeLead(FD_t fd, const struct rpmlead *lead)
 {
     struct rpmlead l;
 
-/*@-boundswrite@*/
     memcpy(&l, lead, sizeof(l));
     
     memcpy(&l.magic, lead_magic, sizeof(l.magic));
-/*@=boundswrite@*/
     l.type = htons(l.type);
     l.archnum = htons(l.archnum);
     l.osnum = htons(l.osnum);
     l.signature_type = htons(l.signature_type);
        
-/*@-boundswrite@*/
     if (Fwrite(&l, 1, sizeof(l), fd) != sizeof(l))
        return RPMRC_FAIL;
-/*@=boundswrite@*/
 
     return RPMRC_OK;
 }
 
 rpmRC readLead(FD_t fd, struct rpmlead *lead)
 {
-/*@-boundswrite@*/
     memset(lead, 0, sizeof(*lead));
-/*@=boundswrite@*/
-    /*@-type@*/ /* FIX: remove timed read */
+    /* FIX: remove timed read */
     if (timedRead(fd, (char *)lead, sizeof(*lead)) != sizeof(*lead)) {
        if (Ferror(fd)) {
            rpmError(RPMERR_READ, _("read failed: %s (%d)\n"),
@@ -59,7 +52,6 @@ rpmRC readLead(FD_t fd, struct rpmlead *lead)
        }
        return RPMRC_NOTFOUND;
     }
-    /*@=type@*/
 
     if (memcmp(lead->magic, lead_magic, sizeof(lead_magic)))
        return RPMRC_NOTFOUND;
index be8e1a6..72d96d4 100644 (file)
@@ -15,9 +15,7 @@ extern "C" {
  * @param lead         package lead
  * @return             RPMRC_OK on success, RPMRC_FAIL on error
  */
-rpmRC writeLead(FD_t fd, const struct rpmlead *lead)
-       /*@globals fileSystem @*/
-       /*@modifies fd, fileSystem @*/;
+rpmRC writeLead(FD_t fd, const struct rpmlead *lead);
 
 /** \ingroup lead
  * Read lead from file handle.
@@ -25,8 +23,7 @@ rpmRC writeLead(FD_t fd, const struct rpmlead *lead)
  * @retval lead                package lead
  * @return             RPMRC_OK on success, RPMRC_FAIL/RPMRC_NOTFOUND on error
  */
-rpmRC readLead(FD_t fd, /*@out@*/ struct rpmlead *lead)
-       /*@modifies fd, *lead @*/;
+rpmRC readLead(FD_t fd, struct rpmlead *lead);
 
 #ifdef __cplusplus
 }
index e01c292..ed222d1 100644 (file)
@@ -25,25 +25,17 @@ typedef     enum rpmRC_e {
     RPMRC_NOKEY                = 4     /*!< Public key is unavailable. */
 } rpmRC;
 
-/*@-redecl@*/
-/*@checked@*/
 extern struct MacroContext_s * rpmGlobalMacroContext;
 
-/*@checked@*/
 extern struct MacroContext_s * rpmCLIMacroContext;
 
-/*@unchecked@*/ /*@observer@*/
 extern const char * RPMVERSION;
 
-/*@unchecked@*/ /*@observer@*/
 extern const char * rpmNAME;
 
-/*@unchecked@*/ /*@observer@*/
 extern const char * rpmEVR;
 
-/*@unchecked@*/
 extern int rpmFLAGS;
-/*@=redecl@*/
 
 #ifdef __cplusplus
 extern "C" {
@@ -54,9 +46,8 @@ extern "C" {
  * @param p            memory to free
  * @return             NULL always
  */
-/*@unused@*/ static inline /*@null@*/
-void * _free(/*@only@*/ /*@null@*/ /*@out@*/ const void * p)
-       /*@modifies p @*/
+static inline
+void * _free(const void * p)
 {
     if (p != NULL)     free((void *)p);
     return NULL;
@@ -68,7 +59,7 @@ void * _free(/*@only@*/ /*@null@*/ /*@out@*/ const void * p)
  * sets to reduce errors. In general, installs/upgrades are done before
  * strict removals, and prerequisite ordering is done on installs/upgrades.
  */
-typedef /*@abstract@*/ /*@refcounted@*/ struct rpmts_s * rpmts;
+typedef struct rpmts_s * rpmts;
 
 /** \ingroup rpmbuild
  */
@@ -77,45 +68,43 @@ typedef struct Spec_s * Spec;
 /** \ingroup rpmtrans
  * An added/available package retrieval key.
  */
-typedef /*@abstract@*/ void * alKey;
+typedef void * alKey;
 #define        RPMAL_NOMATCH   ((alKey)-1L)
 
 /** \ingroup rpmtrans
  * An added/available package retrieval index.
  */
-/*@-mutrep@*/
-typedef /*@abstract@*/ intptr_t alNum;
-/*@=mutrep@*/
+typedef intptr_t alNum;
 
 /** \ingroup rpmtrans
  * Dependency tag sets from a header, so that a header can be discarded early.
  */
-typedef /*@abstract@*/ /*@refcounted@*/ struct rpmds_s * rpmds;
+typedef struct rpmds_s * rpmds;
 
 /** \ingroup rpmtrans
  * File info tag sets from a header, so that a header can be discarded early.
  */
-typedef /*@abstract@*/ /*@refcounted@*/ struct rpmfi_s * rpmfi;
+typedef struct rpmfi_s * rpmfi;
 
 /** \ingroup rpmtrans
  * An element of a transaction set, i.e. a TR_ADDED or TR_REMOVED package.
  */
-typedef /*@abstract@*/ struct rpmte_s * rpmte;
+typedef struct rpmte_s * rpmte;
 
 /** \ingroup rpmdb
  * Database of headers and tag value indices.
  */
-typedef /*@abstract@*/ /*@refcounted@*/ struct rpmdb_s * rpmdb;
+typedef struct rpmdb_s * rpmdb;
 
 /** \ingroup rpmdb
  * Database iterator.
  */
-typedef /*@abstract@*/ struct _rpmdbMatchIterator * rpmdbMatchIterator;
+typedef struct _rpmdbMatchIterator * rpmdbMatchIterator;
 
 /** \ingroup rpmcli
  * Generalized iterator.
  */
-typedef /*@abstract@*/ /*@refcounted@*/ struct rpmgi_s * rpmgi;
+typedef struct rpmgi_s * rpmgi;
 
 /** \ingroup header
  * Return name, version, release strings from header.
@@ -126,10 +115,9 @@ typedef /*@abstract@*/ /*@refcounted@*/ struct rpmgi_s * rpmgi;
  * @return             0 always
  */
 int headerNVR(Header h,
-               /*@null@*/ /*@out@*/ const char ** np,
-               /*@null@*/ /*@out@*/ const char ** vp,
-               /*@null@*/ /*@out@*/ const char ** rp)
-       /*@modifies *np, *vp, *rp @*/;
+               const char ** np,
+               const char ** vp,
+               const char ** rp);
 
 /** \ingroup header
  * Return name, epoch, version, release, arch strings from header.
@@ -142,12 +130,11 @@ int headerNVR(Header h,
  * @return             0 always
  */
 int headerNEVRA(Header h,
-               /*@null@*/ /*@out@*/ const char ** np,
-               /*@null@*/ /*@out@*/ /*@unused@*/ const char ** ep,
-               /*@null@*/ /*@out@*/ const char ** vp,
-               /*@null@*/ /*@out@*/ const char ** rp,
-               /*@null@*/ /*@out@*/ const char ** ap)
-       /*@modifies *np, *vp, *rp, *ap @*/;
+               const char ** np,
+               const char ** ep,
+               const char ** vp,
+               const char ** rp,
+               const char ** ap);
 
 /** \ingroup header
  * Translate and merge legacy signature tags into header.
@@ -155,8 +142,7 @@ int headerNEVRA(Header h,
  * @param h            header
  * @param sigh         signature header
  */
-void headerMergeLegacySigs(Header h, const Header sigh)
-       /*@modifies h, sigh @*/;
+void headerMergeLegacySigs(Header h, const Header sigh);
 
 /** \ingroup header
  * Regenerate signature header.
@@ -165,8 +151,7 @@ void headerMergeLegacySigs(Header h, const Header sigh)
  * @param noArchiveSize        don't copy archive size tag (pre rpm-4.1)
  * @return             regenerated signature header
  */
-Header headerRegenSigHeader(const Header h, int noArchiveSize)
-       /*@modifies h @*/;
+Header headerRegenSigHeader(const Header h, int noArchiveSize);
 
 /** \ingroup header
  * Retrieve tag info from header.
@@ -181,38 +166,26 @@ Header headerRegenSigHeader(const Header h, int noArchiveSize)
  * @retval c           address of number of values
  * @return             0 on success, 1 on bad magic, 2 on error
  */
-/*@unused@*/
-int rpmHeaderGetEntry(Header h, int_32 tag, /*@out@*/ int_32 *type,
-               /*@out@*/ void **p, /*@out@*/ int_32 *c)
-       /*@modifies *type, *p, *c @*/;
+int rpmHeaderGetEntry(Header h, int_32 tag, int_32 *type,
+               void **p, int_32 *c);
 
 /**
  * Automatically generated table of tag name/value pairs.
  */
-/*@-redecl@*/
-/*@observer@*/ /*@unchecked@*/
 extern const struct headerTagTableEntry_s * rpmTagTable;
-/*@=redecl@*/
 
 /**
  * Number of entries in rpmTagTable.
  */
-/*@-redecl@*/
-/*@unchecked@*/
 extern const int rpmTagTableSize;
-/*@=redecl@*/
 
-/*@unchecked@*/
 extern headerTagIndices rpmTags;
 
 /**
  * Table of query format extensions.
  * @note Chains to headerDefaultFormats[].
  */
-/*@-redecl@*/
-/*@unchecked@*/
 extern const struct headerSprintfExtension_s rpmHeaderFormats[];
-/*@=redecl@*/
 
 /**
  * Pseudo-tags used by the rpmdb and rpmgi iterator API's.
@@ -237,11 +210,9 @@ typedef enum rpmTag_e {
     RPMTAG_HEADERIMAGE         = HEADER_IMAGE,         /*!< Current image. */
     RPMTAG_HEADERSIGNATURES    = HEADER_SIGNATURES,    /*!< Signatures. */
     RPMTAG_HEADERIMMUTABLE     = HEADER_IMMUTABLE,     /*!< Original image. */
-/*@-enummemuse@*/
     RPMTAG_HEADERREGIONS       = HEADER_REGIONS,       /*!< Regions. */
 
     RPMTAG_HEADERI18NTABLE     = HEADER_I18NTABLE, /*!< I18N string locales. */
-/*@=enummemuse@*/
 
 /* Retrofit (and uniqify) signature tags for use by tagName() and rpmQuery. */
 /* the md5 sum was broken *twice* on big endian machines */
@@ -285,9 +256,7 @@ typedef enum rpmTag_e {
     RPMTAG_LICENSE             = 1014, /* s */
     RPMTAG_PACKAGER            = 1015, /* s */
     RPMTAG_GROUP               = 1016, /* s{} */
-/*@-enummemuse@*/
     RPMTAG_CHANGELOG           = 1017, /* s[] internal */
-/*@=enummemuse@*/
     RPMTAG_SOURCE              = 1018, /* s[] */
     RPMTAG_PATCH               = 1019, /* s[] */
     RPMTAG_URL                 = 1020, /* s */
@@ -309,15 +278,11 @@ typedef enum rpmTag_e {
 #define RPMTAG_FILEMD5S        RPMTAG_FILEDIGESTS /* s[] */
     RPMTAG_FILELINKTOS         = 1036, /* s[] */
     RPMTAG_FILEFLAGS           = 1037, /* i[] */
-/*@-enummemuse@*/
     RPMTAG_ROOT                        = 1038, /* internal - obsolete */
-/*@=enummemuse@*/
     RPMTAG_FILEUSERNAME                = 1039, /* s[] */
     RPMTAG_FILEGROUPNAME       = 1040, /* s[] */
-/*@-enummemuse@*/
     RPMTAG_EXCLUDE             = 1041, /* internal - obsolete */
     RPMTAG_EXCLUSIVE           = 1042, /* internal - obsolete */
-/*@=enummemuse@*/
     RPMTAG_ICON                        = 1043, /* x */
     RPMTAG_SOURCERPM           = 1044, /* s */
     RPMTAG_FILEVERIFYFLAGS     = 1045, /* i[] */
@@ -354,9 +319,7 @@ typedef enum rpmTag_e {
     RPMTAG_CHANGELOGTIME       = 1080, /* i[] */
     RPMTAG_CHANGELOGNAME       = 1081, /* s[] */
     RPMTAG_CHANGELOGTEXT       = 1082, /* s[] */
-/*@-enummemuse@*/
     RPMTAG_BROKENMD5           = 1083, /* internal - obsolete */
-/*@=enummemuse@*/
     RPMTAG_PREREQ              = 1084, /* internal */
     RPMTAG_PREINPROG           = 1085, /* s */
     RPMTAG_POSTINPROG          = 1086, /* s */
@@ -380,19 +343,13 @@ typedef enum rpmTag_e {
     RPMTAG_TRIGGERPOSTUN       = 1102, /* internal */
     RPMTAG_AUTOREQ             = 1103, /* internal */
     RPMTAG_AUTOPROV            = 1104, /* internal */
-/*@-enummemuse@*/
     RPMTAG_CAPABILITY          = 1105, /* i legacy - obsolete */
-/*@=enummemuse@*/
     RPMTAG_SOURCEPACKAGE       = 1106, /* i legacy - obsolete */
-/*@-enummemuse@*/
     RPMTAG_OLDORIGFILENAMES    = 1107, /* internal - obsolete */
-/*@=enummemuse@*/
     RPMTAG_BUILDPREREQ         = 1108, /* internal */
     RPMTAG_BUILDREQUIRES       = 1109, /* internal */
     RPMTAG_BUILDCONFLICTS      = 1110, /* internal */
-/*@-enummemuse@*/
     RPMTAG_BUILDMACROS         = 1111, /* internal - unused */
-/*@=enummemuse@*/
     RPMTAG_PROVIDEFLAGS                = 1112, /* i[] */
     RPMTAG_PROVIDEVERSION      = 1113, /* s[] */
     RPMTAG_OBSOLETEFLAGS       = 1114, /* i[] */
@@ -411,9 +368,7 @@ typedef enum rpmTag_e {
     RPMTAG_INSTALLCOLOR                = 1127, /* i transaction color when installed */
     RPMTAG_INSTALLTID          = 1128, /* i */
     RPMTAG_REMOVETID           = 1129, /* i */
-/*@-enummemuse@*/
     RPMTAG_SHA1RHN             = 1130, /* internal - obsolete */
-/*@=enummemuse@*/
     RPMTAG_RHNPLATFORM         = 1131, /* s deprecated */
     RPMTAG_PLATFORM            = 1132, /* s */
     RPMTAG_PATCHESNAME         = 1133, /* s[] deprecated placeholder (SuSE) */
@@ -482,9 +437,7 @@ typedef enum rpmTag_e {
     RPMTAG_BUILDPROVIDES       = 1193, /* internal */
     RPMTAG_BUILDOBSOLETES      = 1194, /* internal */
 
-/*@-enummemuse@*/
     RPMTAG_FIRSTFREE_TAG       /*!< internal */
-/*@=enummemuse@*/
 } rpmTag;
 
 #define        RPMTAG_EXTERNAL_TAG             1000000
@@ -505,9 +458,7 @@ typedef enum rpmfileState_e {
  * File Attributes.
  */
 typedef        enum rpmfileAttrs_e {
-/*@-enummemuse@*/
     RPMFILE_NONE       = 0,
-/*@=enummemuse@*/
     RPMFILE_CONFIG     = (1 <<  0),    /*!< from %%config */
     RPMFILE_DOC                = (1 <<  1),    /*!< from %%doc */
     RPMFILE_ICON       = (1 <<  2),    /*!< from %%donotuse. */
@@ -530,9 +481,7 @@ typedef     enum rpmfileAttrs_e {
  */
 typedef        enum rpmsenseFlags_e {
     RPMSENSE_ANY       = 0,
-/*@-enummemuse@*/
     RPMSENSE_SERIAL    = (1 << 0),     /*!< @todo Legacy. */
-/*@=enummemuse@*/
     RPMSENSE_LESS      = (1 << 1),
     RPMSENSE_GREATER   = (1 << 2),
     RPMSENSE_EQUAL     = (1 << 3),
@@ -559,9 +508,7 @@ typedef     enum rpmsenseFlags_e {
     RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */
     RPMSENSE_SCRIPT_CLEAN = (1 << 23), /*!< %clean build dependency. */
     RPMSENSE_RPMLIB = ((1 << 24) | RPMSENSE_PREREQ), /*!< rpmlib(feature) dependency. */
-/*@-enummemuse@*/
     RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< @todo Implement %triggerprein. */
-/*@=enummemuse@*/
     RPMSENSE_KEYRING   = (1 << 26),
     RPMSENSE_PATCHES   = (1 << 27),
     RPMSENSE_CONFIG    = (1 << 28)
@@ -600,7 +547,6 @@ typedef     enum rpmsenseFlags_e {
 
 /* ==================================================================== */
 /** \name RPMRC */
-/*@{*/
 
 /* Stuff for maintaining "variables" like SOURCEDIR, BUILDDIR, etc */
 #define        RPMVAR_OPTFLAGS                 3
@@ -615,19 +561,14 @@ typedef   enum rpmsenseFlags_e {
  * @deprecated Use rpmExpand() with appropriate macro expression.
  * @todo Eliminate from API.
  */
-/*@-redecl@*/
-/*@observer@*/ /*@null@*/ extern const char * rpmGetVar(int var)
-       /*@*/;
-/*@=redecl@*/
+extern const char * rpmGetVar(int var);
 
 /** \ingroup rpmrc
  * Set value of an rpmrc variable.
  * @deprecated Use rpmDefineMacro() to change appropriate macro instead.
  * @todo Eliminate from API.
  */
-void rpmSetVar(int var, const char * val)
-       /*@globals internalState@*/
-       /*@modifies internalState @*/;
+void rpmSetVar(int var, const char * val);
 
 /** \ingroup rpmrc
  * Build and install arch/os table identifiers.
@@ -647,12 +588,8 @@ enum rpm_machtable_e {
  * @param target       target platform (NULL uses default)
  * @return             0 on success, -1 on error
  */
-int rpmReadConfigFiles(/*@null@*/ const char * file,
-               /*@null@*/ const char * target)
-       /*@globals rpmGlobalMacroContext, rpmCLIMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies rpmGlobalMacroContext, rpmCLIMacroContext,
-               fileSystem, internalState @*/;
+int rpmReadConfigFiles(const char * file,
+               const char * target);
 
 /** \ingroup rpmrc
  * Return current arch name and/or number.
@@ -660,9 +597,8 @@ int rpmReadConfigFiles(/*@null@*/ const char * file,
  * @retval name                address of arch name (or NULL)
  * @retval num         address of arch number (or NULL)
  */
-void rpmGetArchInfo( /*@null@*/ /*@out@*/ const char ** name,
-               /*@null@*/ /*@out@*/ int * num)
-       /*@modifies *name, *num @*/;
+void rpmGetArchInfo( const char ** name,
+               int * num);
 
 /** \ingroup rpmrc
  * Return current os name and/or number.
@@ -670,9 +606,8 @@ void rpmGetArchInfo( /*@null@*/ /*@out@*/ const char ** name,
  * @retval name                address of os name (or NULL)
  * @retval num         address of os number (or NULL)
  */
-void rpmGetOsInfo( /*@null@*/ /*@out@*/ const char ** name,
-               /*@null@*/ /*@out@*/ int * num)
-       /*@modifies *name, *num @*/;
+void rpmGetOsInfo( const char ** name,
+               int * num);
 
 /** \ingroup rpmrc
  * Return arch/os score of a name.
@@ -687,17 +622,14 @@ void rpmGetOsInfo( /*@null@*/ /*@out@*/ const char ** name,
  * @param name         name
  * @return             arch score (0 is no match, lower is preferred)
  */
-int rpmMachineScore(int type, const char * name)
-       /*@*/;
+int rpmMachineScore(int type, const char * name);
 
 /** \ingroup rpmrc
  * Display current rpmrc (and macro) configuration.
  * @param fp           output file handle
  * @return             0 always
  */
-int rpmShowRC(FILE * fp)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies *fp, rpmGlobalMacroContext, fileSystem, internalState  @*/;
+int rpmShowRC(FILE * fp);
 
 /** \ingroup rpmrc
  * @deprecated Use addMacro to set _target_* macros.
@@ -706,9 +638,7 @@ int rpmShowRC(FILE * fp)
  * @param archTable
  * @param osTable
  */
-void rpmSetTables(int archTable, int osTable)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
+void rpmSetTables(int archTable, int osTable);
 
 /** \ingroup rpmrc
  * Set current arch/os names.
@@ -720,9 +650,7 @@ void rpmSetTables(int archTable, int osTable)
  * @param arch         arch name (or NULL)
  * @param os           os name (or NULL)
  */
-void rpmSetMachine(/*@null@*/ const char * arch, /*@null@*/ const char * os)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
+void rpmSetMachine(const char * arch, const char * os);
 
 /** \ingroup rpmrc
  * Return current arch/os names.
@@ -732,23 +660,17 @@ void rpmSetMachine(/*@null@*/ const char * arch, /*@null@*/ const char * os)
  * @retval arch                address of arch name (or NULL)
  * @retval os          address of os name (or NULL)
  */
-/*@unused@*/
-void rpmGetMachine( /*@null@*/ /*@out@*/ const char **arch,
-               /*@null@*/ /*@out@*/ const char **os)
-       /*@modifies *arch, *os @*/;
+void rpmGetMachine( const char **arch,
+               const char **os);
 
 /** \ingroup rpmrc
  * Destroy rpmrc arch/os compatibility tables.
  * @todo Eliminate from API.
  */
-void rpmFreeRpmrc(void)
-       /*@globals internalState @*/
-       /*@modifies internalState @*/;
+void rpmFreeRpmrc(void);
 
-/*@}*/
 /* ==================================================================== */
 /** \name RPMTS */
-/*@{*/
 /**
  * Prototype for headerFreeData() vector.
  *
@@ -756,9 +678,8 @@ void rpmFreeRpmrc(void)
  * @param type         type of data (or -1 to force free)
  * @return             NULL always
  */
-typedef /*@null@*/
-    void * (*HFD_t) (/*@only@*/ /*@null@*/ const void * data, rpmTagType type)
-       /*@modifies data @*/;
+typedef
+    void * (*HFD_t) (const void * data, rpmTagType type);
 
 /**
  * Prototype for headerGetEntry() vector.
@@ -775,10 +696,9 @@ typedef /*@null@*/
  * @return             1 on success, 0 on failure
  */
 typedef int (*HGE_t) (Header h, rpmTag tag,
-                       /*@null@*/ /*@out@*/ rpmTagType * type,
-                       /*@null@*/ /*@out@*/ void ** p,
-                       /*@null@*/ /*@out@*/ int_32 * c)
-       /*@modifies *type, *p, *c @*/;
+                       rpmTagType * type,
+                       void ** p,
+                       int_32 * c);
 
 /**
  * Prototype for headerAddEntry() vector.
@@ -796,8 +716,7 @@ typedef int (*HGE_t) (Header h, rpmTag tag,
  * @return              1 on success, 0 on failure
  */
 typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
-                       const void * p, int_32 c)
-       /*@modifies h @*/;
+                       const void * p, int_32 c);
 
 /**
  * Prototype for headerModifyEntry() vector.
@@ -811,8 +730,7 @@ typedef int (*HAE_t) (Header h, rpmTag tag, rpmTagType type,
  * @return             1 on success, 0 on failure
  */
 typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
-                       const void * p, int_32 c)
-       /*@modifies h @*/;
+                       const void * p, int_32 c);
 
 /**
  * Prototype for headerRemoveEntry() vector.
@@ -824,8 +742,7 @@ typedef int (*HME_t) (Header h, rpmTag tag, rpmTagType type,
  * @param tag          tag
  * @return             0 on success, 1 on failure (INCONSISTENT)
  */
-typedef int (*HRE_t) (Header h, int_32 tag)
-       /*@modifies h @*/;
+typedef int (*HRE_t) (Header h, int_32 tag);
 
 /**
  * @todo Generalize filter mechanism.
@@ -847,9 +764,7 @@ typedef enum rpmprobFilterFlags_e {
  * We pass these around as an array with a sentinel.
  */
 typedef struct rpmRelocation_s {
-/*@only@*/ /*@null@*/
     const char * oldPath;      /*!< NULL here evals to RPMTAG_DEFAULTPREFIX, */
-/*@only@*/ /*@null@*/
     const char * newPath;      /*!< NULL means to omit the file completely! */
 } rpmRelocation;
 
@@ -859,8 +774,7 @@ typedef struct rpmRelocation_s {
  * @param second       2nd header
  * @return             result of comparison
  */
-int rpmVersionCompare(Header first, Header second)
-       /*@*/;
+int rpmVersionCompare(Header first, Header second);
 
 /**
  * File disposition(s) during package install/erase transaction.
@@ -903,17 +817,17 @@ typedef enum fileTypes_e {
 /** \ingroup payload
  * Iterator across package file info, forward on install, backward on erase.
  */
-typedef /*@abstract@*/ struct fsmIterator_s * FSMI_t;
+typedef struct fsmIterator_s * FSMI_t;
 
 /** \ingroup payload
  * File state machine data.
  */
-typedef /*@abstract@*/ struct fsm_s * FSM_t;
+typedef struct fsm_s * FSM_t;
 
 /** \ingroup rpmtrans
  * Package state machine data.
  */
-typedef /*@abstract@*/ /*@refcounted@*/ struct rpmpsm_s * rpmpsm;
+typedef struct rpmpsm_s * rpmpsm;
 
 /**
  * Perform simple sanity and range checks on header tag(s).
@@ -924,8 +838,7 @@ typedef /*@abstract@*/ /*@refcounted@*/ struct rpmpsm_s * rpmpsm;
  * @param negate       negative offset expected?
  * @return             -1 on success, otherwise failing tag element index
  */
-int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negate)
-       /*@modifies *iv @*/;
+int headerVerifyInfo(int il, int dl, const void * pev, void * iv, int negate);
 
 /**
  * Check for supported payload format in header.
@@ -948,10 +861,7 @@ rpmRC headerCheckPayloadFormat(Header h);
  * @return             RPMRC_OK on success
  */
 rpmRC headerCheck(rpmts ts, const void * uh, size_t uc,
-               /*@out@*/ /*@null@*/ const char ** msg)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, *msg, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const char ** msg);
 
 /** 
  * Return checked and loaded header.
@@ -961,11 +871,8 @@ rpmRC headerCheck(rpmts ts, const void * uh, size_t uc,
  * @retval *msg                verification error message (or NULL)
  * @return             RPMRC_OK on success
  */
-rpmRC rpmReadHeader(rpmts ts, FD_t fd, /*@out@*/ Header *hdrp,
-               /*@out@*/ /*@null@*/ const char ** msg)
-        /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-        /*@modifies ts, *hdrp, *msg, rpmGlobalMacroContext,
-                fileSystem, internalState @*/;
+rpmRC rpmReadHeader(rpmts ts, FD_t fd, Header *hdrp,
+               const char ** msg);
 
 /**
  * Return package header from file handle, verifying digests/signatures.
@@ -976,10 +883,7 @@ rpmRC rpmReadHeader(rpmts ts, FD_t fd, /*@out@*/ Header *hdrp,
  * @return             RPMRC_OK on success
  */
 rpmRC rpmReadPackageFile(rpmts ts, FD_t fd,
-               const char * fn, /*@null@*/ /*@out@*/ Header * hdrp)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fd, *hdrp, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const char * fn, Header * hdrp);
 
 /**
  * Install source package.
@@ -990,11 +894,8 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd,
  * @return             rpmRC return code
  */
 rpmRC rpmInstallSourcePackage(rpmts ts, FD_t fd,
-                       /*@null@*/ /*@out@*/ const char ** specFilePtr,
-                       /*@null@*/ /*@out@*/ const char ** cookie)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fd, *specFilePtr, *cookie, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+                       const char ** specFilePtr,
+                       const char ** cookie);
 
 /** \ingroup rpmtrans
  * Bit(s) to control rpmtsRun() operation.
@@ -1008,21 +909,15 @@ typedef enum rpmtransFlags_e {
     RPMTRANS_FLAG_NOTRIGGERS   = (1 <<  4),    /*!< from --notriggers */
     RPMTRANS_FLAG_NODOCS       = (1 <<  5),    /*!< from --excludedocs */
     RPMTRANS_FLAG_ALLFILES     = (1 <<  6),    /*!< from --allfiles */
-/*@-enummemuse@*/
     RPMTRANS_FLAG_KEEPOBSOLETE = (1 <<  7),    /*!< @todo Document. */
-/*@=enummemuse@*/
     RPMTRANS_FLAG_NOCONTEXTS   = (1 <<  8),    /*!< from --nocontexts */
     RPMTRANS_FLAG_DIRSTASH     = (1 <<  9),    /*!< from --dirstash */
     RPMTRANS_FLAG_REPACKAGE    = (1 << 10),    /*!< from --repackage */
 
     RPMTRANS_FLAG_PKGCOMMIT    = (1 << 11),
-/*@-enummemuse@*/
     RPMTRANS_FLAG_PKGUNDO      = (1 << 12),
-/*@=enummemuse@*/
     RPMTRANS_FLAG_COMMIT       = (1 << 13),
-/*@-enummemuse@*/
     RPMTRANS_FLAG_UNDO         = (1 << 14),
-/*@=enummemuse@*/
     RPMTRANS_FLAG_REVERSE      = (1 << 15),
 
     RPMTRANS_FLAG_NOTRIGGERPREIN= (1 << 16),   /*!< from --notriggerprein */
@@ -1033,9 +928,7 @@ typedef enum rpmtransFlags_e {
     RPMTRANS_FLAG_NOPREUN      = (1 << 21),    /*!< from --nopreun */
     RPMTRANS_FLAG_NOPOSTUN     = (1 << 22),    /*!< from --nopostun */
     RPMTRANS_FLAG_NOTRIGGERPOSTUN = (1 << 23), /*!< from --notriggerpostun */
-/*@-enummemuse@*/
     RPMTRANS_FLAG_NOPAYLOAD    = (1 << 24),
-/*@=enummemuse@*/
     RPMTRANS_FLAG_APPLYONLY    = (1 << 25),
 
     RPMTRANS_FLAG_ANACONDA     = (1 << 26),    /*!< from --anaconda */
@@ -1067,11 +960,9 @@ typedef enum rpmtransFlags_e {
  * @retval provVersions        address of array of rpmlib internal provide versions
  * @return             no. of entries
  */
-/*@unused@*/
-int rpmGetRpmlibProvides(/*@null@*/ /*@out@*/ const char *** provNames,
-                       /*@null@*/ /*@out@*/ int ** provFlags,
-                       /*@null@*/ /*@out@*/ const char *** provVersions)
-       /*@modifies *provNames, *provFlags, *provVersions @*/;
+int rpmGetRpmlibProvides(const char *** provNames,
+                       int ** provFlags,
+                       const char *** provVersions);
 
 /** \ingroup rpmtrans
  * Segmented string compare for version and/or release.
@@ -1080,49 +971,40 @@ int rpmGetRpmlibProvides(/*@null@*/ /*@out@*/ const char *** provNames,
  * @param b            2nd string
  * @return             +1 if a is "newer", 0 if equal, -1 if b is "newer"
  */
-int rpmvercmp(const char * a, const char * b)
-       /*@*/;
+int rpmvercmp(const char * a, const char * b);
 
 /** \ingroup rpmtrans
  * Check dependency against internal rpmlib feature provides.
  * @param key          dependency
  * @return             1 if dependency overlaps, 0 otherwise
  */
-int rpmCheckRpmlibProvides(const rpmds key)
-       /*@*/;
+int rpmCheckRpmlibProvides(const rpmds key);
 
 /** \ingroup rpmcli
  * Display current rpmlib feature provides.
  * @param fp           output file handle
  */
-void rpmShowRpmlibProvides(FILE * fp)
-       /*@globals fileSystem @*/
-       /*@modifies *fp, fileSystem @*/;
+void rpmShowRpmlibProvides(FILE * fp);
 
-/*@}*/
 
 /**
  * Return tag name from value.
  * @param tag          tag value
  * @return             tag name, "(unknown)" on not found
  */
-/*@-redecl@*/
-/*@unused@*/ static inline /*@observer@*/
+static inline
 const char * tagName(int tag)
-       /*@*/
 {
     return ((*rpmTags->tagName)(tag));
 }
-/*@=redecl@*/
 
 /**
  * Return tag data type from value.
  * @param tag          tag value
  * @return             tag data type, RPM_NULL_TYPE on not found.
  */
-/*@unused@*/ static inline
+static inline
 int tagType(int tag)
-       /*@*/
 {
     return ((*rpmTags->tagType)(tag));
 }
@@ -1132,9 +1014,8 @@ int tagType(int tag)
  * @param tagstr       name of tag
  * @return             tag value, -1 on not found
  */
-/*@unused@*/ static inline
+static inline
 int tagValue(const char * tagstr)
-       /*@*/
 {
     return ((*rpmTags->tagValue)(tagstr));
 }
@@ -1164,15 +1045,13 @@ struct rpmlead {
     char name[66];
     short osnum;
     short signature_type;      /*!< Signature header type (RPMSIG_HEADERSIG) */
-/*@unused@*/ char reserved[16];        /*!< Pad to 96 bytes -- 8 byte aligned! */
+char reserved[16];     /*!< Pad to 96 bytes -- 8 byte aligned! */
 } ;
 
 /**
  * Release storage used by file system usage cache.
  */
-void freeFilesystems(void)
-       /*@globals internalState@*/
-       /*@modifies internalState@*/;
+void freeFilesystems(void);
 
 /**
  * Return (cached) file system mount points.
@@ -1180,14 +1059,8 @@ void freeFilesystems(void)
  * @retval num                 address of number of file systems (or NULL)
  * @return                     0 on success, 1 on error
  */
-/*@-incondefs@*/
-int rpmGetFilesystemList( /*@null@*/ /*@out@*/ const char *** listptr,
-               /*@null@*/ /*@out@*/ int * num)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies *listptr, *num, fileSystem, internalState @*/
-       /*@requires maxSet(listptr) >= 0 /\ maxSet(num) >= 0 @*/
-       /*@ensures maxRead(num) == 0 @*/;
-/*@=incondefs@*/
+int rpmGetFilesystemList( const char *** listptr,
+               int * num);
 
 /**
  * Determine per-file system usage for a list of files.
@@ -1198,22 +1071,12 @@ int rpmGetFilesystemList( /*@null@*/ /*@out@*/ const char *** listptr,
  * @param flags                        (unused)
  * @return                     0 on success, 1 on error
  */
-/*@-incondefs@*/
 int rpmGetFilesystemUsage(const char ** fileList, int_32 * fssizes,
-               int numFiles, /*@null@*/ /*@out@*/ uint_32 ** usagesPtr,
-               int flags)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies *usagesPtr, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
-       /*@requires maxSet(fileList) >= 0 /\ maxSet(fssizes) == 0
-               /\ maxSet(usagesPtr) >= 0 @*/
-       /*@ensures maxRead(usagesPtr) == 0 @*/;
-/*@=incondefs@*/
+               int numFiles, uint_32 ** usagesPtr,
+               int flags);
 
 /* ==================================================================== */
 /** \name RPMEIU */
-/*@{*/
 /* --- install/upgrade/erase modes */
 
 /** \ingroup rpmcli
@@ -1242,10 +1105,8 @@ typedef enum rpmEraseInterfaceFlags_e {
     UNINSTALL_ALLMATCHES= (1 << 1)     /*!< from --allmatches */
 } rpmEraseInterfaceFlags;
 
-/*@}*/
 /* ==================================================================== */
 /** \name RPMK */
-/*@{*/
 
 /** \ingroup signature
  * Tags found in signature header from package.
@@ -1280,20 +1141,14 @@ enum rpmtagSignature {
  * @return             result of signature verification
  */
 rpmRC rpmVerifySignature(const rpmts ts,
-               /*@out@*/ char * result)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, *result, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               char * result);
 
 /** \ingroup signature
  * Destroy signature header from package.
  * @param h            signature header
  * @return             NULL always
  */
-/*@null@*/ Header rpmFreeSignature(/*@null@*/ /*@killref@*/ Header h)
-       /*@modifies h @*/;
-
-/*@}*/
+Header rpmFreeSignature(Header h);
 
 #ifdef __cplusplus
 }
index 26203e1..7d8ad3e 100644 (file)
 /**
  */
 struct rpmlibProvides_s {
-/*@observer@*/ /*@null@*/
     const char * featureName;
-/*@observer@*/ /*@null@*/
     const char * featureEVR;
     int featureFlags;
-/*@observer@*/ /*@null@*/
     const char * featureDescription;
 };
 
-/*@observer@*/ /*@unchecked@*/
 static struct rpmlibProvides_s rpmlibProvides[] = {
     { "rpmlib(VersionedDependencies)", "3.0.3-1",
        (RPMSENSE_RPMLIB|RPMSENSE_EQUAL),
@@ -64,10 +60,9 @@ void rpmShowRpmlibProvides(FILE * fp)
     const struct rpmlibProvides_s * rlp;
 
     for (rlp = rpmlibProvides; rlp->featureName != NULL; rlp++) {
-/*@-nullpass@*/ /* FIX: rlp->featureEVR not NULL */
+/* FIX: rlp->featureEVR not NULL */
        rpmds pro = rpmdsSingle(RPMTAG_PROVIDENAME, rlp->featureName,
                        rlp->featureEVR, rlp->featureFlags);
-/*@=nullpass@*/
        const char * DNEVR = rpmdsDNEVR(pro);
 
        if (pro != NULL && DNEVR != NULL) {
@@ -105,45 +100,34 @@ int rpmGetRpmlibProvides(const char *** provNames, int ** provFlags,
     int * flags;
     int n = 0;
     
-/*@-boundswrite@*/
     while (rpmlibProvides[n].featureName != NULL)
         n++;
-/*@=boundswrite@*/
 
     names = xcalloc((n+1), sizeof(*names));
     versions = xcalloc((n+1), sizeof(*versions));
     flags = xcalloc((n+1), sizeof(*flags));
     
-/*@-boundswrite@*/
     for (n = 0; rpmlibProvides[n].featureName != NULL; n++) {
         names[n] = rpmlibProvides[n].featureName;
         flags[n] = rpmlibProvides[n].featureFlags;
         versions[n] = rpmlibProvides[n].featureEVR;
     }
     
-    /*@-branchstate@*/
     if (provNames)
        *provNames = names;
     else
        names = _free(names);
-    /*@=branchstate@*/
 
-    /*@-branchstate@*/
     if (provFlags)
        *provFlags = flags;
     else
        flags = _free(flags);
-    /*@=branchstate@*/
 
-    /*@-branchstate@*/
     if (provVersions)
        *provVersions = versions;
     else
        versions = _free(versions);
-    /*@=branchstate@*/
-/*@=boundswrite@*/
 
-    /*@-compmempass@*/ /* FIX: rpmlibProvides[] reachable */
+    /* FIX: rpmlibProvides[] reachable */
     return n;
-    /*@=compmempass@*/
 }
index c493e88..de3e95b 100644 (file)
@@ -12,9 +12,7 @@
 /* Internal interface */
 
 #define RPMLOCK_PATH LOCALSTATEDIR "/lock/rpm/transaction"
-/*@unchecked@*/ /*@observer@*/
 static const char * rpmlock_path_default = "%{?_rpmlock_path}";
-/*@unchecked@*/
 static const char * rpmlock_path = NULL;
 
 enum {
@@ -28,10 +26,7 @@ typedef struct {
        int openmode;
 } * rpmlock;
 
-/*@null@*/
-static rpmlock rpmlock_new(/*@unused@*/ const char *rootdir)
-       /*@globals fileSystem @*/
-       /*@modifies fileSystem @*/
+static rpmlock rpmlock_new(const char *rootdir)
 {
        rpmlock lock = (rpmlock) malloc(sizeof(*lock));
 
@@ -48,32 +43,22 @@ static rpmlock rpmlock_new(/*@unused@*/ const char *rootdir)
                lock->fd = open(rpmlock_path, O_RDWR|O_CREAT, 0644);
                (void) umask(oldmask);
 
-/*@-branchstate@*/
                if (lock->fd == -1) {
                        lock->fd = open(rpmlock_path, O_RDONLY);
                        if (lock->fd == -1) {
                                free(lock);
                                lock = NULL;
                        } else {
-/*@-nullderef@*/       /* XXX splint on crack */
                                lock->openmode = RPMLOCK_READ;
-/*@=nullderef@*/
                        }
                } else {
-/*@-nullderef@*/       /* XXX splint on crack */
                        lock->openmode = RPMLOCK_WRITE | RPMLOCK_READ;
-/*@=nullderef@*/
                }
-/*@=branchstate@*/
        }
-/*@-compdef@*/
        return lock;
-/*@=compdef@*/
 }
 
-static void rpmlock_free(/*@only@*/ /*@null@*/ rpmlock lock)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies lock, fileSystem, internalState @*/
+static void rpmlock_free(rpmlock lock)
 {
        if (lock) {
                (void) close(lock->fd);
@@ -81,8 +66,7 @@ static void rpmlock_free(/*@only@*/ /*@null@*/ rpmlock lock)
        }
 }
 
-static int rpmlock_acquire(/*@null@*/ rpmlock lock, int mode)
-       /*@*/
+static int rpmlock_acquire(rpmlock lock, int mode)
 {
        int res = 0;
        if (lock && (mode & lock->openmode)) {
@@ -106,9 +90,7 @@ static int rpmlock_acquire(/*@null@*/ rpmlock lock, int mode)
        return res;
 }
 
-static void rpmlock_release(/*@null@*/ rpmlock lock)
-       /*@globals internalState @*/
-       /*@modifies internalState @*/
+static void rpmlock_release(rpmlock lock)
 {
        if (lock) {
                struct flock info;
@@ -132,7 +114,6 @@ void *rpmtsAcquireLock(rpmts ts)
        if (!rootDir || rpmtsChrootDone(ts))
                rootDir = "/";
        lock = rpmlock_new(rootDir);
-/*@-branchstate@*/
        if (!lock) {
                rpmMessage(RPMMESS_ERROR, _("can't create transaction lock on %s\n"), rpmlock_path);
        } else if (!rpmlock_acquire(lock, RPMLOCK_WRITE)) {
@@ -146,7 +127,6 @@ void *rpmtsAcquireLock(rpmts ts)
                        lock = NULL;
                }
        }
-/*@=branchstate@*/
        return lock;
 }
 
index c36566f..7398268 100644 (file)
@@ -1,12 +1,7 @@
 #ifndef RPMLOCK_H
 #define RPMLOCK_H 
 
-/*@only@*/ /*@null@*/
-void * rpmtsAcquireLock(rpmts ts)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies fileSystem, internalState @*/;
-void rpmtsFreeLock(/*@only@*/ /*@null@*/ void *lock)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies lock, fileSystem, internalState @*/;
+void * rpmtsAcquireLock(rpmts ts);
+void rpmtsFreeLock(void *lock);
 
 #endif
index 1c6701c..3389ff6 100644 (file)
 #include "misc.h"
 #include "debug.h"
 
-/*@access fnpyKey @*/
-/*@access rpmProblem @*/
 
-/*@unchecked@*/
 int _rpmps_debug = 0;
 
 rpmps XrpmpsUnlink(rpmps ps, const char * msg,
                const char * fn, unsigned ln)
 {
-/*@-modfilesys@*/
 if (_rpmps_debug > 0 && msg != NULL)
 fprintf(stderr, "--> ps %p -- %d %s at %s:%u\n", ps, ps->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
     ps->nrefs--;
-/*@-refcounttrans@*/
     return ps;
-/*@=refcounttrans@*/
 }
 
 rpmps XrpmpsLink(rpmps ps, const char * msg,
                const char * fn, unsigned ln)
 {
     ps->nrefs++;
-/*@-modfilesys@*/
 if (_rpmps_debug > 0 && msg != NULL)
 fprintf(stderr, "--> ps %p ++ %d %s at %s:%u\n", ps, ps->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
-/*@-refcounttrans@*/
     return ps;
-/*@=refcounttrans@*/
 }
 
 int rpmpsNumProblems(rpmps ps)
@@ -99,9 +88,7 @@ void rpmpsAppend(rpmps ps, rpmProblemType type,
 
     p = ps->probs + ps->numProblems;
     ps->numProblems++;
-/*@-boundswrite@*/
     memset(p, 0, sizeof(*p));
-/*@=boundswrite@*/
 
     p->type = type;
     p->key = key;
@@ -113,13 +100,11 @@ void rpmpsAppend(rpmps ps, rpmProblemType type,
 
     p->str1 = NULL;
     if (dn != NULL || bn != NULL) {
-/*@-boundswrite@*/
        t = xcalloc(1,  (dn != NULL ? strlen(dn) : 0) +
                        (bn != NULL ? strlen(bn) : 0) + 1);
        p->str1 = t;
        if (dn != NULL) t = stpcpy(t, dn);
        if (bn != NULL) t = stpcpy(t, bn);
-/*@=boundswrite@*/
     }
 }
 
@@ -146,11 +131,10 @@ int rpmpsTrim(rpmps ps, rpmps filter)
            continue;
        }
        while ((t - ps->probs) < ps->numProblems) {
-           /*@-nullpass@*/     /* LCL: looks good to me <shrug> */
+               /* LCL: looks good to me <shrug> */
            if (f->type == t->type && t->key == f->key &&
                     XSTRCMP(f->str1, t->str1))
-               /*@innerbreak@*/ break;
-           /*@=nullpass@*/
+               break;
            t++;
            gotProblems = 1;
        }
@@ -170,16 +154,14 @@ int rpmpsTrim(rpmps ps, rpmps filter)
 }
 
 #if !defined(HAVE_VSNPRINTF)
-/*@-shadow -bufferoverflowhigh @*/
-static inline int vsnprintf(/*@out@*/ char * buf, /*@unused@*/ int nb,
+static inline int vsnprintf(char * buf, int nb,
        const char * fmt, va_list ap)
 {
     return vsprintf(buf, fmt, ap);
 }
-/*@=shadow =bufferoverflowhigh @*/
 #endif
 #if !defined(HAVE_SNPRINTF)
-static inline int snprintf(/*@out@*/ char * buf, int nb, const char * fmt, ...)
+static inline int snprintf(char * buf, int nb, const char * fmt, ...)
 {
     va_list ap;
     int rc;
@@ -192,11 +174,8 @@ static inline int snprintf(/*@out@*/ char * buf, int nb, const char * fmt, ...)
 
 const char * rpmProblemString(const rpmProblem prob)
 {
-/*@observer@*/
     const char * pkgNEVR = (prob->pkgNEVR ? prob->pkgNEVR : "?pkgNEVR?");
-/*@observer@*/
     const char * altNEVR = (prob->altNEVR ? prob->altNEVR : "? ?altNEVR?");
-/*@observer@*/
     const char * str1 = (prob->str1 ? prob->str1 : N_("different"));
     int nb =   strlen(pkgNEVR) + strlen(str1) + strlen(altNEVR) + 100;
     char * buf = xmalloc(nb+1);
@@ -280,7 +259,6 @@ const char * rpmProblemString(const rpmProblem prob)
 }
 
 static int sameProblem(const rpmProblem ap, const rpmProblem bp)
-       /*@*/
 {
     if (ap->type != bp->type)
        return 1;
@@ -323,7 +301,7 @@ void rpmpsPrint(FILE *fp, rpmps ps)
        /* Filter already displayed problems. */
        for (j = 0; j < i; j++) {
            if (!sameProblem(p, ps->probs + j))
-               /*@innerbreak@*/ break;
+               break;
        }
        if (j < i)
            continue;
index ef9cf9d..1a8a453 100644 (file)
@@ -6,20 +6,17 @@
  * Structures and prototypes used for an "rpmps" problem set.
  */
 
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmps_debug;
-/*@=exportlocal@*/
 
 /**
  * Raw data for an element of a problem set.
  */
-typedef /*@abstract@*/ struct rpmProblem_s * rpmProblem;
+typedef struct rpmProblem_s * rpmProblem;
 
 /**
  * Transaction problems found while processing a transaction set/
  */
-typedef /*@abstract@*/ /*@refcounted@*/ struct rpmps_s * rpmps;
+typedef struct rpmps_s * rpmps;
 
 /**
  * Enumerate transaction set problem types.
@@ -42,15 +39,11 @@ typedef enum rpmProblemType_e {
 /**
  */
 struct rpmProblem_s {
-/*@only@*/ /*@null@*/
     char * pkgNEVR;
-/*@only@*/ /*@null@*/
     char * altNEVR;
-/*@exposed@*/ /*@null@*/
     fnpyKey key;
     rpmProblemType type;
     int ignoreProblem;
-/*@only@*/ /*@null@*/
     char * str1;
     unsigned long ulong1;
 };
@@ -61,7 +54,6 @@ struct rpmps_s {
     int numProblems;           /*!< Current probs array size. */
     int numProblemsAlloced;    /*!< Allocated probs array size. */
     rpmProblem probs;          /*!< Array of specific problems. */
-/*@refs@*/
     int nrefs;                 /*!< Reference count. */
 };
 
@@ -74,12 +66,7 @@ extern "C" {
  * @param prob         rpm problem
  * @return             formatted string (malloc'd)
  */
-/*@-exportlocal@*/
-/*@-redecl@*/  /* LCL: is confused. */
-/*@only@*/ extern const char * rpmProblemString(const rpmProblem prob)
-       /*@*/;
-/*@=redecl@*/
-/*@=exportlocal@*/
+extern const char * rpmProblemString(const rpmProblem prob);
 
 /**
  * Unreference a problem set instance.
@@ -87,19 +74,13 @@ extern "C" {
  * @param msg
  * @return             problem set
  */
-/*@unused@*/
-rpmps rpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
-               const char * msg)
-       /*@modifies ps @*/;
+rpmps rpmpsUnlink (rpmps ps,
+               const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@-exportlocal@*/
-/*@null@*/
-rpmps XrpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
-               const char * msg, const char * fn, unsigned ln)
-       /*@modifies ps @*/;
+rpmps XrpmpsUnlink (rpmps ps,
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmpsUnlink(_ps, _msg)  XrpmpsUnlink(_ps, _msg, __FILE__, __LINE__)
-/*@=exportlocal@*/
 
 /**
  * Reference a problem set instance.
@@ -107,14 +88,11 @@ rpmps XrpmpsUnlink (/*@killref@*/ /*@returned@*/ rpmps ps,
  * @param msg
  * @return             new transaction set reference
  */
-/*@unused@*/
-rpmps rpmpsLink (rpmps ps, const char * msg)
-       /*@modifies ps @*/;
+rpmps rpmpsLink (rpmps ps, const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
 rpmps XrpmpsLink (rpmps ps,
-               const char * msg, const char * fn, unsigned ln)
-        /*@modifies ps @*/;
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmpsLink(_ps, _msg)    XrpmpsLink(_ps, _msg, __FILE__, __LINE__)
 
 /**
@@ -122,33 +100,27 @@ rpmps XrpmpsLink (rpmps ps,
  * @param ps           problem set
  * @return             number of problems
  */
-int rpmpsNumProblems(/*@null@*/ rpmps ps)
-       /*@*/;
+int rpmpsNumProblems(rpmps ps);
 
 /**
  * Create a problem set.
  * @return             new problem set
  */
-rpmps rpmpsCreate(void)
-       /*@*/;
+rpmps rpmpsCreate(void);
 
 /**
  * Destroy a problem set.
  * @param ps           problem set
  * @return             NULL always
  */
-/*@null@*/
-rpmps rpmpsFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmps ps)
-       /*@modifies ps @*/;
+rpmps rpmpsFree(rpmps ps);
 
 /**
  * Print problems to file handle.
  * @param fp           file handle (NULL uses stderr)
  * @param ps           problem set
  */
-void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
-       /*@globals fileSystem @*/
-       /*@modifies *fp, ps, fileSystem @*/;
+void rpmpsPrint(FILE *fp, rpmps ps);
 
 /**
  * Append a problem to current set of problems.
@@ -161,13 +133,12 @@ void rpmpsPrint(/*@null@*/ FILE *fp, /*@null@*/ rpmps ps)
  * @param altNEVR      related (e.g. through a dependency) package name
  * @param ulong1       generic pointer/long attribute
  */
-void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
-               /*@null@*/ const char * pkgNEVR,
-               /*@exposed@*/ /*@null@*/ fnpyKey key,
-               /*@null@*/ const char * dn, /*@null@*/ const char * bn,
-               /*@null@*/ const char * altNEVR,
-               unsigned long ulong1)
-       /*@modifies ps @*/;
+void rpmpsAppend(rpmps ps, rpmProblemType type,
+               const char * pkgNEVR,
+               fnpyKey key,
+               const char * dn, const char * bn,
+               const char * altNEVR,
+               unsigned long ulong1);
 
 /**
  * Filter a problem set.
@@ -184,8 +155,7 @@ void rpmpsAppend(/*@null@*/ rpmps ps, rpmProblemType type,
  * @param filter       problem filter (or NULL)
  * @return             0 no problems, 1 if problems remain
  */
-int rpmpsTrim(/*@null@*/ rpmps ps, /*@null@*/ rpmps filter)
-       /*@modifies ps @*/;
+int rpmpsTrim(rpmps ps, rpmps filter);
 
 #ifdef __cplusplus
 }
index 84640e4..198bfc7 100644 (file)
@@ -1,4 +1,3 @@
-/*@-bounds@*/
 #include "system.h"
 
 #include <stdarg.h>
 #include "misc.h"
 #include "debug.h"
 
-/*@observer@*/ /*@unchecked@*/
 static const char *defrcfiles = 
       RPMCONFIGDIR "/rpmrc" 
   ":" RPMCONFIGDIR "/" RPMCANONVENDOR "/rpmrc"
   ":" SYSCONFDIR "/rpmrc"
   ":~/.rpmrc"; 
 
-/*@observer@*/ /*@checked@*/
 const char * macrofiles =
 #ifndef MACROFILES
       RPMCONFIGDIR "/macros"
@@ -42,14 +39,11 @@ const char * macrofiles =
   MACROFILES;
 #endif
 
-/*@observer@*/ /*@unchecked@*/
 static const char * platform = SYSCONFDIR "/rpm/platform";
-/*@only@*/ /*@relnull@*/ /*@unchecked@*/
 static const char ** platpat = NULL;
-/*@unchecked@*/
 static int nplatpat = 0;
 
-typedef /*@owned@*/ const char * cptr_t;
+typedef const char * cptr_t;
 
 typedef struct machCacheEntry_s {
     const char * name;
@@ -77,27 +71,27 @@ struct rpmvarValue {
     const char * value;
     /* eventually, this arch will be replaced with a generic condition */
     const char * arch;
-/*@only@*/ /*@null@*/ struct rpmvarValue * next;
+struct rpmvarValue * next;
 };
 
 struct rpmOption {
     const char * name;
     int var;
     int archSpecific;
-/*@unused@*/ int required;
+int required;
     int macroize;
     int localize;
-/*@unused@*/ struct rpmOptionValue * value;
+struct rpmOptionValue * value;
 };
 
 typedef struct defaultEntry_s {
-/*@owned@*/ /*@null@*/ const char * name;
-/*@owned@*/ /*@null@*/ const char * defName;
+const char * name;
+const char * defName;
 } * defaultEntry;
 
 typedef struct canonEntry_s {
-/*@owned@*/ const char * name;
-/*@owned@*/ const char * short_name;
+const char * name;
+const char * short_name;
     short num;
 } * canonEntry;
 
@@ -106,7 +100,7 @@ typedef struct canonEntry_s {
  * for giggles, 'key'_canon, 'key'_compat, and 'key'_canon will also work
  */
 typedef struct tableType_s {
-/*@observer@*/ const char * const key;
+const char * const key;
     const int hasCanon;
     const int hasTranslate;
     struct machEquivTable_s equiv;
@@ -117,8 +111,6 @@ typedef struct tableType_s {
     int canonsLength;
 } * tableType;
 
-/*@-fullinitblock@*/
-/*@unchecked@*/
 static struct tableType_s tables[RPM_MACHTABLE_COUNT] = {
     { "arch", 1, 0 },
     { "os", 1, 0 },
@@ -129,62 +121,44 @@ static struct tableType_s tables[RPM_MACHTABLE_COUNT] = {
 /* this *must* be kept in alphabetical order */
 /* The order of the flags is archSpecific, required, macroize, localize */
 
-/*@unchecked@*/
 static struct rpmOption optionTable[] = {
     { "include",               RPMVAR_INCLUDE,                 0, 1,   0, 2 },
     { "macrofiles",            RPMVAR_MACROFILES,              0, 0,   0, 1 },
     { "optflags",              RPMVAR_OPTFLAGS,                1, 0,   1, 0 },
     { "provides",               RPMVAR_PROVIDES,                0, 0,  0, 0 },
 };
-/*@=fullinitblock@*/
 
-/*@unchecked@*/
 static int optionTableSize = sizeof(optionTable) / sizeof(*optionTable);
 
 #define OS     0
 #define ARCH   1
 
-/*@unchecked@*/
 static cptr_t current[2];
 
-/*@unchecked@*/
 static int currTables[2] = { RPM_MACHTABLE_INSTOS, RPM_MACHTABLE_INSTARCH };
 
-/*@unchecked@*/
 static struct rpmvarValue values[RPMVAR_NUM];
 
-/*@unchecked@*/
 static int defaultsInitialized = 0;
 
 /* prototypes */
-static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies fd, rpmGlobalMacroContext, fileSystem, internalState @*/;
+static int doReadRC( FD_t fd, const char * urlfn);
 
 static void rpmSetVarArch(int var, const char * val,
-               /*@null@*/ const char * arch)
-       /*@globals values, internalState @*/
-       /*@modifies values, internalState @*/;
+               const char * arch);
 
-static void rebuildCompatTables(int type, const char * name)
-       /*@globals internalState @*/
-       /*@modifies internalState @*/;
+static void rebuildCompatTables(int type, const char * name);
 
-static void rpmRebuildTargetVars(/*@null@*/ const char **target, /*@null@*/ const char ** canontarget)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies *canontarget, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+static void rpmRebuildTargetVars(const char **target, const char ** canontarget);
 
 static int optionCompare(const void * a, const void * b)
-       /*@*/
 {
     return xstrcasecmp(((struct rpmOption *) a)->name,
                      ((struct rpmOption *) b)->name);
 }
 
-static /*@observer@*/ /*@null@*/ machCacheEntry
+static machCacheEntry
 machCacheFindEntry(const machCache cache, const char * key)
-       /*@*/
 {
     int i;
 
@@ -196,8 +170,6 @@ machCacheFindEntry(const machCache cache, const char * key)
 
 static int machCompatCacheAdd(char * name, const char * fn, int linenum,
                                machCache cache)
-       /*@globals internalState @*/
-       /*@modifies *name, cache->cache, cache->size, internalState @*/
 {
     machCacheEntry entry = NULL;
     char * chptr;
@@ -264,9 +236,8 @@ static int machCompatCacheAdd(char * name, const char * fn, int linenum,
     return 0;
 }
 
-static /*@observer@*/ /*@null@*/ machEquivInfo
+static machEquivInfo
 machEquivSearch(const machEquivTable table, const char * name)
-       /*@*/
 {
     int i;
 
@@ -279,7 +250,6 @@ machEquivSearch(const machEquivTable table, const char * name)
 
 static void machAddEquiv(machEquivTable table, const char * name,
                           int distance)
-       /*@modifies table->list, table->count @*/
 {
     machEquivInfo equiv;
 
@@ -298,7 +268,6 @@ static void machAddEquiv(machEquivTable table, const char * name,
 
 static void machCacheEntryVisit(machCache cache,
                machEquivTable table, const char * name, int distance)
-       /*@modifies table->list, table->count @*/
 {
     machCacheEntry entry;
     int i;
@@ -319,7 +288,6 @@ static void machCacheEntryVisit(machCache cache,
 
 static void machFindEquivs(machCache cache, machEquivTable table,
                const char * key)
-       /*@modifies cache->cache, table->list, table->count @*/
 {
     int i;
 
@@ -338,17 +306,14 @@ static void machFindEquivs(machCache cache, machEquivTable table,
      * Yuck. We have to start at a point at traverse it, remembering how
      * far away everything is.
      */
-    /*@-nullstate@*/   /* FIX: table->list may be NULL. */
+       /* FIX: table->list may be NULL. */
     machAddEquiv(table, key, 1);
     machCacheEntryVisit(cache, table, key, 2);
     return;
-    /*@=nullstate@*/
 }
 
 static int addCanon(canonEntry * table, int * tableLen, char * line,
                    const char * fn, int lineNum)
-       /*@globals internalState @*/
-       /*@modifies *table, *tableLen, *line, internalState @*/
 {
     canonEntry t;
     char *s, *s1;
@@ -357,9 +322,7 @@ static int addCanon(canonEntry * table, int * tableLen, char * line,
     int tnum;
 
     (*tableLen) += 2;
-    /*@-unqualifiedtrans@*/
     *table = xrealloc(*table, sizeof(**table) * (*tableLen));
-    /*@=unqualifiedtrans@*/
 
     t = & ((*table)[*tableLen - 2]);
 
@@ -377,14 +340,13 @@ static int addCanon(canonEntry * table, int * tableLen, char * line,
        return RPMERR_RPMRC;
     }
 
-    /*@-nullpass@*/    /* LCL: s != NULL here. */
+       /* LCL: s != NULL here. */
     tnum = strtoul(s, &s1, 10);
     if ((*s1) || (s1 == s) || (tnum == ULONG_MAX)) {
        rpmError(RPMERR_RPMRC, _("Bad arch/os number: %s (%s:%d)\n"), s,
              fn, lineNum);
        return(RPMERR_RPMRC);
     }
-    /*@=nullpass@*/
 
     t[0].name = xstrdup(tname);
     t[0].short_name = (tshort_name ? xstrdup(tshort_name) : xstrdup(""));
@@ -401,19 +363,14 @@ static int addCanon(canonEntry * table, int * tableLen, char * line,
 
 static int addDefault(defaultEntry * table, int * tableLen, char * line,
                        const char * fn, int lineNum)
-       /*@globals internalState @*/
-       /*@modifies *table, *tableLen, *line, internalState @*/
 {
     defaultEntry t;
 
     (*tableLen)++;
-    /*@-unqualifiedtrans@*/
     *table = xrealloc(*table, sizeof(**table) * (*tableLen));
-    /*@=unqualifiedtrans@*/
 
     t = & ((*table)[*tableLen - 1]);
 
-    /*@-temptrans@*/
     t->name = strtok(line, ": \t");
     t->defName = strtok(NULL, " \t");
     if (! (t->name && t->defName)) {
@@ -429,31 +386,26 @@ static int addDefault(defaultEntry * table, int * tableLen, char * line,
 
     t->name = xstrdup(t->name);
     t->defName = (t->defName ? xstrdup(t->defName) : NULL);
-    /*@=temptrans@*/
 
     return 0;
 }
 
-static /*@null@*/ canonEntry lookupInCanonTable(const char * name,
+static canonEntry lookupInCanonTable(const char * name,
                const canonEntry table, int tableLen)
-       /*@*/
 {
     while (tableLen) {
        tableLen--;
        if (strcmp(name, table[tableLen].name))
            continue;
-       /*@-immediatetrans -retalias@*/
        return &(table[tableLen]);
-       /*@=immediatetrans =retalias@*/
     }
 
     return NULL;
 }
 
-static /*@observer@*/ /*@null@*/
+static
 const char * lookupInDefaultTable(const char * name,
                const defaultEntry table, int tableLen)
-       /*@*/
 {
     while (tableLen) {
        tableLen--;
@@ -465,9 +417,7 @@ const char * lookupInDefaultTable(const char * name,
 }
 
 static void setVarDefault(int var, const char * macroname, const char * val,
-               /*@null@*/ const char * body)
-       /*@globals rpmGlobalMacroContext, internalState @*/
-       /*@modifies rpmGlobalMacroContext, internalState @*/
+               const char * body)
 {
     if (var >= 0) {    /* XXX Dying ... */
        if (rpmGetVar(var)) return;
@@ -479,8 +429,6 @@ static void setVarDefault(int var, const char * macroname, const char * val,
 }
 
 static void setPathDefault(int var, const char * macroname, const char * subdir)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies rpmGlobalMacroContext, internalState @*/
 {
 
     if (var >= 0) {    /* XXX Dying ... */
@@ -511,7 +459,6 @@ static void setPathDefault(int var, const char * macroname, const char * subdir)
     }
 }
 
-/*@observer@*/ /*@unchecked@*/
 static const char * prescriptenviron = "\n\
 RPM_SOURCE_DIR=\"%{_sourcedir}\"\n\
 RPM_BUILD_DIR=\"%{_builddir}\"\n\
@@ -530,8 +477,6 @@ export RPM_BUILD_ROOT\n}\
 ";
 
 static void setDefaults(void)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies rpmGlobalMacroContext, internalState @*/
 {
 
     addMacro(NULL, "_usr", NULL, "/usr", RMIL_DEFAULT);
@@ -566,10 +511,8 @@ static void setDefaults(void)
 
 }
 
-/*@-usedef@*/  /*@ FIX: se usage inconsistent, W2DO? */
-static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies fd, rpmGlobalMacroContext, fileSystem, internalState @*/
+/* FIX: se usage inconsistent, W2DO? */
+static int doReadRC( FD_t fd, const char * urlfn)
 {
     const char *s;
     char *se, *next;
@@ -599,7 +542,6 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
     next[nb + 1] = '\0';
   }
 
-    /*@-branchstate@*/
     while (*next != '\0') {
        linenum++;
 
@@ -664,7 +606,6 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
                        option->name, urlfn, linenum, s);
                    fn = _free(fn);
                    return 1;
-                   /*@notreached@*/
                }
 
                fdinc = Fopen(fn, "r.fpio");
@@ -678,7 +619,7 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
                fn = _free(fn);
                if (rc) return rc;
                continue;       /* XXX don't save include value as var/macro */
-             } /*@notreached@*/ /*@switchbreak@*/ break;
+             } break;
            case RPMVAR_PROVIDES:
              { char *t;
                s = rpmGetVar(RPMVAR_PROVIDES);
@@ -689,9 +630,9 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
                while (*se != '\0') *t++ = *se++;
                *t++ = '\0';
                se = (char *)fn;
-             } /*@switchbreak@*/ break;
+             } break;
            default:
-               /*@switchbreak@*/ break;
+               break;
            }
 
            if (option->archSpecific) {
@@ -737,7 +678,7 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
 
            for (i = 0; i < RPM_MACHTABLE_COUNT; i++) {
                if (!strncmp(tables[i].key, s, strlen(tables[i].key)))
-                   /*@innerbreak@*/ break;
+                   break;
            }
 
            if (i < RPM_MACHTABLE_COUNT) {
@@ -771,21 +712,14 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
            }
        }
     }
-    /*@=branchstate@*/
 
     return 0;
 }
-/*@=usedef@*/
 
 
 /**
  */
-/*@-bounds@*/
 static int rpmPlatform(const char * platform)
-       /*@globals nplatpat, platpat,
-               rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies nplatpat, platpat,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     char *cpu = NULL, *vendor = NULL, *os = NULL, *gnu = NULL;
     byte * b = NULL;
@@ -819,11 +753,9 @@ static int rpmPlatform(const char * platform)
                *t = '\0';
            if (t > p) {
                platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat));
-/*@-onlyunqglobaltrans@*/
                platpat[nplatpat] = xstrdup(p);
                nplatpat++;
                platpat[nplatpat] = NULL;
-/*@=onlyunqglobaltrans@*/
            }
            continue;
        }
@@ -839,7 +771,6 @@ static int rpmPlatform(const char * platform)
        vendor = p;
        while (*p && !(*p == '-' || isspace(*p)))
            p++;
-/*@-branchstate@*/
        if (*p != '-') {
            if (*p != '\0') *p++ = '\0';
            os = vendor;
@@ -859,30 +790,24 @@ static int rpmPlatform(const char * platform)
            }
            if (*p != '\0') *p++ = '\0';
        }
-/*@=branchstate@*/
 
        addMacro(NULL, "_host_cpu", NULL, cpu, -1);
        addMacro(NULL, "_host_vendor", NULL, vendor, -1);
        addMacro(NULL, "_host_os", NULL, os, -1);
 
        platpat = xrealloc(platpat, (nplatpat + 2) * sizeof(*platpat));
-/*@-onlyunqglobaltrans@*/
        platpat[nplatpat] = rpmExpand("%{_host_cpu}-%{_host_vendor}-%{_host_os}", (gnu && *gnu ? "-" : NULL), gnu, NULL);
        nplatpat++;
        platpat[nplatpat] = NULL;
-/*@=onlyunqglobaltrans@*/
        
        init_platform++;
     }
     rc = (init_platform ? 0 : -1);
 
 exit:
-/*@-modobserver@*/
     b = _free(b);
-/*@=modobserver@*/
     return rc;
 }
-/*@=bounds@*/
 
 
 #      if defined(__linux__) && defined(__i386__)
@@ -893,7 +818,6 @@ exit:
  * Generic CPUID function
  */
 static inline void cpuid(unsigned int op, int *eax, int *ebx, int *ecx, int *edx)
-       /*@modifies *eax, *ebx, *ecx, *edx @*/
 {
     asm volatile (
        "pushl  %%ebx           \n"
@@ -908,7 +832,6 @@ static inline void cpuid(unsigned int op, int *eax, int *ebx, int *ecx, int *edx
  * CPUID functions returning a single datum
  */
 static inline unsigned int cpuid_eax(unsigned int op)
-       /*@*/
 {
        unsigned int tmp, val;
        cpuid(op, &val, &tmp, &tmp, &tmp);
@@ -916,7 +839,6 @@ static inline unsigned int cpuid_eax(unsigned int op)
 }
 
 static inline unsigned int cpuid_ebx(unsigned int op)
-       /*@*/
 {
        unsigned int tmp, val;
        cpuid(op, &tmp, &val, &tmp, &tmp);
@@ -924,7 +846,6 @@ static inline unsigned int cpuid_ebx(unsigned int op)
 }
 
 static inline unsigned int cpuid_ecx(unsigned int op)
-       /*@*/
 {
        unsigned int tmp, val;
        cpuid(op, &tmp, &tmp, &val, &tmp);
@@ -932,26 +853,20 @@ static inline unsigned int cpuid_ecx(unsigned int op)
 }
 
 static inline unsigned int cpuid_edx(unsigned int op)
-       /*@*/
 {
        unsigned int tmp, val;
        cpuid(op, &tmp, &tmp, &tmp, &val);
        return val;
 }
 
-/*@unchecked@*/
 static sigjmp_buf jenv;
 
 static inline void model3(int _unused)
-       /*@globals internalState @*/
-       /*@modifies internalState @*/
 {
        siglongjmp(jenv, 1);
 }
 
 static inline int RPMClass(void)
-       /*@globals internalState @*/
-       /*@modifies internalState @*/
 {
        int cpu;
        unsigned int tfms, junk, cap, capamd;
@@ -992,7 +907,6 @@ static inline int RPMClass(void)
 
 /* should only be called for model 6 CPU's */
 static int is_athlon(void)
-       /*@*/
 {
        unsigned int eax, ebx, ecx, edx;
        char vendor[16];
@@ -1097,10 +1011,8 @@ static void mfspr_ill(int notused)
 
 /**
  */
-static void defaultMachine(/*@out@*/ const char ** arch,
-               /*@out@*/ const char ** os)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies *arch, *os, rpmGlobalMacroContext, fileSystem, internalState @*/
+static void defaultMachine(const char ** arch,
+               const char ** os)
 {
     static struct utsname un;
     static int gotDefaults = 0;
@@ -1136,7 +1048,6 @@ static void defaultMachine(/*@out@*/ const char ** arch,
         */
        strncpy(un.sysname, "SINIX", sizeof(un.sysname));
 #endif
-       /*@-nullpass@*/
        if (!strcmp(un.sysname, "AIX")) {
            strcpy(un.machine, __power_pc() ? "ppc" : "rs6000");
            sprintf(un.sysname,"aix%s.%s", un.version, un.release);
@@ -1156,7 +1067,7 @@ static void defaultMachine(/*@out@*/ const char ** arch,
                    fd++) {
                      if (!xisdigit(un.release[fd]) && (un.release[fd] != '.')) {
                        un.release[fd] = 0;
-                       /*@innerbreak@*/ break;
+                       break;
                      }
                    }
                    sprintf(un.sysname,"sunos%s",un.release);
@@ -1193,7 +1104,6 @@ static void defaultMachine(/*@out@*/ const char ** arch,
            char * prelid = NULL;
            FD_t fd = Fopen("/etc/.relid", "r.fdio");
            int gotit = 0;
-           /*@-branchstate@*/
            if (fd != NULL && !Ferror(fd)) {
                chptr = xcalloc(1, 256);
                {   int irelid = Fread(chptr, sizeof(*chptr), 256, fd);
@@ -1209,13 +1119,11 @@ static void defaultMachine(/*@out@*/ const char ** arch,
                }
                chptr = _free (chptr);
            }
-           /*@=branchstate@*/
            if (!gotit) /* parsing /etc/.relid file failed? */
                strcpy(un.sysname,"ncr-sysv4");
            /* wrong, just for now, find out how to look for i586 later*/
            strcpy(un.machine,"i486");
        }
-       /*@=nullpass@*/
 #endif /* __linux__ */
 
        /* get rid of the hyphens in the sysname */
@@ -1356,9 +1264,8 @@ static void defaultMachine(/*@out@*/ const char ** arch,
     if (os) *os = un.sysname;
 }
 
-static /*@observer@*/ /*@null@*/
-const char * rpmGetVarArch(int var, /*@null@*/ const char * arch)
-       /*@*/
+static
+const char * rpmGetVarArch(int var, const char * arch)
 {
     const struct rpmvarValue * next;
 
@@ -1384,8 +1291,7 @@ const char *rpmGetVar(int var)
 }
 
 /* this doesn't free the passed pointer! */
-static void freeRpmVar(/*@only@*/ struct rpmvarValue * orig)
-       /*@modifies *orig @*/
+static void freeRpmVar(struct rpmvarValue * orig)
 {
     struct rpmvarValue * next, * var = orig;
 
@@ -1394,20 +1300,14 @@ static void freeRpmVar(/*@only@*/ struct rpmvarValue * orig)
        var->arch = _free(var->arch);
        var->value = _free(var->value);
 
-       /*@-branchstate@*/
        if (var != orig) var = _free(var);
-       /*@=branchstate@*/
        var = next;
     }
 }
 
 void rpmSetVar(int var, const char * val)
-       /*@globals values @*/
-       /*@modifies values @*/
 {
-    /*@-immediatetrans@*/
     freeRpmVar(&values[var]);
-    /*@=immediatetrans@*/
     values[var].value = (val ? xstrdup(val) : NULL);
 }
 
@@ -1428,9 +1328,7 @@ static void rpmSetVarArch(int var, const char * val, const char * arch)
            }
        }
 
-       /*@-nullpass@*/ /* LCL: arch != NULL here. */
        if (next->arch && arch && !strcmp(next->arch, arch)) {
-       /*@=nullpass@*/
            next->value = _free(next->value);
            next->arch = _free(next->arch);
        } else if (next->arch || arch) {
@@ -1448,8 +1346,6 @@ static void rpmSetVarArch(int var, const char * val, const char * arch)
 }
 
 void rpmSetTables(int archTable, int osTable)
-       /*@globals currTables @*/
-       /*@modifies currTables @*/
 {
     const char * arch, * os;
 
@@ -1482,8 +1378,6 @@ void rpmGetMachine(const char ** arch, const char ** os)
 }
 
 void rpmSetMachine(const char * arch, const char * os)
-       /*@globals current @*/
-       /*@modifies current @*/
 {
     const char * host_cpu, * host_os;
 
@@ -1533,16 +1427,14 @@ void rpmSetMachine(const char * arch, const char * os)
 }
 
 static void rebuildCompatTables(int type, const char * name)
-       /*@*/
 {
     machFindEquivs(&tables[currTables[type]].cache,
                   &tables[currTables[type]].equiv,
                   name);
 }
 
-static void getMachineInfo(int type, /*@null@*/ /*@out@*/ const char ** name,
-                       /*@null@*/ /*@out@*/int * num)
-       /*@modifies *name, *num @*/
+static void getMachineInfo(int type, const char ** name,
+                       int * num)
 {
     canonEntry canon;
     int which = currTables[type];
@@ -1590,7 +1482,6 @@ static void rpmRebuildTargetVars(const char ** target, const char ** canontarget
     rpmSetTables(RPM_MACHTABLE_INSTARCH, RPM_MACHTABLE_INSTOS);
     rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS);
 
-    /*@-branchstate@*/
     if (target && *target) {
        char *c;
        /* Set arch and os from specified build target */
@@ -1619,7 +1510,6 @@ static void rpmRebuildTargetVars(const char ** target, const char ** canontarget
        rpmGetOsInfo(&o, NULL);
        co = (o) ? xstrdup(o) : NULL;
     }
-    /*@=branchstate@*/
 
     /* If still not set, Set target arch/os from default uname(2) values */
     if (ca == NULL) {
@@ -1664,32 +1554,22 @@ static void rpmRebuildTargetVars(const char ** target, const char ** canontarget
     }
   }
 
-    /*@-branchstate@*/
     if (canontarget)
        *canontarget = ct;
     else
        ct = _free(ct);
-    /*@=branchstate@*/
     ca = _free(ca);
-    /*@-usereleased@*/
     co = _free(co);
-    /*@=usereleased@*/
 }
 
 void rpmFreeRpmrc(void)
-       /*@globals current, tables, values, defaultsInitialized,
-               platpat, nplatpat @*/
-       /*@modifies current, tables, values, defaultsInitialized,
-               platpat, nplatpat @*/
 {
     int i, j, k;
 
-/*@-onlyunqglobaltrans -unqualifiedtrans @*/
     if (platpat)
     for (i = 0; i < nplatpat; i++)
        platpat[i] = _free(platpat[i]);
     platpat = _free(platpat);
-/*@-onlyunqglobaltrans =unqualifiedtrans @*/
     nplatpat = 0;
 
     for (i = 0; i < RPM_MACHTABLE_COUNT; i++) {
@@ -1706,7 +1586,7 @@ void rpmFreeRpmrc(void)
                machCacheEntry e;
                e = t->cache.cache + j;
                if (e == NULL)
-                   /*@innercontinue@*/ continue;
+                   continue;
                e->name = _free(e->name);
                if (e->equivs) {
                    for (k = 0; k < e->count; k++)
@@ -1736,7 +1616,7 @@ void rpmFreeRpmrc(void)
     }
 
     for (i = 0; i < RPMVAR_NUM; i++) {
-       /*@only@*/ /*@null@*/ struct rpmvarValue * vp;
+       struct rpmvarValue * vp;
        while ((vp = values[i].next) != NULL) {
            values[i].next = vp->next;
            vp->value = _free(vp->value);
@@ -1749,9 +1629,8 @@ void rpmFreeRpmrc(void)
     current[OS] = _free(current[OS]);
     current[ARCH] = _free(current[ARCH]);
     defaultsInitialized = 0;
-/*@-globstate -nullstate@*/ /* FIX: platpat/current may be NULL */
+/* FIX: platpat/current may be NULL */
     return;
-/*@=globstate =nullstate@*/
 }
 
 /** \ingroup rpmrc
@@ -1759,11 +1638,7 @@ void rpmFreeRpmrc(void)
  * @param rcfiles      colon separated files to read (NULL uses default)
  * @return             0 on succes
  */
-static int rpmReadRC(/*@null@*/ const char * rcfiles)
-       /*@globals defaultsInitialized, rpmGlobalMacroContext,
-               rpmCLIMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies defaultsInitialized, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
+static int rpmReadRC(const char * rcfiles)
 {
     char *myrcfiles, *r, *re;
     int rc;
@@ -1785,7 +1660,7 @@ static int rpmReadRC(/*@null@*/ const char * rcfiles)
        /* Get pointer to rest of files */
        for (re = r; (re = strchr(re, ':')) != NULL; re++) {
            if (!(re[1] == '/' && re[2] == '/'))
-               /*@innerbreak@*/ break;
+               break;
        }
        if (re && *re == ':')
            *re++ = '\0';
@@ -1844,7 +1719,7 @@ int rpmReadConfigFiles(const char * file, const char * target)
 {
 
     /* Preset target macros */
-    /*@-nullstate@*/   /* FIX: target can be NULL */
+       /* FIX: target can be NULL */
     rpmRebuildTargetVars(&target, NULL);
 
     /* Read the files */
@@ -1858,7 +1733,6 @@ int rpmReadConfigFiles(const char * file, const char * target)
 
     /* Reset target macros */
     rpmRebuildTargetVars(&target, NULL);
-    /*@=nullstate@*/
 
     /* Finally set target platform */
     {  const char *cpu = rpmExpand("%{_target_cpu}", NULL);
@@ -1934,4 +1808,3 @@ int rpmShowRC(FILE * fp)
 
     return 0;
 }
-/*@=bounds@*/
index acf3ef1..1129105 100644 (file)
 
 #include "debug.h"
 
-/*@unchecked@*/
 int _rpmte_debug = 0;
 
-/*@access alKey @*/
-/*@access rpmtsi @*/
 
 void rpmteCleanDS(rpmte te)
 {
@@ -36,8 +33,6 @@ void rpmteCleanDS(rpmte te)
  * @param p            transaction element
  */
 static void delTE(rpmte p)
-       /*@globals fileSystem @*/
-       /*@modifies p, fileSystem @*/
 {
     rpmRelocation * r;
 
@@ -65,12 +60,9 @@ static void delTE(rpmte p)
 
     p->h = headerFree(p->h);
 
-/*@-boundswrite@*/
     memset(p, 0, sizeof(*p));  /* XXX trash and burn */
-/*@=boundswrite@*/
-    /*@-nullstate@*/ /* FIX: p->{NEVR,name} annotations */
+    /* FIX: p->{NEVR,name} annotations */
     return;
-    /*@=nullstate@*/
 }
 
 /**
@@ -81,13 +73,9 @@ static void delTE(rpmte p)
  * @param key          (TR_ADDED) package retrieval key (e.g. file name)
  * @param relocs       (TR_ADDED) package file relocations
  */
-/*@-bounds@*/
 static void addTE(rpmts ts, rpmte p, Header h,
-               /*@dependent@*/ /*@null@*/ fnpyKey key,
-               /*@null@*/ rpmRelocation * relocs)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, p, h,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
+               fnpyKey key,
+               rpmRelocation * relocs)
 {
     int scareMem = 0;
     HGE_t hge = (HGE_t)headerGetEntryMinMemory;
@@ -146,13 +134,11 @@ static void addTE(rpmts ts, rpmte p, Header h,
 
     ep = NULL;
     xx = hge(h, RPMTAG_EPOCH, NULL, (void **)&ep, NULL);
-/*@-branchstate@*/
     if (ep) {
        p->epoch = xmalloc(20);
        sprintf(p->epoch, "%d", *ep);
     } else
        p->epoch = NULL;
-/*@=branchstate@*/
 
     p->nrelocs = 0;
     p->relocs = NULL;
@@ -190,11 +176,8 @@ static void addTE(rpmts ts, rpmte p, Header h,
 
     rpmteColorDS(p, RPMTAG_PROVIDENAME);
     rpmteColorDS(p, RPMTAG_REQUIRENAME);
-/*@-compdef@*/
     return;
-/*@=compdef@*/
 }
-/*@=bounds@*/
 
 rpmte rpmteFree(rpmte te)
 {
@@ -392,14 +375,10 @@ rpmte rpmteParent(rpmte te)
 rpmte rpmteSetParent(rpmte te, rpmte pte)
 {
     rpmte opte = NULL;
-/*@-branchstate@*/
     if (te != NULL) {
        opte = te->parent;
-       /*@-assignexpose -temptrans@*/
        te->parent = pte;
-       /*@=assignexpose =temptrans@*/
     }
-/*@=branchstate@*/
     return opte;
 }
 
@@ -420,9 +399,7 @@ int rpmteSetDegree(rpmte te, int ndegree)
 
 tsortInfo rpmteTSI(rpmte te)
 {
-    /*@-compdef -retalias -retexpose -usereleased @*/
     return te->tsi;
-    /*@=compdef =retalias =retexpose =usereleased @*/
 }
 
 void rpmteFreeTSI(rpmte te)
@@ -438,9 +415,8 @@ void rpmteFreeTSI(rpmte te)
        }
        te->tsi = _free(te->tsi);
     }
-    /*@-nullstate@*/ /* FIX: te->tsi is NULL */
+    /* FIX: te->tsi is NULL */
     return;
-    /*@=nullstate@*/
 }
 
 void rpmteNewTSI(rpmte te)
@@ -489,9 +465,7 @@ const char * rpmteNEVRA(rpmte te)
 
 FD_t rpmteFd(rpmte te)
 {
-    /*@-compdef -refcounttrans -retalias -retexpose -usereleased @*/
     return (te != NULL ? te->fd : NULL);
-    /*@=compdef =refcounttrans =retalias =retexpose =usereleased @*/
 }
 
 fnpyKey rpmteKey(rpmte te)
@@ -501,7 +475,6 @@ fnpyKey rpmteKey(rpmte te)
 
 rpmds rpmteDS(rpmte te, rpmTag tag)
 {
-    /*@-compdef -refcounttrans -retalias -retexpose -usereleased @*/
     if (te == NULL)
        return NULL;
 
@@ -521,12 +494,10 @@ rpmds rpmteDS(rpmte te, rpmTag tag)
        return te->obsoletes;
     else
        return NULL;
-    /*@=compdef =refcounttrans =retalias =retexpose =usereleased @*/
 }
 
 rpmfi rpmteFI(rpmte te, rpmTag tag)
 {
-    /*@-compdef -refcounttrans -retalias -retexpose -usereleased @*/
     if (te == NULL)
        return NULL;
 
@@ -534,7 +505,6 @@ rpmfi rpmteFI(rpmte te, rpmTag tag)
        return te->fi;
     else
        return NULL;
-    /*@=compdef =refcounttrans =retalias =retexpose =usereleased @*/
 }
 
 void rpmteColorDS(rpmte te, rpmTag tag)
@@ -558,7 +528,7 @@ void rpmteColorDS(rpmte te, rpmTag tag)
     switch (tag) {
     default:
        return;
-       /*@notreached@*/ break;
+       break;
     case RPMTAG_PROVIDENAME:
        deptype = 'P';
        break;
@@ -584,7 +554,7 @@ void rpmteColorDS(rpmte te, rpmTag tag)
            ix = *ddict++;
            mydt = ((ix >> 24) & 0xff);
            if (mydt != deptype)
-               /*@innercontinue@*/ continue;
+               continue;
            ix &= 0x00ffffff;
 assert (ix < Count);
            colors[ix] |= val;
@@ -610,19 +580,15 @@ int rpmtsiOc(rpmtsi tsi)
     return tsi->ocsave;
 }
 
-rpmtsi XrpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi,
+rpmtsi XrpmtsiFree(rpmtsi tsi,
                const char * fn, unsigned int ln)
 {
     /* XXX watchout: a funky recursion segfaults here iff nrefs is wrong. */
-/*@-internalglobs@*/
     if (tsi)
        tsi->ts = rpmtsFree(tsi->ts);
-/*@=internalglobs@*/
 
-/*@-modfilesys@*/
 if (_rpmte_debug)
 fprintf(stderr, "*** tsi %p -- %s:%d\n", tsi, fn, ln);
-/*@=modfilesys@*/
     return _free(tsi);
 }
 
@@ -635,10 +601,8 @@ rpmtsi XrpmtsiInit(rpmts ts, const char * fn, unsigned int ln)
     tsi->reverse = ((rpmtsFlags(ts) & RPMTRANS_FLAG_REVERSE) ? 1 : 0);
     tsi->oc = (tsi->reverse ? (rpmtsNElements(ts) - 1) : 0);
     tsi->ocsave = tsi->oc;
-/*@-modfilesys@*/
 if (_rpmte_debug)
 fprintf(stderr, "*** tsi %p ++ %s:%d\n", tsi, fn, ln);
-/*@=modfilesys@*/
     return tsi;
 }
 
@@ -647,9 +611,8 @@ fprintf(stderr, "*** tsi %p ++ %s:%d\n", tsi, fn, ln);
  * @param tsi          transaction element iterator
  * @return             transaction element, NULL on termination
  */
-static /*@null@*/ /*@dependent@*/
+static
 rpmte rpmtsiNextElement(rpmtsi tsi)
-       /*@modifies tsi @*/
 {
     rpmte te = NULL;
     int oc = -1;
@@ -663,10 +626,8 @@ rpmte rpmtsiNextElement(rpmtsi tsi)
        if (tsi->oc < rpmtsNElements(tsi->ts))  oc = tsi->oc++;
     }
     tsi->ocsave = oc;
-/*@-branchstate@*/
     if (oc != -1)
        te = rpmtsElement(tsi->ts, oc);
-/*@=branchstate@*/
     return te;
 }
 
index 724ab24..7b37fbc 100644 (file)
@@ -8,20 +8,17 @@
 
 /**
  */
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmte_debug;
-/*@=exportlocal@*/
 
 /**
  * Transaction element ordering chain linkage.
  */
-typedef /*@abstract@*/ struct tsortInfo_s *            tsortInfo;
+typedef struct tsortInfo_s *           tsortInfo;
 
 /**
  * Transaction element iterator.
  */
-typedef /*@abstract@*/ struct rpmtsi_s *               rpmtsi;
+typedef struct rpmtsi_s *              rpmtsi;
 
 /** \ingroup rpmte
  * Transaction element type.
@@ -35,23 +32,18 @@ typedef enum rpmElementType_e {
 /** \ingroup rpmte
  * Dependncy ordering information.
  */
-/*@-fielduse@*/        /* LCL: confused by union? */
 struct tsortInfo_s {
     union {
        int     count;
-       /*@exposed@*/ /*@dependent@*/ /*@null@*/
        rpmte   suc;
     } tsi_u;
 #define        tsi_count       tsi_u.count
 #define        tsi_suc         tsi_u.suc
-/*@owned@*/ /*@null@*/
     struct tsortInfo_s * tsi_next;
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
     rpmte tsi_chain;
     int                tsi_reqx;
     int                tsi_qcnt;
 };
-/*@=fielduse@*/
 
 /** \ingroup rpmte
  * A single package instance to be installed/removed atomically.
@@ -59,23 +51,14 @@ struct tsortInfo_s {
 struct rpmte_s {
     rpmElementType type;       /*!< Package disposition (installed/removed). */
 
-/*@refcounted@*/ /*@relnull@*/
     Header h;                  /*!< Package header. */
-/*@only@*/
     const char * NEVR;         /*!< Package name-version-release. */
-/*@only@*/
     const char * NEVRA;                /*!< Package name-version-release.arch. */
-/*@owned@*/
     const char * name;         /*!< Name: */
-/*@only@*/ /*@null@*/
     char * epoch;
-/*@dependent@*/ /*@null@*/
     char * version;            /*!< Version: */
-/*@dependent@*/ /*@null@*/
     char * release;            /*!< Release: */
-/*@only@*/ /*@null@*/
     const char * arch;         /*!< Architecture hint. */
-/*@only@*/ /*@null@*/
     const char * os;           /*!< Operating system hint. */
     int archScore;             /*!< (TR_ADDED) Arch score. */
     int osScore;               /*!< (TR_ADDED) Os score. */
@@ -88,45 +71,31 @@ struct rpmte_s {
     int depth;                 /*!< Depth in dependency tree. */
     int breadth;               /*!< Breadth in dependency tree. */
     unsigned int db_instance;   /*!< Database Instance after add */
-/*@owned@*/
     tsortInfo tsi;             /*!< Dependency ordering chains. */
 
-/*@refcounted@*/ /*@null@*/
     rpmds this;                        /*!< This package's provided NEVR. */
-/*@refcounted@*/ /*@null@*/
     rpmds provides;            /*!< Provides: dependencies. */
-/*@refcounted@*/ /*@null@*/
     rpmds requires;            /*!< Requires: dependencies. */
-/*@refcounted@*/ /*@null@*/
     rpmds conflicts;           /*!< Conflicts: dependencies. */
-/*@refcounted@*/ /*@null@*/
     rpmds obsoletes;           /*!< Obsoletes: dependencies. */
-/*@refcounted@*/ /*@null@*/
     rpmfi fi;                  /*!< File information. */
 
     uint_32 color;             /*!< Color bit(s) from package dependencies. */
     uint_32 pkgFileSize;       /*!< No. of bytes in package file (approx). */
 
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
     fnpyKey key;               /*!< (TR_ADDED) Retrieval key. */
-/*@owned@*/ /*@null@*/
     rpmRelocation * relocs;    /*!< (TR_ADDED) Payload file relocations. */
     int nrelocs;               /*!< (TR_ADDED) No. of relocations. */
     int autorelocatex;         /*!< (TR_ADDED) Auto relocation entry index. */
-/*@refcounted@*/ /*@null@*/    
     FD_t fd;                   /*!< (TR_ADDED) Payload file descriptor. */
 
-/*@-fielduse@*/        /* LCL: confused by union? */
     union {
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
        alKey addedKey;
        struct {
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
            alKey dependsOnKey;
            int dboffset;
        } removed;
     } u;
-/*@=fielduse@*/
 
 };
 
@@ -134,7 +103,6 @@ struct rpmte_s {
  * Iterator across transaction elements, forward on install, backward on erase.
  */
 struct rpmtsi_s {
-/*@refcounted@*/
     rpmts ts;          /*!< transaction set. */
     int reverse;       /*!< reversed traversal? */
     int ocsave;                /*!< last returned iterator index. */
@@ -152,10 +120,7 @@ extern "C" {
  * @param te           transaction element
  * @return             NULL always
  */
-/*@null@*/
-rpmte rpmteFree(/*@only@*/ /*@null@*/ rpmte te)
-       /*@globals fileSystem @*/
-       /*@modifies te, fileSystem @*/;
+rpmte rpmteFree(rpmte te);
 
 /**
  * Create a transaction element.
@@ -168,22 +133,18 @@ rpmte rpmteFree(/*@only@*/ /*@null@*/ rpmte te)
  * @param pkgKey       associated added package (if any)
  * @return             new transaction element
  */
-/*@only@*/ /*@null@*/
 rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type,
-               /*@exposed@*/ /*@dependent@*/ /*@null@*/ fnpyKey key,
-               /*@null@*/ rpmRelocation * relocs,
+               fnpyKey key,
+               rpmRelocation * relocs,
                int dboffset,
-               /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey pkgKey)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
+               alKey pkgKey);
 
 /**
  * Retrieve header from transaction element.
  * @param te           transaction element
  * @return             header
  */
-extern Header rpmteHeader(rpmte te)
-       /*@modifies te @*/;
+extern Header rpmteHeader(rpmte te);
 
 /**
  * Save header into transaction element.
@@ -191,86 +152,70 @@ extern Header rpmteHeader(rpmte te)
  * @param h            header
  * @return             NULL always
  */
-extern Header rpmteSetHeader(rpmte te, Header h)
-       /*@modifies te, h @*/;
+extern Header rpmteSetHeader(rpmte te, Header h);
 
 /**
  * Retrieve type of transaction element.
  * @param te           transaction element
  * @return             type
  */
-rpmElementType rpmteType(rpmte te)
-       /*@*/;
+rpmElementType rpmteType(rpmte te);
 
 /**
  * Retrieve name string of transaction element.
  * @param te           transaction element
  * @return             name string
  */
-/*@observer@*/
-extern const char * rpmteN(rpmte te)
-       /*@*/;
+extern const char * rpmteN(rpmte te);
 
 /**
  * Retrieve epoch string of transaction element.
  * @param te           transaction element
  * @return             epoch string
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmteE(rpmte te)
-       /*@*/;
+extern const char * rpmteE(rpmte te);
 
 /**
  * Retrieve version string of transaction element.
  * @param te           transaction element
  * @return             version string
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmteV(rpmte te)
-       /*@*/;
+extern const char * rpmteV(rpmte te);
 
 /**
  * Retrieve release string of transaction element.
  * @param te           transaction element
  * @return             release string
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmteR(rpmte te)
-       /*@*/;
+extern const char * rpmteR(rpmte te);
 
 /**
  * Retrieve arch string of transaction element.
  * @param te           transaction element
  * @return             arch string
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmteA(rpmte te)
-       /*@*/;
+extern const char * rpmteA(rpmte te);
 
 /**
  * Retrieve os string of transaction element.
  * @param te           transaction element
  * @return             os string
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmteO(rpmte te)
-       /*@*/;
+extern const char * rpmteO(rpmte te);
 
 /**
  * Retrieve isSource attribute of transaction element.
  * @param te           transaction element
  * @return             isSource attribute
  */
-extern int rpmteIsSource(rpmte te)
-       /*@*/;
+extern int rpmteIsSource(rpmte te);
 
 /**
  * Retrieve color bits of transaction element.
  * @param te           transaction element
  * @return             color bits
  */
-uint_32 rpmteColor(rpmte te)
-       /*@*/;
+uint_32 rpmteColor(rpmte te);
 
 /**
  * Set color bits of transaction element.
@@ -278,16 +223,14 @@ uint_32 rpmteColor(rpmte te)
  * @param color                new color bits
  * @return             previous color bits
  */
-uint_32 rpmteSetColor(rpmte te, uint_32 color)
-       /*@modifies te @*/;
+uint_32 rpmteSetColor(rpmte te, uint_32 color);
 
 /**
  * Retrieve last instance installed to the database.
  * @param te           transaction element
  * @return             last install instance.
  */
-unsigned int rpmteDBInstance(rpmte te)
-       /*@*/;
+unsigned int rpmteDBInstance(rpmte te);
 
 /**
  * Set last instance installed to the database.
@@ -295,8 +238,7 @@ unsigned int rpmteDBInstance(rpmte te)
  * @param instance     Database instance of last install element.
  * @return             last install instance.
  */
-void rpmteSetDBInstance(rpmte te, unsigned int instance)
-       /*@modifies te @*/;
+void rpmteSetDBInstance(rpmte te, unsigned int instance);
 
 /**
  * Retrieve size in bytes of package file.
@@ -304,16 +246,14 @@ void rpmteSetDBInstance(rpmte te, unsigned int instance)
  * @param te           transaction element
  * @return             size in bytes of package file.
  */
-uint_32 rpmtePkgFileSize(rpmte te)
-       /*@*/;
+uint_32 rpmtePkgFileSize(rpmte te);
 
 /**
  * Retrieve dependency tree depth of transaction element.
  * @param te           transaction element
  * @return             depth
  */
-int rpmteDepth(rpmte te)
-       /*@*/;
+int rpmteDepth(rpmte te);
 
 /**
  * Set dependency tree depth of transaction element.
@@ -321,16 +261,14 @@ int rpmteDepth(rpmte te)
  * @param ndepth       new depth
  * @return             previous depth
  */
-int rpmteSetDepth(rpmte te, int ndepth)
-       /*@modifies te @*/;
+int rpmteSetDepth(rpmte te, int ndepth);
 
 /**
  * Retrieve dependency tree breadth of transaction element.
  * @param te           transaction element
  * @return             breadth
  */
-int rpmteBreadth(rpmte te)
-       /*@*/;
+int rpmteBreadth(rpmte te);
 
 /**
  * Set dependency tree breadth of transaction element.
@@ -338,16 +276,14 @@ int rpmteBreadth(rpmte te)
  * @param nbreadth     new breadth
  * @return             previous breadth
  */
-int rpmteSetBreadth(rpmte te, int nbreadth)
-       /*@modifies te @*/;
+int rpmteSetBreadth(rpmte te, int nbreadth);
 
 /**
  * Retrieve tsort no. of predecessors of transaction element.
  * @param te           transaction element
  * @return             no. of predecessors
  */
-int rpmteNpreds(rpmte te)
-       /*@*/;
+int rpmteNpreds(rpmte te);
 
 /**
  * Set tsort no. of predecessors of transaction element.
@@ -355,16 +291,14 @@ int rpmteNpreds(rpmte te)
  * @param npreds       new no. of predecessors
  * @return             previous no. of predecessors
  */
-int rpmteSetNpreds(rpmte te, int npreds)
-       /*@modifies te @*/;
+int rpmteSetNpreds(rpmte te, int npreds);
 
 /**
  * Retrieve tree index of transaction element.
  * @param te           transaction element
  * @return             tree index
  */
-int rpmteTree(rpmte te)
-       /*@*/;
+int rpmteTree(rpmte te);
 
 /**
  * Set tree index of transaction element.
@@ -372,17 +306,14 @@ int rpmteTree(rpmte te)
  * @param ntree                new tree index
  * @return             previous tree index
  */
-int rpmteSetTree(rpmte te, int ntree)
-       /*@modifies te @*/;
+int rpmteSetTree(rpmte te, int ntree);
 
 /**
  * Retrieve parent transaction element.
  * @param te           transaction element
  * @return             parent transaction element
  */
-/*@observer@*/ /*@unused@*/
-rpmte rpmteParent(rpmte te)
-       /*@*/;
+rpmte rpmteParent(rpmte te);
 
 /**
  * Set parent transaction element.
@@ -390,17 +321,14 @@ rpmte rpmteParent(rpmte te)
  * @param pte          new parent transaction element
  * @return             previous parent transaction element
  */
-/*@null@*/
-rpmte rpmteSetParent(rpmte te, rpmte pte)
-       /*@modifies te @*/;
+rpmte rpmteSetParent(rpmte te, rpmte pte);
 
 /**
  * Retrieve number of children of transaction element.
  * @param te           transaction element
  * @return             tree index
  */
-int rpmteDegree(rpmte te)
-       /*@*/;
+int rpmteDegree(rpmte te);
 
 /**
  * Set number of children of transaction element.
@@ -408,47 +336,39 @@ int rpmteDegree(rpmte te)
  * @param ndegree      new number of children
  * @return             previous number of children
  */
-int rpmteSetDegree(rpmte te, int ndegree)
-       /*@modifies te @*/;
+int rpmteSetDegree(rpmte te, int ndegree);
 
 /**
  * Retrieve tsort info for transaction element.
  * @param te           transaction element
  * @return             tsort info
  */
-tsortInfo rpmteTSI(rpmte te)
-       /*@*/;
+tsortInfo rpmteTSI(rpmte te);
 
 /**
  * Destroy tsort info of transaction element.
  * @param te           transaction element
  */
-void rpmteFreeTSI(rpmte te)
-       /*@modifies te @*/;
+void rpmteFreeTSI(rpmte te);
 
 /**
  * Initialize tsort info of transaction element.
  * @param te           transaction element
  */
-void rpmteNewTSI(rpmte te)
-       /*@modifies te @*/;
+void rpmteNewTSI(rpmte te);
 
 /**
  * Destroy dependency set info of transaction element.
  * @param te           transaction element
  */
-/*@unused@*/
-void rpmteCleanDS(rpmte te)
-       /*@modifies te @*/;
+void rpmteCleanDS(rpmte te);
 
 /**
  * Retrieve pkgKey of TR_ADDED transaction element.
  * @param te           transaction element
  * @return             pkgKey
  */
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
-alKey rpmteAddedKey(rpmte te)
-       /*@*/;
+alKey rpmteAddedKey(rpmte te);
 
 /**
  * Set pkgKey of TR_ADDED transaction element.
@@ -456,64 +376,50 @@ alKey rpmteAddedKey(rpmte te)
  * @param npkgKey      new pkgKey
  * @return             previous pkgKey
  */
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
 alKey rpmteSetAddedKey(rpmte te,
-               /*@exposed@*/ /*@dependent@*/ /*@null@*/ alKey npkgKey)
-       /*@modifies te @*/;
+               alKey npkgKey);
 
 /**
  * Retrieve dependent pkgKey of TR_REMOVED transaction element.
  * @param te           transaction element
  * @return             dependent pkgKey
  */
-/*@exposed@*/ /*@dependent@*/ /*@null@*/
-alKey rpmteDependsOnKey(rpmte te)
-       /*@*/;
+alKey rpmteDependsOnKey(rpmte te);
 
 /**
  * Retrieve rpmdb instance of TR_REMOVED transaction element.
  * @param te           transaction element
  * @return             rpmdb instance
  */
-int rpmteDBOffset(rpmte te)
-       /*@*/;
+int rpmteDBOffset(rpmte te);
 
 /**
  * Retrieve name-version-release string from transaction element.
  * @param te           transaction element
  * @return             name-version-release string
  */
-/*@observer@*/
-extern const char * rpmteNEVR(rpmte te)
-       /*@*/;
+extern const char * rpmteNEVR(rpmte te);
 
 /**
  * Retrieve name-version-release.arch string from transaction element.
  * @param te           transaction element
  * @return             name-version-release.arch string
  */
-/*@-exportlocal@*/
-/*@observer@*/
-extern const char * rpmteNEVRA(rpmte te)
-       /*@*/;
-/*@=exportlocal@*/
+extern const char * rpmteNEVRA(rpmte te);
 
 /**
  * Retrieve file handle from transaction element.
  * @param te           transaction element
  * @return             file handle
  */
-FD_t rpmteFd(rpmte te)
-       /*@*/;
+FD_t rpmteFd(rpmte te);
 
 /**
  * Retrieve key from transaction element.
  * @param te           transaction element
  * @return             key
  */
-/*@exposed@*/
-fnpyKey rpmteKey(rpmte te)
-       /*@*/;
+fnpyKey rpmteKey(rpmte te);
 
 /**
  * Retrieve dependency tag set from transaction element.
@@ -521,8 +427,7 @@ fnpyKey rpmteKey(rpmte te)
  * @param tag          dependency tag
  * @return             dependency tag set
  */
-rpmds rpmteDS(rpmte te, rpmTag tag)
-       /*@*/;
+rpmds rpmteDS(rpmte te, rpmTag tag);
 
 /**
  * Retrieve file info tag set from transaction element.
@@ -530,36 +435,28 @@ rpmds rpmteDS(rpmte te, rpmTag tag)
  * @param tag          file info tag (RPMTAG_BASENAMES)
  * @return             file info tag set
  */
-rpmfi rpmteFI(rpmte te, rpmTag tag)
-       /*@*/;
+rpmfi rpmteFI(rpmte te, rpmTag tag);
 
 /**
  * Calculate transaction element dependency colors/refs from file info.
  * @param te           transaction element
  * @param tag          dependency tag (RPMTAG_PROVIDENAME, RPMTAG_REQUIRENAME)
  */
-/*@-exportlocal@*/
-void rpmteColorDS(rpmte te, rpmTag tag)
-        /*@modifies te @*/;
-/*@=exportlocal@*/
+void rpmteColorDS(rpmte te, rpmTag tag);
 
 /**
  * Return transaction element index.
  * @param tsi          transaction element iterator
  * @return             transaction element index
  */
-int rpmtsiOc(rpmtsi tsi)
-       /*@*/;
+int rpmtsiOc(rpmtsi tsi);
 
 /**
  * Destroy transaction element iterator.
  * @param tsi          transaction element iterator
  * @return             NULL always
  */
-/*@unused@*/ /*@null@*/
-rpmtsi rpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi)
-       /*@globals fileSystem @*/
-       /*@modifies fileSystem @*/;
+rpmtsi rpmtsiFree(rpmtsi tsi);
 
 /**
  * Destroy transaction element iterator.
@@ -568,11 +465,8 @@ rpmtsi rpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi)
  * @param ln
  * @return             NULL always
  */
-/*@null@*/
-rpmtsi XrpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi,
-               const char * fn, unsigned int ln)
-       /*@globals fileSystem @*/
-       /*@modifies fileSystem @*/;
+rpmtsi XrpmtsiFree(rpmtsi tsi,
+               const char * fn, unsigned int ln);
 #define        rpmtsiFree(_tsi)        XrpmtsiFree(_tsi, __FILE__, __LINE__)
 
 /**
@@ -580,9 +474,7 @@ rpmtsi XrpmtsiFree(/*@only@*//*@null@*/ rpmtsi tsi,
  * @param ts           transaction set
  * @return             transaction element iterator
  */
-/*@unused@*/ /*@only@*/
-rpmtsi rpmtsiInit(rpmts ts)
-       /*@modifies ts @*/;
+rpmtsi rpmtsiInit(rpmts ts);
 
 /**
  * Create transaction element iterator.
@@ -591,10 +483,8 @@ rpmtsi rpmtsiInit(rpmts ts)
  * @param ln
  * @return             transaction element iterator
  */
-/*@unused@*/ /*@only@*/
 rpmtsi XrpmtsiInit(rpmts ts,
-               const char * fn, unsigned int ln)
-       /*@modifies ts @*/;
+               const char * fn, unsigned int ln);
 #define        rpmtsiInit(_ts)         XrpmtsiInit(_ts, __FILE__, __LINE__)
 
 /**
@@ -603,9 +493,7 @@ rpmtsi XrpmtsiInit(rpmts ts,
  * @param type         transaction element type selector (0 for any)
  * @return             next transaction element of type, NULL on termination
  */
-/*@dependent@*/ /*@null@*/
-rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type)
-        /*@modifies tsi @*/;
+rpmte rpmtsiNext(rpmtsi tsi, rpmElementType type);
 
 #ifdef __cplusplus
 }
index bebbec9..d2edc7b 100644 (file)
@@ -24,7 +24,6 @@
 /* XXX FIXME: merge with existing (broken?) tests in system.h */
 /* portability fiddles */
 #if STATFS_IN_SYS_STATVFS
-/*@-incondefs@*/
 #include <sys/statvfs.h>
 
 #else
 
 #include "debug.h"
 
-/*@access rpmdb @*/            /* XXX db->db_chrootDone, NULL */
-
-/*@access rpmps @*/
-/*@access rpmDiskSpaceInfo @*/
-/*@access rpmte @*/
-/*@access rpmtsi @*/
-/*@access fnpyKey @*/
-/*@access pgpDig @*/
-/*@access pgpDigParams @*/
-
-/*@unchecked@*/
 int _rpmts_debug = 0;
 
-/*@unchecked@*/
 int _rpmts_stats = 0;
 
 char * hGetNEVR(Header h, const char ** np)
@@ -66,7 +53,6 @@ char * hGetNEVR(Header h, const char ** np)
 
     (void) headerNVR(h, &n, &v, &r);
     NVR = t = xcalloc(1, strlen(n) + strlen(v) + strlen(r) + sizeof("--"));
-/*@-boundswrite@*/
     t = stpcpy(t, n);
     t = stpcpy(t, "-");
     t = stpcpy(t, v);
@@ -74,7 +60,6 @@ char * hGetNEVR(Header h, const char ** np)
     t = stpcpy(t, r);
     if (np)
        *np = n;
-/*@=boundswrite@*/
     return NVR;
 }
 
@@ -87,7 +72,6 @@ char * hGetNEVRA(Header h, const char ** np)
     (void) headerNVR(h, &n, &v, &r);
     xx = headerGetEntry(h, RPMTAG_ARCH, NULL, (void **) &a, NULL);
     NVRA = t = xcalloc(1, strlen(n) + strlen(v) + strlen(r) + strlen(a) + sizeof("--."));
-/*@-boundswrite@*/
     t = stpcpy(t, n);
     t = stpcpy(t, "-");
     t = stpcpy(t, v);
@@ -97,7 +81,6 @@ char * hGetNEVRA(Header h, const char ** np)
     t = stpcpy(t, a);
     if (np)
        *np = n;
-/*@=boundswrite@*/
     return NVRA;
 }
 
@@ -114,10 +97,8 @@ uint_32 hGetColor(Header h)
     if (hge(h, RPMTAG_FILECOLORS, NULL, (void **)&fcolors, &ncolors)
      && fcolors != NULL && ncolors > 0)
     {
-/*@-boundsread@*/
        for (i = 0; i < ncolors; i++)
            hcolor |= fcolors[i];
-/*@=boundsread@*/
     }
     hcolor &= 0x0f;
 
@@ -126,10 +107,8 @@ uint_32 hGetColor(Header h)
 
 rpmts XrpmtsUnlink(rpmts ts, const char * msg, const char * fn, unsigned ln)
 {
-/*@-modfilesys@*/
 if (_rpmts_debug)
 fprintf(stderr, "--> ts %p -- %d %s at %s:%u\n", ts, ts->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
     ts->nrefs--;
     return NULL;
 }
@@ -137,11 +116,9 @@ fprintf(stderr, "--> ts %p -- %d %s at %s:%u\n", ts, ts->nrefs, msg, fn, ln);
 rpmts XrpmtsLink(rpmts ts, const char * msg, const char * fn, unsigned ln)
 {
     ts->nrefs++;
-/*@-modfilesys@*/
 if (_rpmts_debug)
 fprintf(stderr, "--> ts %p ++ %d %s at %s:%u\n", ts, ts->nrefs, msg, fn, ln);
-/*@=modfilesys@*/
-    /*@-refcounttrans@*/ return ts; /*@=refcounttrans@*/
+    return ts;
 }
 
 int rpmtsCloseDB(rpmts ts)
@@ -209,13 +186,9 @@ int rpmtsVerifyDB(rpmts ts)
     return rpmdbVerify(ts->rootDir);
 }
 
-/*@-boundsread@*/
 static int isArch(const char * arch)
-       /*@*/
 {
     const char ** av;
-/*@-nullassign@*/
-    /*@observer@*/
     static const char *arches[] = {
        "i386", "i486", "i586", "i686", "athlon", "pentium3", "pentium4", "x86_64", "amd64", "ia32e",
        "alpha", "alphaev5", "alphaev56", "alphapca56", "alphaev6", "alphaev67",
@@ -233,7 +206,6 @@ static int isArch(const char * arch)
        "noarch",
        NULL,
     };
-/*@=nullassign@*/
 
     for (av = arches; *av != NULL; av++) {
        if (!strcmp(arch, *av))
@@ -241,9 +213,8 @@ static int isArch(const char * arch)
     }
     return 0;
 }
-/*@=boundsread@*/
 
-/*@-compdef@*/ /* keyp might no be defined. */
+/* keyp might no be defined. */
 rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
                        const void * keyp, size_t keylen)
 {
@@ -255,7 +226,6 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
        return NULL;
 
     /* Parse out "N(EVR).A" tokens from a label key. */
-/*@-bounds -branchstate@*/
     if (rpmtag == RPMDBI_LABEL && keyp != NULL) {
        const char * s = keyp;
        const char *se;
@@ -269,7 +239,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
            switch (c) {
            default:
                *t++ = c;
-               /*@switchbreak@*/ break;
+               break;
            case '(':
                /* XXX Fail if nested parens. */
                if (level++ != 0) {
@@ -287,7 +257,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
                    /* No Epoch: found. Convert '(' to '-' and chug. */
                    *t++ = '-';
                }
-               /*@switchbreak@*/ break;
+               break;
            case ')':
                /* XXX Fail if nested parens. */
                if (--level != 0) {
@@ -295,7 +265,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
                    return NULL;
                }
                /* Don't copy trailing ')' */
-               /*@switchbreak@*/ break;
+               break;
            }
        }
        if (level) {
@@ -311,7 +281,6 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
           arch = t;
        }
     }
-/*@=bounds =branchstate@*/
 
     mi = rpmdbInitIterator(ts->rdb, rpmtag, keyp, keylen);
 
@@ -324,7 +293,6 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
        xx = rpmdbSetIteratorRE(mi, RPMTAG_ARCH, RPMMIRE_DEFAULT, arch);
     return mi;
 }
-/*@=compdef@*/
 
 rpmRC rpmtsFindPubkey(rpmts ts)
 {
@@ -372,17 +340,14 @@ fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, p
                continue;
            hx = rpmdbGetIteratorOffset(mi);
            ix = rpmdbGetIteratorFileNum(mi);
-/*@-boundsread@*/
            if (ix >= pc
             || b64decode(pubkeys[ix], (void **) &ts->pkpkt, &ts->pkpktlen))
                ix = -1;
-/*@=boundsread@*/
            pubkeys = headerFreeData(pubkeys, pt);
            break;
        }
        mi = rpmdbFreeIterator(mi);
 
-/*@-branchstate@*/
        if (ix >= 0) {
            char hnum[32];
            sprintf(hnum, "h#%d", hx);
@@ -391,7 +356,6 @@ fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, p
            ts->pkpkt = _free(ts->pkpkt);
            ts->pkpktlen = 0;
        }
-/*@=branchstate@*/
     }
 
     /* Try keyserver lookup. */
@@ -404,7 +368,6 @@ fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, p
            xx = (pgpReadPkts(fn,&ts->pkpkt,&ts->pkpktlen) != PGPARMOR_PUBKEY);
        }
        fn = _free(fn);
-/*@-branchstate@*/
        if (xx) {
            ts->pkpkt = _free(ts->pkpkt);
            ts->pkpktlen = 0;
@@ -412,7 +375,6 @@ fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, p
            /* Save new pubkey in local ts keyring for delayed import. */
            pubkeysource = xstrdup("keyserver");
        }
-/*@=branchstate@*/
     }
 
 #ifdef NOTNOW
@@ -451,9 +413,7 @@ fprintf(stderr, "*** free pkt %p[%d] id %08x %08x\n", ts->pkpkt, ts->pkpktlen, p
        /* XXX Verify any pubkey signatures. */
 
        /* Pubkey packet looks good, save the signer id. */
-/*@-boundsread@*/
        memcpy(ts->pksignid, pubp->signid, sizeof(ts->pksignid));
-/*@=boundsread@*/
 
        if (pubkeysource)
            rpmMessage(RPMMESS_DEBUG, "========== %s pubkey id %08x %08x (%s)\n",
@@ -525,17 +485,13 @@ int rpmtsOpenSDB(rpmts ts, int dbmode)
  * @return             result of comparison
  */
 static int sugcmp(const void * a, const void * b)
-       /*@*/
 {
-/*@-boundsread@*/
     const char * astr = *(const char **)a;
     const char * bstr = *(const char **)b;
-/*@=boundsread@*/
     return strcmp(astr, bstr);
 }
 
-/*@-bounds@*/
-int rpmtsSolve(rpmts ts, rpmds ds, /*@unused@*/ const void * data)
+int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
 {
     const char * errstr;
     const char * str;
@@ -683,11 +639,9 @@ int rpmtsSolve(rpmts ts, rpmds ds, /*@unused@*/ const void * data)
        qsort(ts->suggests, ts->nsuggests, sizeof(*ts->suggests), sugcmp);
 
 exit:
-/*@-nullstate@*/ /* FIX: ts->suggests[] may be NULL */
+/* FIX: ts->suggests[] may be NULL */
     return rc;
-/*@=nullstate@*/
 }
-/*@=bounds@*/
 
 int rpmtsAvailable(rpmts ts, const rpmds ds)
 {
@@ -710,9 +664,8 @@ int rpmtsAvailable(rpmts ts, const rpmds ds)
        ts->suggests[ts->nsuggests] = NULL;
     }
     sugkey = _free(sugkey);
-/*@-nullstate@*/ /* FIX: ts->suggests[] may be NULL */
+/* FIX: ts->suggests[] may be NULL */
     return rc;
-/*@=nullstate@*/
 }
 
 int rpmtsSetSolveCallback(rpmts ts,
@@ -721,14 +674,10 @@ int rpmtsSetSolveCallback(rpmts ts,
 {
     int rc = 0;
 
-/*@-branchstate@*/
     if (ts) {
-/*@-assignexpose -temptrans @*/
        ts->solve = solve;
        ts->solveData = solveData;
-/*@=assignexpose =temptrans @*/
     }
-/*@=branchstate@*/
     return rc;
 }
 
@@ -780,14 +729,10 @@ void rpmtsEmpty(rpmts ts)
     if (ts == NULL)
        return;
 
-/*@-nullstate@*/       /* FIX: partial annotations */
     rpmtsClean(ts);
-/*@=nullstate@*/
 
     for (pi = rpmtsiInit(ts), oc = 0; (p = rpmtsiNext(pi, 0)) != NULL; oc++) {
-/*@-type -unqualifiedtrans @*/
        ts->order[oc] = rpmteFree(ts->order[oc]);
-/*@=type =unqualifiedtrans @*/
     }
     pi = rpmtsiFree(pi);
 
@@ -796,14 +741,10 @@ void rpmtsEmpty(rpmts ts)
     ts->maxDepth = 0;
 
     ts->numRemovedPackages = 0;
-/*@-nullstate@*/       /* FIX: partial annotations */
     return;
-/*@=nullstate@*/
 }
 
-static void rpmtsPrintStat(const char * name, /*@null@*/ struct rpmop_s * op)
-       /*@globals fileSystem @*/
-       /*@modifies fileSystem @*/
+static void rpmtsPrintStat(const char * name, struct rpmop_s * op)
 {
     static unsigned int scale = (1000 * 1000);
     if (op != NULL && op->count > 0)
@@ -814,8 +755,6 @@ static void rpmtsPrintStat(const char * name, /*@null@*/ struct rpmop_s * op)
 }
 
 static void rpmtsPrintStats(rpmts ts)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies fileSystem, internalState @*/
 {
     (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_TOTAL), 0);
 
@@ -846,9 +785,7 @@ rpmts rpmtsFree(rpmts ts)
     if (ts->nrefs > 1)
        return rpmtsUnlink(ts, "tsCreate");
 
-/*@-nullstate@*/       /* FIX: partial annotations */
     rpmtsEmpty(ts);
-/*@=nullstate@*/
 
     (void) rpmtsCloseDB(ts);
 
@@ -868,9 +805,7 @@ rpmts rpmtsFree(rpmts ts)
     ts->rootDir = _free(ts->rootDir);
     ts->currDir = _free(ts->currDir);
 
-/*@-type +voidabstract @*/     /* FIX: double indirection */
     ts->order = _free(ts->order);
-/*@=type =voidabstract @*/
     ts->orderAlloced = 0;
 
     if (ts->pkpkt != NULL)
@@ -882,15 +817,11 @@ rpmts rpmtsFree(rpmts ts)
        rpmtsPrintStats(ts);
 
     /* Free up the memory used by the rpmtsScore */
-/*@-kepttrans -onlytrans @*/
     ts->score = rpmtsScoreFree(ts->score);
-/*@=kepttrans =onlytrans @*/
 
     (void) rpmtsUnlink(ts, "tsCreate");
 
-    /*@-refcounttrans -usereleased @*/
     ts = _free(ts);
-    /*@=refcounttrans =usereleased @*/
 
     return NULL;
 }
@@ -958,7 +889,6 @@ const char * rpmtsRootDir(rpmts ts)
 {
     const char * rootDir = NULL;
 
-/*@-branchstate@*/
     if (ts != NULL && ts->rootDir != NULL) {
        urltype ut = urlPath(ts->rootDir, &rootDir);
        switch (ut) {
@@ -975,7 +905,6 @@ const char * rpmtsRootDir(rpmts ts)
            break;
        }
     }
-/*@=branchstate@*/
     return rootDir;
 }
 
@@ -994,7 +923,6 @@ void rpmtsSetRootDir(rpmts ts, const char * rootDir)
        }
        rootLen = strlen(rootDir);
 
-/*@-branchstate@*/
        /* Make sure that rootDir has trailing / */
        if (!(rootLen && rootDir[rootLen - 1] == '/')) {
            char * t = alloca(rootLen + 2);
@@ -1002,7 +930,6 @@ void rpmtsSetRootDir(rpmts ts, const char * rootDir)
            (void) stpcpy( stpcpy(t, rootDir), "/");
            rootDir = t;
        }
-/*@=branchstate@*/
        ts->rootDir = xstrdup(rootDir);
     }
 }
@@ -1031,9 +958,7 @@ FD_t rpmtsScriptFd(rpmts ts)
     if (ts != NULL) {
        scriptFd = ts->scriptFd;
     }
-/*@-compdef -refcounttrans -usereleased@*/
     return scriptFd;
-/*@=compdef =refcounttrans =usereleased@*/
 }
 
 void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd)
@@ -1044,10 +969,8 @@ void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd)
            ts->scriptFd = fdFree(ts->scriptFd, "rpmtsSetScriptFd");
            ts->scriptFd = NULL;
        }
-/*@+voidabstract@*/
        if (scriptFd != NULL)
            ts->scriptFd = fdLink((void *)scriptFd, "rpmtsSetScriptFd");
-/*@=voidabstract@*/
     }
 }
 
@@ -1132,9 +1055,7 @@ int rpmtsSetSig(rpmts ts,
            ts->sig = headerFreeData(ts->sig, ts->sigtype);
        ts->sigtag = sigtag;
        ts->sigtype = (sig ? sigtype : 0);
-/*@-assignexpose -kepttrans@*/
        ts->sig = sig;
-/*@=assignexpose =kepttrans@*/
        ts->siglen = siglen;
     }
     return 0;
@@ -1142,10 +1063,9 @@ int rpmtsSetSig(rpmts ts,
 
 pgpDig rpmtsDig(rpmts ts)
 {
-/*@-mods@*/ /* FIX: hide lazy malloc for now */
+/* FIX: hide lazy malloc for now */
     if (ts->dig == NULL)
        ts->dig = pgpNewDig();
-/*@=mods@*/
     if (ts->dig == NULL)
        return NULL;
     return ts->dig;
@@ -1155,18 +1075,14 @@ pgpDigParams rpmtsSignature(const rpmts ts)
 {
     pgpDig dig = rpmtsDig(ts);
     if (dig == NULL) return NULL;
-/*@-immediatetrans@*/
     return &dig->signature;
-/*@=immediatetrans@*/
 }
 
 pgpDigParams rpmtsPubkey(const rpmts ts)
 {
     pgpDig dig = rpmtsDig(ts);
     if (dig == NULL) return NULL;
-/*@-immediatetrans@*/
     return &dig->pubkey;
-/*@=immediatetrans@*/
 }
 
 rpmdb rpmtsGetRdb(rpmts ts)
@@ -1175,9 +1091,7 @@ rpmdb rpmtsGetRdb(rpmts ts)
     if (ts != NULL) {
        rdb = ts->rdb;
     }
-/*@-compdef -refcounttrans -usereleased @*/
     return rdb;
-/*@=compdef =refcounttrans =usereleased @*/
 }
 
 int rpmtsInitDSI(const rpmts ts)
@@ -1281,7 +1195,7 @@ void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
     case FA_ALTNAME:
        dsi->ineeded++;
        dsi->bneeded += bneeded;
-       /*@switchbreak@*/ break;
+       break;
 
     /*
      * FIXME: If two packages share a file (same md5sum), and
@@ -1291,15 +1205,15 @@ void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
     case FA_CREATE:
        dsi->bneeded += bneeded;
        dsi->bneeded -= BLOCK_ROUND(prevSize, dsi->bsize);
-       /*@switchbreak@*/ break;
+       break;
 
     case FA_ERASE:
        dsi->ineeded--;
        dsi->bneeded -= bneeded;
-       /*@switchbreak@*/ break;
+       break;
 
     default:
-       /*@switchbreak@*/ break;
+       break;
     }
 
     if (fixupSize)
@@ -1349,12 +1263,10 @@ void * rpmtsNotify(rpmts ts, rpmte te,
     void * ptr = NULL;
     if (ts && ts->notify && te) {
 assert(!(te->type == TR_ADDED && te->h == NULL));
-       /*@-type@*/ /* FIX: cast? */
-       /*@-noeffectuncon @*/ /* FIX: check rc */
+       /* FIX: cast? */
+       /* FIX: check rc */
        ptr = ts->notify(te->h, what, amount, total,
                        rpmteKey(te), ts->notifyData);
-       /*@=noeffectuncon @*/
-       /*@=type@*/
     }
     return ptr;
 }
@@ -1375,9 +1287,7 @@ rpmte rpmtsElement(rpmts ts, int ix)
        if (ix >= 0 && ix < ts->orderCount)
            te = ts->order[ix];
     }
-    /*@-compdef@*/
     return te;
-    /*@=compdef@*/
 }
 
 rpmprobFilterFlags rpmtsFilterFlags(rpmts ts)
@@ -1402,33 +1312,25 @@ rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
 
 Spec rpmtsSpec(rpmts ts)
 {
-/*@-compdef -retexpose -usereleased@*/
     return ts->spec;
-/*@=compdef =retexpose =usereleased@*/
 }
 
 Spec rpmtsSetSpec(rpmts ts, Spec spec)
 {
     Spec ospec = ts->spec;
-/*@-assignexpose -temptrans@*/
     ts->spec = spec;
-/*@=assignexpose =temptrans@*/
     return ospec;
 }
 
 rpmte rpmtsRelocateElement(rpmts ts)
 {
-/*@-compdef -retexpose -usereleased@*/
     return ts->relocateElement;
-/*@=compdef =retexpose =usereleased@*/
 }
 
 rpmte rpmtsSetRelocateElement(rpmts ts, rpmte relocateElement)
 {
     rpmte orelocateElement = ts->relocateElement;
-/*@-assignexpose -temptrans@*/
     ts->relocateElement = relocateElement;
-/*@=assignexpose =temptrans@*/
     return orelocateElement;
 }
 
@@ -1458,9 +1360,7 @@ rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
 
     if (ts != NULL && opx >= 0 && opx < RPMTS_OP_MAX)
        op = ts->ops + opx;
-/*@-usereleased -compdef @*/
     return op;
-/*@=usereleased =compdef @*/
 }
 
 int rpmtsSetNotifyCallback(rpmts ts,
@@ -1487,14 +1387,12 @@ int rpmtsGetKeys(const rpmts ts, fnpyKey ** ep, int * nep)
        while ((p = rpmtsiNext(pi, 0)) != NULL) {
            switch (rpmteType(p)) {
            case TR_ADDED:
-               /*@-dependenttrans@*/
                *e = rpmteKey(p);
-               /*@=dependenttrans@*/
-               /*@switchbreak@*/ break;
+               break;
            case TR_REMOVED:
            default:
                *e = NULL;
-               /*@switchbreak@*/ break;
+               break;
            }
            e++;
        }
@@ -1626,16 +1524,15 @@ rpmRC rpmtsScoreInit(rpmts runningTS, rpmts rollbackTS)
            se = score->scores[i]; 
            if (strcmp(rpmteN(p), se->N) == 0) {
                found = 1;
-               /*@innerbreak@*/ break;
+               break;
            }
        }
 
        /* If we did not find the entry then allocate space for it */
        if (!found) {
-/*@-compdef -usereleased@*/ /* XXX p->fi->te undefined. */
+/* XXX p->fi->te undefined. */
            rpmMessage(RPMMESS_DEBUG, _("\tAdding entry for %s to score board.\n"),
                rpmteN(p));
-/*@=compdef =usereleased@*/
            se = xcalloc(1, sizeof(*(*(score->scores))));
            rpmMessage(RPMMESS_DEBUG, _("\t\tEntry address:  %p\n"), se);
            se->N         = xstrdup(rpmteN(p));
@@ -1691,7 +1588,6 @@ rpmtsScore rpmtsScoreFree(rpmtsScore score)
     rpmMessage(RPMMESS_DEBUG, _("\tRefcount is zero...will free\n"));
     /* No more references, lets clean up  */
     /* First deallocate the score entries */
-/*@-branchstate@*/
     for(i = 0; i < score->entries; i++) {
        /* Get the score for the ith entry */
        se = score->scores[i]; 
@@ -1702,7 +1598,6 @@ rpmtsScore rpmtsScoreFree(rpmtsScore score)
        /* Deallocate the score entry itself */
        se = _free(se);
     }
-/*@=branchstate@*/
 
     /* Next deallocate the score entry table */
     score->scores = _free(score->scores);
@@ -1750,7 +1645,6 @@ rpmtsScoreEntry rpmtsScoreGetEntry(rpmtsScore score, const char *N)
        }
     }
        
-/*@-compdef@*/ /* XXX score->scores undefined. */
+/* XXX score->scores undefined. */
     return ret;        
-/*@=compdef@*/
 }
index cb3ccf3..a478ed0 100644 (file)
@@ -9,14 +9,9 @@
 #include "rpmps.h"
 #include "rpmsw.h"
 
-/*@-exportlocal@*/
-/*@unchecked@*/
 extern int _rpmts_debug;
-/*@unchecked@*/
 extern int _rpmts_stats;
-/*@unchecked@*/
 extern int _fps_debug;
-/*@=exportlocal@*/
 
 /**
  * Bit(s) to control digest and signature verification.
@@ -128,7 +123,7 @@ struct rpmtsScoreEntry_s {
     int            erased;             /*!<Was the old header removed     */
 };
 
-typedef /*@abstract@*/ struct rpmtsScoreEntry_s * rpmtsScoreEntry;
+typedef struct rpmtsScoreEntry_s * rpmtsScoreEntry;
 
 struct rpmtsScore_s {
        int entries;                    /*!< Number of scores       */
@@ -136,7 +131,7 @@ struct rpmtsScore_s {
        int nrefs;                      /*!< Reference count.       */
 };
 
-typedef /*@abstract@*/ struct rpmtsScore_s * rpmtsScore;
+typedef struct rpmtsScore_s * rpmtsScore;
 
 
 /** \ingroup rpmts
@@ -146,38 +141,28 @@ typedef /*@abstract@*/ struct rpmtsScore_s * rpmtsScore;
  * @param rollbackTS   Rollback Transaction.
  * @return             RPMRC_OK
  */
-rpmRC rpmtsScoreInit(rpmts runningTS, rpmts rollbackTS)
-       /*@globals fileSystem @*/
-       /*@modifies runningTS, rollbackTS, fileSystem @*/;
+rpmRC rpmtsScoreInit(rpmts runningTS, rpmts rollbackTS);
 
 /** \ingroup rpmts
  * Free rpmtsScore provided no more references exist against it.
  * @param score                rpmtsScore to free
  * @return             NULL always
  */
-/*@-exportlocal@*/
-/*@null@*/
-rpmtsScore rpmtsScoreFree(/*@only@*/ /*@null@*/ rpmtsScore score)
-       /*@modifies score @*/;
-/*@=exportlocal@*/
+rpmtsScore rpmtsScoreFree(rpmtsScore score);
 
 /** \ingroup rpmts
  * Get rpmtsScore from transaction.
  * @param ts   RPM Transaction.
  * @return     rpmtsScore or NULL.
  */
-/*@exposed@*/ /*@null@*/
-rpmtsScore rpmtsGetScore(rpmts ts)
-       /*@*/;
+rpmtsScore rpmtsGetScore(rpmts ts);
 
 /** \ingroup rpmts
  * Get rpmtsScoreEntry from rpmtsScore.
  * @param score   RPM Transaction Score.
  * @return       rpmtsScoreEntry or NULL.
  */
-/*@null@*/
-rpmtsScoreEntry rpmtsScoreGetEntry(rpmtsScore score, const char *N)
-       /*@*/;
+rpmtsScoreEntry rpmtsScoreGetEntry(rpmtsScore score, const char *N);
 
 /** \ingroup rpmts
  * \file lib/rpmts.h
@@ -188,14 +173,11 @@ rpmtsScoreEntry rpmtsScoreGetEntry(rpmtsScore score, const char *N)
  * END Transaction Scores *
  **************************/
 
-/*@unchecked@*/
-/*@-exportlocal@*/
 extern int _cacheDependsRC;
-/*@=exportlocal@*/
 
 /** \ingroup rpmts
  */
-typedef        /*@abstract@*/ struct diskspaceInfo_s * rpmDiskSpaceInfo;
+typedef        struct diskspaceInfo_s * rpmDiskSpaceInfo;
 
 /** \ingroup rpmts
  */
@@ -233,59 +215,43 @@ struct rpmts_s {
     tsmStage goal;             /*!< Transaction goal (i.e. mode) */
     rpmtsType type;             /*!< default, rollback, autorollback */
 
-/*@refcounted@*/ /*@null@*/
     rpmdb sdb;                 /*!< Solve database handle. */
     int sdbmode;               /*!< Solve database open mode. */
-/*@null@*/
-    int (*solve) (rpmts ts, rpmds key, const void * data)
-       /*@modifies ts @*/;     /*!< Search for NEVRA key. */
-/*@relnull@*/
+    int (*solve) (rpmts ts, rpmds key, const void * data);
+                                /*!< Search for NEVRA key. */
     const void * solveData;    /*!< Solve callback data */
     int nsuggests;             /*!< No. of depCheck suggestions. */
-/*@only@*/ /*@null@*/
     const void ** suggests;    /*!< Possible depCheck suggestions. */
 
-/*@observer@*/ /*@null@*/
     rpmCallbackFunction notify;        /*!< Callback function. */
-/*@observer@*/ /*@null@*/
     rpmCallbackData notifyData;        /*!< Callback private data. */
 
-/*@refcounted@*/ /*@null@*/
     rpmps probs;               /*!< Current problems in transaction. */
     rpmprobFilterFlags ignoreSet;
                                /*!< Bits to filter current problems. */
 
     int filesystemCount;       /*!< No. of mounted filesystems. */
-/*@dependent@*/ /*@null@*/
     const char ** filesystems; /*!< Mounted filesystem names. */
-/*@only@*/ /*@null@*/
     rpmDiskSpaceInfo dsi;      /*!< Per filesystem disk/inode usage. */
 
-/*@refcounted@*/ /*@null@*/
     rpmdb rdb;                 /*!< Install database handle. */
     int dbmode;                        /*!< Install database open mode. */
-/*@only@*/
     hashTable ht;              /*!< Fingerprint hash table. */
 
-/*@only@*/ /*@null@*/
     int * removedPackages;     /*!< Set of packages being removed. */
     int numRemovedPackages;    /*!< No. removed package instances. */
     int allocedRemovedPackages;        /*!< Size of removed packages array. */
 
-/*@only@*/
     rpmal addedPackages;       /*!< Set of packages being installed. */
     int numAddedPackages;      /*!< No. added package instances. */
 
 #ifndef        DYING
-/*@only@*/
     rpmal availablePackages;   /*!< Universe of available packages. */
     int numAvailablePackages;  /*!< No. available package instances. */
 #endif
 
-/*@null@*/
     rpmte relocateElement;     /*!< Element to use when relocating packages. */
 
-/*@owned@*/ /*@relnull@*/
     rpmte * order;             /*!< Packages sorted by dependencies. */
     int orderCount;            /*!< No. of transaction elements. */
     int orderAlloced;          /*!< No. of allocated transaction elements. */
@@ -295,11 +261,8 @@ struct rpmts_s {
 
     int selinuxEnabled;                /*!< Is SE linux enabled? */
     int chrootDone;            /*!< Has chroot(2) been been done? */
-/*@only@*/ /*@null@*/
     const char * rootDir;      /*!< Path to top of install tree. */
-/*@only@*/ /*@null@*/
     const char * currDir;      /*!< Current working directory. */
-/*@null@*/
     FD_t scriptFd;             /*!< Scriptlet stdout/stderr. */
     int delta;                 /*!< Delta for reallocation. */
     int_32 tid;                        /*!< Transaction id. */
@@ -309,31 +272,24 @@ struct rpmts_s {
 
     rpmVSFlags vsflags;                /*!< Signature/digest verification flags. */
 
-/*@observer@*/ /*@dependent@*/ /*@null@*/
     const char * fn;           /*!< Current package fn. */
     int_32  sigtag;            /*!< Current package signature tag. */
     int_32  sigtype;           /*!< Current package signature data type. */
-/*@null@*/
     const void * sig;          /*!< Current package signature. */
     int_32 siglen;             /*!< Current package signature length. */
 
-/*@only@*/ /*@null@*/
     const unsigned char * pkpkt;/*!< Current pubkey packet. */
     size_t pkpktlen;           /*!< Current pubkey packet length. */
     unsigned char pksignid[8]; /*!< Current pubkey fingerprint. */
 
     struct rpmop_s ops[RPMTS_OP_MAX];
 
-/*@null@*/
     pgpDig dig;                        /*!< Current signature/pubkey parameters. */
 
-/*@null@*/
     Spec spec;                 /*!< Spec file control structure. */
 
-/*@kept@*/ /*@null@*/
     rpmtsScore score;          /*!< Transaction Score (autorollback). */
 
-/*@refs@*/
     int nrefs;                 /*!< Reference count. */
 };
 #endif /* _RPMTS_INTERNAL */
@@ -347,9 +303,7 @@ extern "C" {
  * @param ts           transaction set
  * @return             0 on success
  */
-int rpmtsCheck(rpmts ts)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsCheck(rpmts ts);
 
 /** \ingroup rpmts
  * Determine package order in a transaction set according to dependencies.
@@ -367,9 +321,7 @@ int rpmtsCheck(rpmts ts)
  * @param ts           transaction set
  * @return             no. of (added) packages that could not be ordered
  */
-int rpmtsOrder(rpmts ts)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsOrder(rpmts ts);
 
 /** \ingroup rpmts
  * Process all package elements in a transaction set.  Before calling
@@ -388,9 +340,7 @@ int rpmtsOrder(rpmts ts)
  * @param ignoreSet    bits to filter problem types
  * @return             0 on success, -1 on error, >0 with newProbs set
  */
-int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet);
 
 /** \ingroup rpmts
  * Unreference a transaction instance.
@@ -398,18 +348,12 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
  * @param msg
  * @return             NULL always
  */
-/*@unused@*/ /*@null@*/
-rpmts rpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts,
-               const char * msg)
-       /*@modifies ts @*/;
+rpmts rpmtsUnlink (rpmts ts,
+               const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
-/*@-exportlocal@*/
-/*@null@*/
-rpmts XrpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts,
-               const char * msg, const char * fn, unsigned ln)
-       /*@modifies ts @*/;
-/*@=exportlocal@*/
+rpmts XrpmtsUnlink (rpmts ts,
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmtsUnlink(_ts, _msg)  XrpmtsUnlink(_ts, _msg, __FILE__, __LINE__)
 
 /** \ingroup rpmts
@@ -418,14 +362,11 @@ rpmts XrpmtsUnlink (/*@killref@*/ /*@only@*/ rpmts ts,
  * @param msg
  * @return             new transaction set reference
  */
-/*@unused@*/
-rpmts rpmtsLink (rpmts ts, const char * msg)
-       /*@modifies ts @*/;
+rpmts rpmtsLink (rpmts ts, const char * msg);
 
 /** @todo Remove debugging entry from the ABI. */
 rpmts XrpmtsLink (rpmts ts,
-               const char * msg, const char * fn, unsigned ln)
-        /*@modifies ts @*/;
+               const char * msg, const char * fn, unsigned ln);
 #define        rpmtsLink(_ts, _msg)    XrpmtsLink(_ts, _msg, __FILE__, __LINE__)
 
 /** \ingroup rpmts
@@ -433,9 +374,7 @@ rpmts XrpmtsLink (rpmts ts,
  * @param ts           transaction set
  * @return             0 on success
  */
-int rpmtsCloseDB(rpmts ts)
-       /*@globals fileSystem @*/
-       /*@modifies ts, fileSystem @*/;
+int rpmtsCloseDB(rpmts ts);
 
 /** \ingroup rpmts
  * Open the database used by the transaction.
@@ -443,9 +382,7 @@ int rpmtsCloseDB(rpmts ts)
  * @param dbmode       O_RDONLY or O_RDWR
  * @return             0 on success
  */
-int rpmtsOpenDB(rpmts ts, int dbmode)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsOpenDB(rpmts ts, int dbmode);
 
 /** \ingroup rpmts
  * Initialize the database used by the transaction.
@@ -454,27 +391,21 @@ int rpmtsOpenDB(rpmts ts, int dbmode)
  * @param dbmode       O_RDONLY or O_RDWR
  * @return             0 on success
  */
-int rpmtsInitDB(rpmts ts, int dbmode)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsInitDB(rpmts ts, int dbmode);
 
 /** \ingroup rpmts
  * Rebuild the database used by the transaction.
  * @param ts           transaction set
  * @return             0 on success
  */
-int rpmtsRebuildDB(rpmts ts)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsRebuildDB(rpmts ts);
 
 /** \ingroup rpmts
  * Verify the database used by the transaction.
  * @param ts           transaction set
  * @return             0 on success
  */
-int rpmtsVerifyDB(rpmts ts)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsVerifyDB(rpmts ts);
 
 /** \ingroup rpmts
  * Return transaction database iterator.
@@ -484,33 +415,22 @@ int rpmtsVerifyDB(rpmts ts)
  * @param keylen       key data length (0 will use strlen(keyp))
  * @return             NULL on failure
  */
-/*@only@*/ /*@null@*/
 rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
-                       /*@null@*/ const void * keyp, size_t keylen)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
+                       const void * keyp, size_t keylen);
 
 /**
  * Retrieve pubkey from rpm database.
  * @param ts           rpm transaction
  * @return             RPMRC_OK on success, RPMRC_NOKEY if not found
  */
-/*@-exportlocal@*/
-rpmRC rpmtsFindPubkey(rpmts ts)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState */;
-/*@=exportlocal@*/
+rpmRC rpmtsFindPubkey(rpmts ts);
 
 /** \ingroup rpmts
  * Close the database used by the transaction to solve dependencies.
  * @param ts           transaction set
  * @return             0 on success
  */
-/*@-exportlocal@*/
-int rpmtsCloseSDB(rpmts ts)
-       /*@globals fileSystem @*/
-       /*@modifies ts, fileSystem @*/;
-/*@=exportlocal@*/
+int rpmtsCloseSDB(rpmts ts);
 
 /** \ingroup rpmts
  * Open the database used by the transaction to solve dependencies.
@@ -518,11 +438,7 @@ int rpmtsCloseSDB(rpmts ts)
  * @param dbmode       O_RDONLY or O_RDWR
  * @return             0 on success
  */
-/*@-exportlocal@*/
-int rpmtsOpenSDB(rpmts ts, int dbmode)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
-/*@=exportlocal@*/
+int rpmtsOpenSDB(rpmts ts, int dbmode);
 
 /**
  * Attempt to solve a needed dependency using the solve database.
@@ -531,11 +447,7 @@ int rpmtsOpenSDB(rpmts ts, int dbmode)
  * @param data         opaque data associated with callback
  * @return             -1 retry, 0 ignore, 1 not found
  */
-/*@-exportlocal@*/
-int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
-/*@=exportlocal@*/
+int rpmtsSolve(rpmts ts, rpmds ds, const void * data);
 
 /**
  * Attempt to solve a needed dependency using memory resident tables.
@@ -544,10 +456,7 @@ int rpmtsSolve(rpmts ts, rpmds ds, const void * data)
  * @param ds           dependency set
  * @return             0 if resolved (and added to ts), 1 not found
  */
-/*@unused@*/
-int rpmtsAvailable(rpmts ts, const rpmds ds)
-       /*@globals fileSystem @*/
-       /*@modifies ts, fileSystem @*/;
+int rpmtsAvailable(rpmts ts, const rpmds ds);
 
 /**
  * Set dependency solver callback.
@@ -558,16 +467,14 @@ int rpmtsAvailable(rpmts ts, const rpmds ds)
  */
 int rpmtsSetSolveCallback(rpmts ts,
                int (*solve) (rpmts ts, rpmds ds, const void * data),
-               const void * solveData)
-       /*@modifies ts @*/;
+               const void * solveData);
 
 /**
  * Return the type of a transaction.
  * @param ts           transaction set
  * @return             0 it is not, 1 it is.
  */
-rpmtsType rpmtsGetType(rpmts ts)
-       /*@*/;
+rpmtsType rpmtsGetType(rpmts ts);
 
 /**
  * Set transaction type.   Allowed types are:
@@ -580,58 +487,46 @@ rpmtsType rpmtsGetType(rpmts ts)
  * @param type         transaction type
  * @return             void
  */
-void rpmtsSetType(rpmts ts, rpmtsType type)
-       /*@modifies ts @*/;
+void rpmtsSetType(rpmts ts, rpmtsType type);
 
 /**
  * Return current transaction set problems.
  * @param ts           transaction set
  * @return             current problem set (or NULL)
  */
-/*@null@*/
-rpmps rpmtsProblems(rpmts ts)
-       /*@modifies ts @*/;
+rpmps rpmtsProblems(rpmts ts);
 
 /** \ingroup rpmts
  * Free signature verification data.
  * @param ts           transaction set
  */
-void rpmtsCleanDig(rpmts ts)
-       /*@modifies ts @*/;
+void rpmtsCleanDig(rpmts ts);
 
 /** \ingroup rpmts
  * Free memory needed only for dependency checks and ordering.
  * @param ts           transaction set
  */
-void rpmtsClean(rpmts ts)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies ts, fileSystem , internalState@*/;
+void rpmtsClean(rpmts ts);
 
 /** \ingroup rpmts
  * Re-create an empty transaction set.
  * @param ts           transaction set
  */
-void rpmtsEmpty(rpmts ts)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies ts, fileSystem, internalState @*/;
+void rpmtsEmpty(rpmts ts);
 
 /** \ingroup rpmts
  * Destroy transaction set, closing the database as well.
  * @param ts           transaction set
  * @return             NULL always
  */
-/*@null@*/
-rpmts rpmtsFree(/*@killref@*/ /*@only@*//*@null@*/ rpmts ts)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies ts, fileSystem, internalState @*/;
+rpmts rpmtsFree(rpmts ts);
 
 /** \ingroup rpmts
  * Get verify signatures flag(s).
  * @param ts           transaction set
  * @return             verify signatures flags
  */
-rpmVSFlags rpmtsVSFlags(rpmts ts)
-       /*@*/;
+rpmVSFlags rpmtsVSFlags(rpmts ts);
 
 /** \ingroup rpmts
  * Set verify signatures flag(s).
@@ -639,8 +534,7 @@ rpmVSFlags rpmtsVSFlags(rpmts ts)
  * @param vsflags      new verify signatures flags
  * @return             previous value
  */
-rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags)
-       /*@modifies ts @*/;
+rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags);
 
 /** \ingroup rpmts
  * Set index of 1st element of successors.
@@ -648,75 +542,63 @@ rpmVSFlags rpmtsSetVSFlags(rpmts ts, rpmVSFlags vsflags)
  * @param first                new index of 1st element of successors
  * @return             previous value
  */
-int rpmtsUnorderedSuccessors(rpmts ts, int first)
-       /*@modifies ts @*/;
+int rpmtsUnorderedSuccessors(rpmts ts, int first);
 
 /** \ingroup rpmts
  * Get transaction rootDir, i.e. path to chroot(2).
  * @param ts           transaction set
  * @return             transaction rootDir
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmtsRootDir(rpmts ts)
-       /*@*/;
+extern const char * rpmtsRootDir(rpmts ts);
 
 /** \ingroup rpmts
  * Set transaction rootDir, i.e. path to chroot(2).
  * @param ts           transaction set
  * @param rootDir      new transaction rootDir (or NULL)
  */
-void rpmtsSetRootDir(rpmts ts, /*@null@*/ const char * rootDir)
-       /*@modifies ts @*/;
+void rpmtsSetRootDir(rpmts ts, const char * rootDir);
 
 /** \ingroup rpmts
  * Get transaction currDir, i.e. current directory before chroot(2).
  * @param ts           transaction set
  * @return             transaction currDir
  */
-/*@observer@*/ /*@null@*/
-extern const char * rpmtsCurrDir(rpmts ts)
-       /*@*/;
+extern const char * rpmtsCurrDir(rpmts ts);
 
 /** \ingroup rpmts
  * Set transaction currDir, i.e. current directory before chroot(2).
  * @param ts           transaction set
  * @param currDir      new transaction currDir (or NULL)
  */
-void rpmtsSetCurrDir(rpmts ts, /*@null@*/ const char * currDir)
-       /*@modifies ts @*/;
+void rpmtsSetCurrDir(rpmts ts, const char * currDir);
 
 /** \ingroup rpmts
  * Get transaction script file handle, i.e. stdout/stderr on scriptlet execution
  * @param ts           transaction set
  * @return             transaction script file handle
  */
-/*@null@*/
-FD_t rpmtsScriptFd(rpmts ts)
-       /*@*/;
+FD_t rpmtsScriptFd(rpmts ts);
 
 /** \ingroup rpmts
  * Set transaction script file handle, i.e. stdout/stderr on scriptlet execution
  * @param ts           transaction set
  * @param scriptFd     new script file handle (or NULL)
  */
-void rpmtsSetScriptFd(rpmts ts, /*@null@*/ FD_t scriptFd)
-       /*@modifies ts, scriptFd @*/;
+void rpmtsSetScriptFd(rpmts ts, FD_t scriptFd);
 
 /** \ingroup rpmts
  * Get selinuxEnabled flag, i.e. is SE linux enabled?
  * @param ts           transaction set
  * @return             selinuxEnabled flag
  */
-int rpmtsSELinuxEnabled(rpmts ts)
-       /*@*/;
+int rpmtsSELinuxEnabled(rpmts ts);
 
 /** \ingroup rpmts
  * Get chrootDone flag, i.e. has chroot(2) been performed?
  * @param ts           transaction set
  * @return             chrootDone flag
  */
-int rpmtsChrootDone(rpmts ts)
-       /*@*/;
+int rpmtsChrootDone(rpmts ts);
 
 /** \ingroup rpmts
  * Set chrootDone flag, i.e. has chroot(2) been performed?
@@ -724,16 +606,14 @@ int rpmtsChrootDone(rpmts ts)
  * @param chrootDone   new chrootDone flag
  * @return             previous chrootDone flag
  */
-int rpmtsSetChrootDone(rpmts ts, int chrootDone)
-       /*@modifies ts @*/;
+int rpmtsSetChrootDone(rpmts ts, int chrootDone);
 
 /** \ingroup rpmts
  * Get transaction id, i.e. transaction time stamp.
  * @param ts           transaction set
  * @return             transaction id
  */
-int_32 rpmtsGetTid(rpmts ts)
-       /*@*/;
+int_32 rpmtsGetTid(rpmts ts);
 
 /** \ingroup rpmts
  * Set transaction id, i.e. transaction time stamp.
@@ -741,41 +621,35 @@ int_32 rpmtsGetTid(rpmts ts)
  * @param tid          new transaction id
  * @return             previous transaction id
  */
-int_32 rpmtsSetTid(rpmts ts, int_32 tid)
-       /*@modifies ts @*/;
+int_32 rpmtsSetTid(rpmts ts, int_32 tid);
 
 /** \ingroup rpmts
  * Get signature tag.
  * @param ts           transaction set
  * @return             signature tag
  */
-int_32 rpmtsSigtag(const rpmts ts)
-       /*@*/;
+int_32 rpmtsSigtag(const rpmts ts);
 
 /** \ingroup rpmts
  * Get signature tag type.
  * @param ts           transaction set
  * @return             signature tag type
  */
-int_32 rpmtsSigtype(const rpmts ts)
-       /*@*/;
+int_32 rpmtsSigtype(const rpmts ts);
 
 /** \ingroup rpmts
  * Get signature tag data, i.e. from header.
  * @param ts           transaction set
  * @return             signature tag data
  */
-/*@observer@*/ /*@null@*/
-extern const void * rpmtsSig(const rpmts ts)
-       /*@*/;
+extern const void * rpmtsSig(const rpmts ts);
 
 /** \ingroup rpmts
  * Get signature tag data length, i.e. no. of bytes of data.
  * @param ts           transaction set
  * @return             signature tag data length
  */
-int_32 rpmtsSiglen(const rpmts ts)
-       /*@*/;
+int_32 rpmtsSiglen(const rpmts ts);
 
 /** \ingroup rpmts
  * Set signature tag info, i.e. from header.
@@ -788,53 +662,42 @@ int_32 rpmtsSiglen(const rpmts ts)
  */
 int rpmtsSetSig(rpmts ts,
                int_32 sigtag, int_32 sigtype,
-               /*@kept@*/ /*@null@*/ const void * sig, int_32 siglen)
-       /*@modifies ts @*/;
+               const void * sig, int_32 siglen);
 
 /** \ingroup rpmts
  * Get OpenPGP packet parameters, i.e. signature/pubkey constants.
  * @param ts           transaction set
  * @return             signature/pubkey constants.
  */
-/*@exposed@*/ /*@null@*/
-pgpDig rpmtsDig(rpmts ts)
-       /*@*/;
+pgpDig rpmtsDig(rpmts ts);
 
 /** \ingroup rpmts
  * Get OpenPGP signature constants.
  * @param ts           transaction set
  * @return             signature constants.
  */
-/*@exposed@*/ /*@null@*/
-pgpDigParams rpmtsSignature(const rpmts ts)
-       /*@*/;
+pgpDigParams rpmtsSignature(const rpmts ts);
 
 /** \ingroup rpmts
  * Get OpenPGP pubkey constants.
  * @param ts           transaction set
  * @return             pubkey constants.
  */
-/*@exposed@*/ /*@null@*/
-pgpDigParams rpmtsPubkey(const rpmts ts)
-       /*@*/;
+pgpDigParams rpmtsPubkey(const rpmts ts);
 
 /** \ingroup rpmts
  * Get transaction set database handle.
  * @param ts           transaction set
  * @return             transaction database handle
  */
-/*@null@*/
-rpmdb rpmtsGetRdb(rpmts ts)
-       /*@*/;
+rpmdb rpmtsGetRdb(rpmts ts);
 
 /** \ingroup rpmts
  * Initialize disk space info for each and every mounted file systems.
  * @param ts           transaction set
  * @return             0 on success
  */
-int rpmtsInitDSI(const rpmts ts)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies ts, fileSystem, internalState @*/;
+int rpmtsInitDSI(const rpmts ts);
 
 /** \ingroup rpmts
  * Update disk space info for a file.
@@ -847,16 +710,14 @@ int rpmtsInitDSI(const rpmts ts)
  */
 void rpmtsUpdateDSI(const rpmts ts, dev_t dev,
                uint_32 fileSize, uint_32 prevSize, uint_32 fixupSize,
-               fileAction action)
-       /*@modifies ts @*/;
+               fileAction action);
 
 /** \ingroup rpmts
  * Check a transaction element for disk space problems.
  * @param ts           transaction set
  * @param te           current transaction element
  */
-void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
-       /*@modifies ts @*/;
+void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te);
 
 /**
  * Perform transaction progress notify callback.
@@ -867,18 +728,15 @@ void rpmtsCheckDSIProblems(const rpmts ts, const rpmte te)
  * @param total                final value
  * @return             callback dependent pointer
  */
-/*@null@*/
 void * rpmtsNotify(rpmts ts, rpmte te,
-                rpmCallbackType what, unsigned long amount, unsigned long total)
-       /*@*/;
+                rpmCallbackType what, unsigned long amount, unsigned long total);
 
 /**
  * Return number of (ordered) transaction set elements.
  * @param ts           transaction set
  * @return             no. of transaction set elements
  */
-int rpmtsNElements(rpmts ts)
-       /*@*/;
+int rpmtsNElements(rpmts ts);
 
 /**
  * Return (ordered) transaction set element.
@@ -886,25 +744,21 @@ int rpmtsNElements(rpmts ts)
  * @param ix           transaction element index
  * @return             transaction element (or NULL)
  */
-/*@null@*/ /*@dependent@*/
-rpmte rpmtsElement(rpmts ts, int ix)
-       /*@*/;
+rpmte rpmtsElement(rpmts ts, int ix);
 
 /** \ingroup rpmts
  * Get problem ignore bit mask, i.e. bits to filter encountered problems.
  * @param ts           transaction set
  * @return             ignore bit mask
  */
-rpmprobFilterFlags rpmtsFilterFlags(rpmts ts)
-       /*@*/;
+rpmprobFilterFlags rpmtsFilterFlags(rpmts ts);
 
 /** \ingroup rpmts
  * Get transaction flags, i.e. bits that control rpmtsRun().
  * @param ts           transaction set
  * @return             transaction flags
  */
-rpmtransFlags rpmtsFlags(rpmts ts)
-       /*@*/;
+rpmtransFlags rpmtsFlags(rpmts ts);
 
 /** \ingroup rpmts
  * Set transaction flags, i.e. bits that control rpmtsRun().
@@ -912,17 +766,14 @@ rpmtransFlags rpmtsFlags(rpmts ts)
  * @param transFlags   new transaction flags
  * @return             previous transaction flags
  */
-rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags)
-       /*@modifies ts @*/;
+rpmtransFlags rpmtsSetFlags(rpmts ts, rpmtransFlags transFlags);
 
 /** \ingroup rpmts
  * Get spec control structure from transaction set.
  * @param ts           transaction set
  * @return             spec control structure
  */
-/*@null@*/
-Spec rpmtsSpec(rpmts ts)
-       /*@*/;
+Spec rpmtsSpec(rpmts ts);
 
 /** \ingroup rpmts
  * Set a spec control structure in transaction set.
@@ -930,18 +781,14 @@ Spec rpmtsSpec(rpmts ts)
  * @param spec         new spec control structure
  * @return             previous spec control structure
  */
-/*@null@*/
-Spec rpmtsSetSpec(rpmts ts, /*@null@*/ Spec spec)
-       /*@modifies ts @*/;
+Spec rpmtsSetSpec(rpmts ts, Spec spec);
 
 /** \ingroup rpmts
  * Get current relocate transaction element.
  * @param ts           transaction set
  * @return             current relocate transaction element
  */
-/*@null@*/
-rpmte rpmtsRelocateElement(rpmts ts)
-       /*@*/;
+rpmte rpmtsRelocateElement(rpmts ts);
 
 /** \ingroup rpmts
  * Set current relocate transaction element.
@@ -949,25 +796,21 @@ rpmte rpmtsRelocateElement(rpmts ts)
  * @param relocateElement new relocate transaction element
  * @return             previous relocate transaction element
  */
-/*@null@*/
-rpmte rpmtsSetRelocateElement(rpmts ts, /*@null@*/ rpmte relocateElement)
-       /*@modifies ts @*/;
+rpmte rpmtsSetRelocateElement(rpmts ts, rpmte relocateElement);
 
 /**
  * Retrieve color bits of transaction set.
  * @param ts           transaction set
  * @return             color bits
  */
-uint_32 rpmtsColor(rpmts ts)
-       /*@*/;
+uint_32 rpmtsColor(rpmts ts);
 
 /**
  * Retrieve prefered file color
  * @param ts           transaction set
  * @return             color bits
  */
-uint_32 rpmtsPrefColor(rpmts ts)
-       /*@*/;
+uint_32 rpmtsPrefColor(rpmts ts);
 
 /**
  * Set color bits of transaction set.
@@ -975,8 +818,7 @@ uint_32 rpmtsPrefColor(rpmts ts)
  * @param color                new color bits
  * @return             previous color bits
  */
-uint_32 rpmtsSetColor(rpmts ts, uint_32 color)
-       /*@modifies ts @*/;
+uint_32 rpmtsSetColor(rpmts ts, uint_32 color);
 
 /**
  * Retrieve operation timestamp from a transaction set.
@@ -984,9 +826,7 @@ uint_32 rpmtsSetColor(rpmts ts, uint_32 color)
  * @param opx          operation timestamp index
  * @return             pointer to operation timestamp.
  */
-/*@relnull@*/
-rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
-       /*@*/;
+rpmop rpmtsOp(rpmts ts, rpmtsOpX opx);
 
 /** \ingroup rpmts
  * Set transaction notify callback function and argument.
@@ -1000,18 +840,14 @@ rpmop rpmtsOp(rpmts ts, rpmtsOpX opx)
  * @return             0 on success
  */
 int rpmtsSetNotifyCallback(rpmts ts,
-               /*@observer@*/ rpmCallbackFunction notify,
-               /*@observer@*/ rpmCallbackData notifyData)
-       /*@modifies ts @*/;
+               rpmCallbackFunction notify,
+               rpmCallbackData notifyData);
 
 /** \ingroup rpmts
  * Create an empty transaction set.
  * @return             new transaction set
  */
-/*@newref@*/
-rpmts rpmtsCreate(void)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies rpmGlobalMacroContext, internalState @*/;
+rpmts rpmtsCreate(void);
 
 /** \ingroup rpmts
  * Add package to be installed to transaction set.
@@ -1027,12 +863,8 @@ rpmts rpmtsCreate(void)
  * @return             0 on success, 1 on I/O error, 2 needs capabilities
  */
 int rpmtsAddInstallElement(rpmts ts, Header h,
-               /*@exposed@*/ /*@null@*/ const fnpyKey key, int upgrade,
-               /*@null@*/ rpmRelocation * relocs)
-       /*@globals rpmcliPackagesTotal, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies ts, h, rpmcliPackagesTotal, rpmGlobalMacroContext,
-               fileSystem, internalState @*/;
+               const fnpyKey key, int upgrade,
+               rpmRelocation * relocs);
 
 /** \ingroup rpmts
  * Add package to be erased to transaction set.
@@ -1041,9 +873,7 @@ int rpmtsAddInstallElement(rpmts ts, Header h,
  * @param dboffset     rpm database instance
  * @return             0 on success
  */
-int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/;
+int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset);
 
 /** \ingroup rpmts
  * Retrieve keys from ordered transaction set.
@@ -1053,12 +883,9 @@ int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset)
  * @retval nep         address of no. of returned elements (or NULL)
  * @return             0 always
  */
-/*@unused@*/
 int rpmtsGetKeys(rpmts ts,
-               /*@null@*/ /*@out@*/ fnpyKey ** ep,
-               /*@null@*/ /*@out@*/ int * nep)
-       /*@globals fileSystem, internalState @*/
-       /*@modifies ts, ep, nep, fileSystem, internalState @*/;
+               fnpyKey ** ep,
+               int * nep);
 
 /**
  * Return (malloc'd) header name-version-release string.
@@ -1066,8 +893,7 @@ int rpmtsGetKeys(rpmts ts,
  * @retval np          name tag value
  * @return             name-version-release string
  */
-/*@only@*/ char * hGetNEVR(Header h, /*@null@*/ /*@out@*/ const char ** np )
-       /*@modifies *np @*/;
+char * hGetNEVR(Header h, const char ** np );
 
 /**
  * Return (malloc'd) header name-version-release.arch string.
@@ -1075,16 +901,14 @@ int rpmtsGetKeys(rpmts ts,
  * @retval np          name tag value
  * @return             name-version-release string
  */
-/*@only@*/ char * hGetNEVRA(Header h, /*@null@*/ /*@out@*/ const char ** np )
-       /*@modifies *np @*/;
+char * hGetNEVRA(Header h, const char ** np );
 
 /**
  * Return header color.
  * @param h            header
  * @return             header color
  */
-uint_32 hGetColor(Header h)
-       /*@modifies h @*/;
+uint_32 hGetColor(Header h);
 
 #ifdef __cplusplus
 }
index a66b568..6ba089c 100644 (file)
@@ -33,8 +33,6 @@ int rpmvercmp(const char * a, const char * b)
     two = str2;
 
     /* loop through each version segment of str1 and str2 and compare them */
-    /*@-branchstate@*/
-/*@-boundsread@*/
     while (*one && *two) {
        while (*one && !xisalnum(*one)) one++;
        while (*two && !xisalnum(*two)) two++;
@@ -60,12 +58,10 @@ int rpmvercmp(const char * a, const char * b)
 
        /* save character at the end of the alpha or numeric segment */
        /* so that they can be restored after the comparison */
-/*@-boundswrite@*/
        oldch1 = *str1;
        *str1 = '\0';
        oldch2 = *str2;
        *str2 = '\0';
-/*@=boundswrite@*/
 
        /* this cannot happen, as we previously tested to make sure that */
        /* the first string has a non-null segment */
@@ -99,23 +95,17 @@ int rpmvercmp(const char * a, const char * b)
        if (rc) return (rc < 1 ? -1 : 1);
 
        /* restore character that was replaced by null above */
-/*@-boundswrite@*/
        *str1 = oldch1;
        one = str1;
        *str2 = oldch2;
        two = str2;
-/*@=boundswrite@*/
     }
-    /*@=branchstate@*/
-/*@=boundsread@*/
 
     /* this catches the case where all numeric and alpha segments have */
     /* compared identically but the segment sepparating characters were */
     /* different */
-/*@-boundsread@*/
     if ((!*one) && (!*two)) return 0;
 
     /* whichever version still has characters left over wins */
     if (!*one) return -1; else return 1;
-/*@=boundsread@*/
 }
index ed4856e..5d371c7 100644 (file)
 #include "header_internal.h"
 #include "debug.h"
 
-/*@access FD_t@*/              /* XXX ufdio->read arg1 is void ptr */
-/*@access Header@*/            /* XXX compared with NULL */
-/*@access entryInfo @*/                /* XXX rpmReadSignature */
-/*@access indexEntry @*/       /* XXX rpmReadSignature */
-/*@access DIGEST_CTX@*/                /* XXX compared with NULL */
-/*@access pgpDig@*/
-/*@access pgpDigParams@*/
-
 #if !defined(__GLIBC__) && !defined(__APPLE__)
 char ** environ = NULL;
 #endif
 
 int rpmLookupSignatureType(int action)
 {
-    /*@unchecked@*/
     static int disabled = 0;
     int rc = 0;
 
@@ -42,11 +33,9 @@ int rpmLookupSignatureType(int action)
        break;
     case RPMLOOKUPSIG_ENABLE:
        disabled = 0;
-       /*@fallthrough@*/
     case RPMLOOKUPSIG_QUERY:
        if (disabled)
            break;      /* Disabled */
-/*@-boundsread@*/
       { const char *name = rpmExpand("%{?_signature}", NULL);
        if (!(name && *name != '\0'))
            rc = 0;
@@ -62,7 +51,6 @@ int rpmLookupSignatureType(int action)
            rc = -1;    /* Invalid %_signature spec in macro file */
        name = _free(name);
       }        break;
-/*@=boundsread@*/
     }
     return rc;
 }
@@ -83,17 +71,13 @@ const char * rpmDetectPGPVersion(pgpVersion * pgpVer)
        char *pgpvbin;
        struct stat st;
 
-/*@-boundsread@*/
        if (!(pgpbin && pgpbin[0] != '\0')) {
            pgpbin = _free(pgpbin);
            saved_pgp_version = -1;
            return NULL;
        }
-/*@=boundsread@*/
-/*@-boundswrite@*/
        pgpvbin = (char *)alloca(strlen(pgpbin) + sizeof("v"));
        (void)stpcpy(stpcpy(pgpvbin, pgpbin), "v");
-/*@=boundswrite@*/
 
        if (stat(pgpvbin, &st) == 0)
            saved_pgp_version = PGP_5;
@@ -103,10 +87,8 @@ const char * rpmDetectPGPVersion(pgpVersion * pgpVer)
            saved_pgp_version = PGP_NOTDETECTED;
     }
 
-/*@-boundswrite@*/
     if (pgpVer && pgpbin)
        *pgpVer = saved_pgp_version;
-/*@=boundswrite@*/
     return pgpbin;
 }
 
@@ -120,8 +102,6 @@ const char * rpmDetectPGPVersion(pgpVersion * pgpVer)
  * @return                     rpmRC return code
  */
 static inline rpmRC printSize(FD_t fd, int siglen, int pad, int datalen)
-       /*@globals fileSystem @*/
-       /*@modifies fileSystem @*/
 {
     struct stat st;
     int fdno = Fileno(fd);
@@ -129,25 +109,20 @@ static inline rpmRC printSize(FD_t fd, int siglen, int pad, int datalen)
     /* HACK: workaround for davRead wiring. */
     if (fdno == 123456789) {
        st.st_size = 0;
-/*@-sizeoftype@*/
        st.st_size -= sizeof(struct rpmlead)+siglen+pad+datalen;
-/*@=sizeoftype@*/
     } else if (fstat(fdno, &st) < 0)
        return RPMRC_FAIL;
 
-/*@-sizeoftype@*/
     rpmMessage(RPMMESS_DEBUG,
        _("Expected size: %12d = lead(%d)+sigs(%d)+pad(%d)+data(%d)\n"),
                (int)sizeof(struct rpmlead)+siglen+pad+datalen,
                (int)sizeof(struct rpmlead), siglen, pad, datalen);
-/*@=sizeoftype@*/
     rpmMessage(RPMMESS_DEBUG,
        _("  Actual size: %12d\n"), (int)st.st_size);
 
     return RPMRC_OK;
 }
 
-/*@unchecked@*/
 static unsigned char header_magic[8] = {
     0x8e, 0xad, 0xe8, 0x01, 0x00, 0x00, 0x00, 0x00
 };
@@ -172,12 +147,10 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
     int xx;
     int i;
 
-/*@-boundswrite@*/
     if (sighp)
        *sighp = NULL;
 
     buf[0] = '\0';
-/*@=boundswrite@*/
 
     if (sig_type != RPMSIGTYPE_HEADERSIG)
        goto exit;
@@ -193,32 +166,24 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
                _("sigh magic: BAD\n"));
        goto exit;
     }
-/*@-boundsread@*/
     il = ntohl(block[2]);
-/*@=boundsread@*/
     if (il < 0 || il > 32) {
        (void) snprintf(buf, sizeof(buf),
                _("sigh tags: BAD, no. of tags(%d) out of range\n"), il);
        goto exit;
     }
-/*@-boundsread@*/
     dl = ntohl(block[3]);
-/*@=boundsread@*/
     if (dl < 0 || dl > 8192) {
        (void) snprintf(buf, sizeof(buf),
                _("sigh data: BAD, no. of  bytes(%d) out of range\n"), dl);
        goto exit;
     }
 
-/*@-sizeoftype@*/
     nb = (il * sizeof(struct entryInfo_s)) + dl;
-/*@=sizeoftype@*/
     ei = xmalloc(sizeof(il) + sizeof(dl) + nb);
-/*@-bounds@*/
     ei[0] = block[2];
     ei[1] = block[3];
     pe = (entryInfo) &ei[2];
-/*@=bounds@*/
     dataStart = (unsigned char *) (pe + il);
     if ((xx = timedRead(fd, (void *)pe, nb)) != nb) {
        (void) snprintf(buf, sizeof(buf),
@@ -237,12 +202,10 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
     }
 
     /* Is there an immutable header region tag? */
-/*@-sizeoftype@*/
     if (entry->info.tag == RPMTAG_HEADERSIGNATURES
        && entry->info.type == RPM_BIN_TYPE
        && entry->info.count == REGION_TAG_COUNT)
     {
-/*@=sizeoftype@*/
 
        if (entry->info.offset >= dl) {
            (void) snprintf(buf, sizeof(buf),
@@ -254,8 +217,6 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
 
        /* Is there an immutable header region tag trailer? */
        dataEnd = dataStart + entry->info.offset;
-/*@-sizeoftype@*/
-/*@-bounds@*/
        (void) memcpy(info, dataEnd, REGION_TAG_COUNT);
        /* XXX Really old packages have HEADER_IMAGE, not HEADER_SIGNATURES. */
        if (info->tag == htonl(RPMTAG_HEADERIMAGE)) {
@@ -263,7 +224,6 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
            info->tag = stag;
            memcpy(dataEnd, &stag, sizeof(stag));
        }
-/*@=bounds@*/
        dataEnd += REGION_TAG_COUNT;
 
        xx = headerVerifyInfo(1, dl, info, &entry->info, 1);
@@ -278,10 +238,7 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
                entry->info.offset, entry->info.count);
            goto exit;
        }
-/*@=sizeoftype@*/
-/*@-boundswrite@*/
        memset(info, 0, sizeof(*info));
-/*@=boundswrite@*/
 
        /* Is the no. of tags in the region less than the total no. of tags? */
        ril = entry->info.offset/sizeof(*pe);
@@ -293,9 +250,7 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
     }
 
     /* Sanity check signature tags */
-/*@-boundswrite@*/
     memset(info, 0, sizeof(*info));
-/*@=boundswrite@*/
     for (i = 1; i < il; i++) {
        xx = headerVerifyInfo(1, dl, pe+i, &entry->info, 0);
        if (xx != -1) {
@@ -336,7 +291,6 @@ rpmRC rpmReadSignature(FD_t fd, Header * sighp, sigType sig_type,
     }
 
 exit:
-/*@-boundswrite@*/
     if (sighp && sigh && rc == RPMRC_OK)
        *sighp = headerLink(sigh);
     sigh = headerFree(sigh);
@@ -345,7 +299,6 @@ exit:
        buf[sizeof(buf)-1] = '\0';
        *msg = xstrdup(buf);
     }
-/*@=boundswrite@*/
 
     return rc;
 }
@@ -363,10 +316,8 @@ int rpmWriteSignature(FD_t fd, Header sigh)
     sigSize = headerSizeof(sigh, HEADER_MAGIC_YES);
     pad = (8 - (sigSize % 8)) % 8;
     if (pad) {
-/*@-boundswrite@*/
        if (Fwrite(buf, sizeof(buf[0]), pad, fd) != pad)
            rc = 1;
-/*@=boundswrite@*/
     }
     rpmMessage(RPMMESS_DEBUG, _("Signature: size(%d)+pad(%d)\n"), sigSize, pad);
     return rc;
@@ -393,12 +344,8 @@ Header rpmFreeSignature(Header sigh)
  * @return             0 on success, 1 on failure
  */
 static int makePGPSignature(const char * file, int_32 * sigTagp,
-               /*@out@*/ byte ** pktp, /*@out@*/ int_32 * pktlenp,
-               /*@null@*/ const char * passPhrase)
-       /*@globals errno, rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies errno, *pktp, *pktlenp, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
+               byte ** pktp, int_32 * pktlenp,
+               const char * passPhrase)
 {
     char * sigfile = alloca(1024);
     int pid, status;
@@ -412,17 +359,13 @@ static int makePGPSignature(const char * file, int_32 * sigTagp,
 #endif
     int rc;
 
-/*@-boundswrite@*/
     (void) stpcpy( stpcpy(sigfile, file), ".sig");
-/*@=boundswrite@*/
 
     addMacro(NULL, "__plaintext_filename", NULL, file, -1);
     addMacro(NULL, "__signature_filename", NULL, sigfile, -1);
 
     inpipe[0] = inpipe[1] = 0;
-/*@-boundsread@*/
     (void) pipe(inpipe);
-/*@=boundsread@*/
 
     if (!(pid = fork())) {
        const char *pgp_path = rpmExpand("%{?_pgp_path}", NULL);
@@ -434,10 +377,8 @@ static int makePGPSignature(const char * file, int_32 * sigTagp,
        (void) close(inpipe[1]);
 
        (void) dosetenv("PGPPASSFD", "3", 1);
-/*@-boundsread@*/
        if (pgp_path && *pgp_path != '\0')
            (void) dosetenv("PGPPATH", pgp_path, 1);
-/*@=boundsread@*/
 
        /* dosetenv("PGPPASS", passPhrase, 1); */
 
@@ -447,18 +388,14 @@ static int makePGPSignature(const char * file, int_32 * sigTagp,
            case PGP_2:
                cmd = rpmExpand("%{?__pgp_sign_cmd}", NULL);
                rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
-/*@-boundsread@*/
                if (!rc)
                    rc = execve(av[0], av+1, environ);
-/*@=boundsread@*/
                break;
            case PGP_5:
                cmd = rpmExpand("%{?__pgp5_sign_cmd}", NULL);
                rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
-/*@-boundsread@*/
                if (!rc)
                    rc = execve(av[0], av+1, environ);
-/*@=boundsread@*/
                break;
            case PGP_UNKNOWN:
            case PGP_NOTDETECTED:
@@ -493,13 +430,10 @@ static int makePGPSignature(const char * file, int_32 * sigTagp,
        return 1;
     }
 
-/*@-boundswrite@*/
     *pktlenp = st.st_size;
     rpmMessage(RPMMESS_DEBUG, _("PGP sig size: %d\n"), *pktlenp);
     *pktp = xmalloc(*pktlenp);
-/*@=boundswrite@*/
 
-/*@-boundsread@*/
     {  FD_t fd;
 
        rc = 0;
@@ -510,16 +444,13 @@ static int makePGPSignature(const char * file, int_32 * sigTagp,
            (void) Fclose(fd);
        }
        if (rc != *pktlenp) {
-/*@-boundswrite@*/
            *pktp = _free(*pktp);
-/*@=boundswrite@*/
            rpmError(RPMERR_SIGGEN, _("unable to read the signature\n"));
            return 1;
        }
     }
 
     rpmMessage(RPMMESS_DEBUG, _("Got %d bytes of PGP sig\n"), *pktlenp);
-/*@=boundsread@*/
 
 #ifdef NOTYET
     /* Parse the signature, change signature tag as appropriate. */
@@ -544,12 +475,8 @@ static int makePGPSignature(const char * file, int_32 * sigTagp,
  * @return             0 on success, 1 on failure
  */
 static int makeGPGSignature(const char * file, int_32 * sigTagp,
-               /*@out@*/ byte ** pktp, /*@out@*/ int_32 * pktlenp,
-               /*@null@*/ const char * passPhrase)
-       /*@globals rpmGlobalMacroContext, h_errno,
-               fileSystem, internalState @*/
-       /*@modifies *pktp, *pktlenp, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
+               byte ** pktp, int_32 * pktlenp,
+               const char * passPhrase)
 {
     char * sigfile = alloca(strlen(file)+sizeof(".sig"));
     int pid, status;
@@ -562,17 +489,13 @@ static int makeGPGSignature(const char * file, int_32 * sigTagp,
     pgpDigParams sigp = NULL;
     int rc;
 
-/*@-boundswrite@*/
     (void) stpcpy( stpcpy(sigfile, file), ".sig");
-/*@=boundswrite@*/
 
     addMacro(NULL, "__plaintext_filename", NULL, file, -1);
     addMacro(NULL, "__signature_filename", NULL, sigfile, -1);
 
     inpipe[0] = inpipe[1] = 0;
-/*@-boundsread@*/
     (void) pipe(inpipe);
-/*@=boundsread@*/
 
     if (!(pid = fork())) {
        const char *gpg_path = rpmExpand("%{?_gpg_path}", NULL);
@@ -581,19 +504,15 @@ static int makeGPGSignature(const char * file, int_32 * sigTagp,
        (void) dup2(inpipe[0], 3);
        (void) close(inpipe[1]);
 
-/*@-boundsread@*/
        if (gpg_path && *gpg_path != '\0')
            (void) dosetenv("GNUPGHOME", gpg_path, 1);
-/*@=boundsread@*/
        (void) dosetenv("LC_ALL", "C", 1);
 
        unsetenv("MALLOC_CHECK_");
        cmd = rpmExpand("%{?__gpg_sign_cmd}", NULL);
        rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
-/*@-boundsread@*/
        if (!rc)
            rc = execve(av[0], av+1, environ);
-/*@=boundsread@*/
 
        rpmError(RPMERR_EXEC, _("Could not exec %s: %s\n"), "gpg",
                        strerror(errno));
@@ -623,13 +542,10 @@ static int makeGPGSignature(const char * file, int_32 * sigTagp,
        return 1;
     }
 
-/*@-boundswrite@*/
     *pktlenp = st.st_size;
     rpmMessage(RPMMESS_DEBUG, _("GPG sig size: %d\n"), *pktlenp);
     *pktp = xmalloc(*pktlenp);
-/*@=boundswrite@*/
 
-/*@-boundsread@*/
     {  FD_t fd;
 
        rc = 0;
@@ -640,16 +556,13 @@ static int makeGPGSignature(const char * file, int_32 * sigTagp,
            (void) Fclose(fd);
        }
        if (rc != *pktlenp) {
-/*@-boundswrite@*/
            *pktp = _free(*pktp);
-/*@=boundswrite@*/
            rpmError(RPMERR_SIGGEN, _("unable to read the signature\n"));
            return 1;
        }
     }
 
     rpmMessage(RPMMESS_DEBUG, _("Got %d bytes of GPG sig\n"), *pktlenp);
-/*@=boundsread@*/
 
     /* Parse the signature, change signature tag as appropriate. */
     dig = pgpNewDig();
@@ -697,9 +610,7 @@ static int makeGPGSignature(const char * file, int_32 * sigTagp,
  * @return             0 on success, -1 on failure
  */
 static int makeHDRSignature(Header sigh, const char * file, int_32 sigTag,
-               /*@null@*/ const char * passPhrase)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies sigh, rpmGlobalMacroContext, fileSystem, internalState @*/
+               const char * passPhrase)
 {
     Header h = NULL;
     FD_t fd = NULL;
@@ -716,7 +627,7 @@ static int makeHDRSignature(Header sigh, const char * file, int_32 sigTag,
     case RPMSIGTAG_PGP:
     case RPMSIGTAG_GPG:
        goto exit;
-       /*@notreached@*/ break;
+       break;
     case RPMSIGTAG_SHA1:
        fd = Fopen(file, "r.fdio");
        if (fd == NULL || Ferror(fd))
@@ -854,8 +765,6 @@ int rpmAddSignature(Header sigh, const char * file, int_32 sigTag,
 }
 
 static int checkPassPhrase(const char * passPhrase, const int sigTag)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     int passPhrasePipe[2];
     int pid, status;
@@ -863,9 +772,7 @@ static int checkPassPhrase(const char * passPhrase, const int sigTag)
     int xx;
 
     passPhrasePipe[0] = passPhrasePipe[1] = 0;
-/*@-boundsread@*/
     xx = pipe(passPhrasePipe);
-/*@=boundsread@*/
     if (!(pid = fork())) {
        const char * cmd;
        char *const *av;
@@ -892,21 +799,17 @@ static int checkPassPhrase(const char * passPhrase, const int sigTag)
        case RPMSIGTAG_GPG:
        {   const char *gpg_path = rpmExpand("%{?_gpg_path}", NULL);
 
-/*@-boundsread@*/
            if (gpg_path && *gpg_path != '\0')
                (void) dosetenv("GNUPGHOME", gpg_path, 1);
-/*@=boundsread@*/
 
            cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL);
            rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
-/*@-boundsread@*/
            if (!rc)
                rc = execve(av[0], av+1, environ);
-/*@=boundsread@*/
 
            rpmError(RPMERR_EXEC, _("Could not exec %s: %s\n"), "gpg",
                        strerror(errno));
-       }   /*@notreached@*/ break;
+       }   break;
        case RPMSIGTAG_RSA:
        case RPMSIGTAG_PGP5:    /* XXX legacy */
        case RPMSIGTAG_PGP:
@@ -915,42 +818,36 @@ static int checkPassPhrase(const char * passPhrase, const int sigTag)
            pgpVersion pgpVer;
 
            (void) dosetenv("PGPPASSFD", "3", 1);
-/*@-boundsread@*/
            if (pgp_path && *pgp_path != '\0')
                xx = dosetenv("PGPPATH", pgp_path, 1);
-/*@=boundsread@*/
 
            if ((path = rpmDetectPGPVersion(&pgpVer)) != NULL) {
                switch(pgpVer) {
                case PGP_2:
                    cmd = rpmExpand("%{?__pgp_check_password_cmd}", NULL);
                    rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
-/*@-boundsread@*/
                    if (!rc)
                        rc = execve(av[0], av+1, environ);
-/*@=boundsread@*/
-                   /*@innerbreak@*/ break;
+                   break;
                case PGP_5:     /* XXX legacy */
                    cmd = rpmExpand("%{?__pgp5_check_password_cmd}", NULL);
                    rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
-/*@-boundsread@*/
                    if (!rc)
                        rc = execve(av[0], av+1, environ);
-/*@=boundsread@*/
-                   /*@innerbreak@*/ break;
+                   break;
                case PGP_UNKNOWN:
                case PGP_NOTDETECTED:
-                   /*@innerbreak@*/ break;
+                   break;
                }
            }
            rpmError(RPMERR_EXEC, _("Could not exec %s: %s\n"), "pgp",
                        strerror(errno));
            _exit(RPMERR_EXEC);
-       }   /*@notreached@*/ break;
+       }   break;
        default: /* This case should have been screened out long ago. */
            rpmError(RPMERR_SIGGEN, _("Invalid %%_signature spec in macro file\n"));
            _exit(RPMERR_SIGGEN);
-           /*@notreached@*/ break;
+           break;
        }
     }
 
@@ -972,12 +869,10 @@ char * rpmGetPassPhrase(const char * prompt, const int sigTag)
     switch (sigTag) {
     case RPMSIGTAG_DSA:
     case RPMSIGTAG_GPG:
-/*@-boundsread@*/
       { const char *name = rpmExpand("%{?_gpg_name}", NULL);
        aok = (name && *name != '\0');
        name = _free(name);
       }
-/*@=boundsread@*/
        if (aok)
            break;
        rpmError(RPMERR_SIGGEN,
@@ -986,12 +881,10 @@ char * rpmGetPassPhrase(const char * prompt, const int sigTag)
     case RPMSIGTAG_RSA:
     case RPMSIGTAG_PGP5:       /* XXX legacy */
     case RPMSIGTAG_PGP:
-/*@-boundsread@*/
       { const char *name = rpmExpand("%{?_pgp_name}", NULL);
        aok = (name && *name != '\0');
        name = _free(name);
       }
-/*@=boundsread@*/
        if (aok)
            break;
        rpmError(RPMERR_SIGGEN,
@@ -1006,9 +899,7 @@ char * rpmGetPassPhrase(const char * prompt, const int sigTag)
     }
 
     if (aok) {
-/*@-moduncon -nullpass -unrecog @*/
        pass = getpass( (prompt ? prompt : "") );
-/*@=moduncon =nullpass =unrecog @*/
 
        if (checkPassPhrase(pass, sigTag))
            pass = NULL;
@@ -1017,8 +908,7 @@ char * rpmGetPassPhrase(const char * prompt, const int sigTag)
     return pass;
 }
 
-static /*@observer@*/ const char * rpmSigString(rpmRC res)
-       /*@*/
+static const char * rpmSigString(rpmRC res)
 {
     const char * str;
     switch (res) {
@@ -1032,10 +922,8 @@ static /*@observer@*/ const char * rpmSigString(rpmRC res)
     return str;
 }
 
-/*@-boundswrite@*/
 static rpmRC
-verifySizeSignature(const rpmts ts, /*@out@*/ char * t)
-       /*@modifies *t @*/
+verifySizeSignature(const rpmts ts, char * t)
 {
     const void * sig = rpmtsSig(ts);
     pgpDig dig = rpmtsDig(ts);
@@ -1067,14 +955,10 @@ exit:
     t = stpcpy(t, "\n");
     return res;
 }
-/*@=boundswrite@*/
 
-/*@-boundswrite@*/
 static rpmRC
-verifyMD5Signature(const rpmts ts, /*@out@*/ char * t,
-               /*@null@*/ DIGEST_CTX md5ctx)
-       /*@globals internalState @*/
-       /*@modifies *t, internalState @*/
+verifyMD5Signature(const rpmts ts, char * t,
+               DIGEST_CTX md5ctx)
 {
     const void * sig = rpmtsSig(ts);
     int_32 siglen = rpmtsSiglen(ts);
@@ -1119,9 +1003,7 @@ exit:
     t = stpcpy(t, "\n");
     return res;
 }
-/*@=boundswrite@*/
 
-/*@-boundswrite@*/
 /**
  * Verify header immutable region SHA1 digest.
  * @param ts           transaction set
@@ -1130,10 +1012,8 @@ exit:
  * @return             RPMRC_OK on success
  */
 static rpmRC
-verifySHA1Signature(const rpmts ts, /*@out@*/ char * t,
-               /*@null@*/ DIGEST_CTX sha1ctx)
-       /*@globals internalState @*/
-       /*@modifies *t, internalState @*/
+verifySHA1Signature(const rpmts ts, char * t,
+               DIGEST_CTX sha1ctx)
 {
     const void * sig = rpmtsSig(ts);
 #ifdef NOTYET
@@ -1177,7 +1057,6 @@ exit:
     t = stpcpy(t, "\n");
     return res;
 }
-/*@=boundswrite@*/
 
 /**
  * Convert hex to binary nibble.
@@ -1185,7 +1064,6 @@ exit:
  * @return             binary nibble
  */
 static inline unsigned char nibble(char c)
-       /*@*/
 {
     if (c >= '0' && c <= '9')
        return (c - '0');
@@ -1196,7 +1074,6 @@ static inline unsigned char nibble(char c)
     return 0;
 }
 
-/*@-boundswrite@*/
 /**
  * Verify RSA signature.
  * @param ts           transaction set
@@ -1205,10 +1082,8 @@ static inline unsigned char nibble(char c)
  * @return             RPMRC_OK on success
  */
 static rpmRC
-verifyRSASignature(rpmts ts, /*@out@*/ char * t,
-               /*@null@*/ DIGEST_CTX md5ctx)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, *t, rpmGlobalMacroContext, fileSystem, internalState */
+verifyRSASignature(rpmts ts, char * t,
+               DIGEST_CTX md5ctx)
 {
     const void * sig = rpmtsSig(ts);
 #ifdef NOTYET
@@ -1239,7 +1114,6 @@ verifyRSASignature(rpmts ts, /*@out@*/ char * t,
     case PGPPUBKEYALGO_RSA:
        if (sigtag == RPMSIGTAG_PGP || sigtag == RPMSIGTAG_PGP5 || sigtag == RPMSIGTAG_RSA)
            break;
-       /*@fallthrough@*/
     default:
        res = RPMRC_NOKEY;
        break;
@@ -1378,7 +1252,6 @@ exit:
     t = stpcpy(t, "\n");
     return res;
 }
-/*@=boundswrite@*/
 
 /**
  * Verify DSA signature.
@@ -1387,12 +1260,9 @@ exit:
  * @param sha1ctx
  * @return             RPMRC_OK on success
  */
-/*@-boundswrite@*/
 static rpmRC
-verifyDSASignature(rpmts ts, /*@out@*/ char * t,
-               /*@null@*/ DIGEST_CTX sha1ctx)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, *t, rpmGlobalMacroContext, fileSystem, internalState */
+verifyDSASignature(rpmts ts, char * t,
+               DIGEST_CTX sha1ctx)
 {
     const void * sig = rpmtsSig(ts);
 #ifdef NOTYET
@@ -1482,7 +1352,6 @@ exit:
     t = stpcpy(t, "\n");
     return res;
 }
-/*@=boundswrite@*/
 
 rpmRC
 rpmVerifySignature(const rpmts ts, char * result)
index eb354a3..be86948 100644 (file)
@@ -34,8 +34,7 @@ extern "C" {
  * Return new, empty (signature) header instance.
  * @return             signature header
  */
-Header rpmNewSignature(void)
-       /*@*/;
+Header rpmNewSignature(void);
 
 /** \ingroup signature
  * Read (and verify header+payload size) signature header.
@@ -46,10 +45,8 @@ Header rpmNewSignature(void)
  * @retval msg         failure msg
  * @return             rpmRC return code
  */
-rpmRC rpmReadSignature(FD_t fd, /*@null@*/ /*@out@*/ Header *sighp,
-               sigType sig_type, /*@null@*/ /*@out@*/ const char ** msg)
-       /*@globals fileSystem @*/
-       /*@modifies fd, *sighp, *msg, fileSystem @*/;
+rpmRC rpmReadSignature(FD_t fd, Header *sighp,
+               sigType sig_type, const char ** msg);
 
 /** \ingroup signature
  * Write signature header.
@@ -57,9 +54,7 @@ rpmRC rpmReadSignature(FD_t fd, /*@null@*/ /*@out@*/ Header *sighp,
  * @param h            (signature) header
  * @return             0 on success, 1 on error
  */
-int rpmWriteSignature(FD_t fd, Header h)
-       /*@globals fileSystem @*/
-       /*@modifies fd, h, fileSystem @*/;
+int rpmWriteSignature(FD_t fd, Header h);
 
 /** \ingroup signature
  * Generate signature(s) from a header+payload file, save in signature header.
@@ -70,9 +65,7 @@ int rpmWriteSignature(FD_t fd, Header h)
  * @return             0 on success, -1 on failure
  */
 int rpmAddSignature(Header sigh, const char * file,
-                   int_32 sigTag, /*@null@*/ const char * passPhrase)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies sigh, rpmGlobalMacroContext, fileSystem, internalState @*/;
+                   int_32 sigTag, const char * passPhrase);
 
 /******************************************************************/
 
@@ -88,9 +81,7 @@ int rpmAddSignature(Header sigh, const char * file,
  * @param action       enable/disable/query action
  * @return             sigTag to use, 0 if none, -1 on error
  */
-int rpmLookupSignatureType(int action)
-       /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
-       /*@modifies rpmGlobalMacroContext, internalState @*/;
+int rpmLookupSignatureType(int action);
 
 /** \ingroup signature
  * Read a pass phrase using getpass(3), confirm with gpg/pgp helper binaries.
@@ -98,23 +89,16 @@ int rpmLookupSignatureType(int action)
  * @param sigTag       signature type/tag
  * @return             pass phrase
  */
-/*@dependent@*/ /*@null@*/
-char * rpmGetPassPhrase(/*@null@*/ const char * prompt,
-               const int sigTag)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
+char * rpmGetPassPhrase(const char * prompt,
+               const int sigTag);
 
 /** \ingroup signature
  * Return path to pgp executable of given type, or NULL when not found.
  * @retval pgpVer      pgp version
  * @return             path to pgp executable
  */
-/*@-exportlocal -redecl@*/
-/*@null@*/ const char * rpmDetectPGPVersion(
-                       /*@null@*/ /*@out@*/ pgpVersion * pgpVer)
-       /*@globals rpmGlobalMacroContext, h_errno @*/
-       /*@modifies *pgpVer, rpmGlobalMacroContext @*/;
-/*@=exportlocal =redecl@*/
+const char * rpmDetectPGPVersion(
+                       pgpVersion * pgpVer);
 
 #ifdef __cplusplus
 }
index 833ca62..bc85715 100644 (file)
@@ -10,9 +10,7 @@
 #define BUF_CHUNK 1024
 
 struct StringBufRec {
-/*@owned@*/
     char *buf;
-/*@dependent@*/
     char *tail;     /* Points to first "free" char */
     int allocated;
     int free;
@@ -21,7 +19,7 @@ struct StringBufRec {
 /**
  * Locale insensitive isspace(3).
  */
-/*@unused@*/ static inline int xisspace(int c) /*@*/ {
+static inline int xisspace(int c)  {
     return (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f' || c == '\v');
 }
 
@@ -30,8 +28,8 @@ struct StringBufRec {
  * @param p            memory to free
  * @return             NULL always
  */
-/*@unused@*/ static inline /*@null@*/ void *
-_free(/*@only@*/ /*@null@*/ /*@out@*/ const void * p) /*@modifies *p @*/
+static inline void *
+_free(const void * p)
 {
     if (p != NULL)     free((void *)p);
     return NULL;
@@ -60,16 +58,13 @@ StringBuf freeStringBuf(StringBuf sb)
 
 void truncStringBuf(StringBuf sb)
 {
-/*@-boundswrite@*/
     sb->buf[0] = '\0';
-/*@=boundswrite@*/
     sb->tail = sb->buf;
     sb->free = sb->allocated;
 }
 
 void stripTrailingBlanksStringBuf(StringBuf sb)
 {
-/*@-bounds@*/
     while (sb->free != sb->allocated) {
        if (! xisspace(*(sb->tail - 1)))
            break;
@@ -77,7 +72,6 @@ void stripTrailingBlanksStringBuf(StringBuf sb)
        sb->tail--;
     }
     sb->tail[0] = '\0';
-/*@=bounds@*/
 }
 
 char * getStringBuf(StringBuf sb)
@@ -98,10 +92,8 @@ void appendStringBufAux(StringBuf sb, const char *s, int nl)
        sb->tail = sb->buf + (sb->allocated - sb->free);
     }
     
-/*@-boundswrite@*/
-    /*@-mayaliasunique@*/ /* FIX: shrug */
+    /* FIX: shrug */
     strcpy(sb->tail, s);
-    /*@=mayaliasunique@*/
     sb->tail += l;
     sb->free -= l;
     if (nl) {
@@ -110,5 +102,4 @@ void appendStringBufAux(StringBuf sb, const char *s, int nl)
        sb->tail++;
        sb->free--;
     }
-/*@=boundswrite@*/
 }
index 08dbf02..a5fa7e6 100644 (file)
@@ -7,7 +7,7 @@
 
 /**
  */
-typedef /*@abstract@*/ struct StringBufRec *StringBuf;
+typedef struct StringBufRec *StringBuf;
 
 #ifdef __cplusplus
 extern "C" {
@@ -15,29 +15,23 @@ extern "C" {
 
 /**
  */
-/*@only@*/ StringBuf newStringBuf(void)
-       /*@*/;
+StringBuf newStringBuf(void);
 
 /**
  */
-/*@null@*/ StringBuf freeStringBuf( /*@only@*/ /*@null@*/ StringBuf sb)
-       /*@modifies sb @*/;
+StringBuf freeStringBuf( StringBuf sb);
 
 /**
  */
-/*@unused@*/
-void truncStringBuf(StringBuf sb)
-       /*@modifies sb @*/;
+void truncStringBuf(StringBuf sb);
 
 /**
  */
-/*@observer@*/ char * getStringBuf(StringBuf sb)
-       /*@*/;
+char * getStringBuf(StringBuf sb);
 
 /**
  */
-void stripTrailingBlanksStringBuf(StringBuf sb)
-       /*@modifies sb @*/;
+void stripTrailingBlanksStringBuf(StringBuf sb);
 
 /**
  */
@@ -49,8 +43,7 @@ void stripTrailingBlanksStringBuf(StringBuf sb)
 
 /**
  */
-void appendStringBufAux(StringBuf sb, const char * s, int nl)
-       /*@modifies sb @*/;
+void appendStringBufAux(StringBuf sb, const char * s, int nl);
 
 #ifdef __cplusplus
 }
index f1184bb..19028b9 100644 (file)
--- a/lib/tgi.c
+++ b/lib/tgi.c
@@ -23,9 +23,7 @@ static const char * queryFormat = NULL;
 static const char * defaultQueryFormat =
        "%{name}-%{version}-%{release}.%|SOURCERPM?{%{arch}.rpm}:{%|ARCH?{src.rpm}:{pubkey}|}|";
 
-/*@only@*/ /*@null@*/
 static const char * rpmgiPathOrQF(const rpmgi gi)
-       /*@*/
 {
     const char * fmt = ((queryFormat != NULL)
        ? queryFormat : defaultQueryFormat);
index 4d743c1..c3ca93a 100644 (file)
 
 #include "idtx.h"
 
-/*@access Header @*/           /* XXX ts->notify arg1 is void ptr */
-/*@access rpmps @*/    /* XXX need rpmProblemSetOK() */
-/*@access dbiIndexSet @*/
-
-/*@access rpmpsm @*/
-
-/*@access alKey @*/
-/*@access fnpyKey @*/
-
-/*@access rpmfi @*/
-
-/*@access rpmte @*/
-/*@access rpmtsi @*/
-/*@access rpmts @*/
-
-/*@access IDT @*/
-/*@access IDTX @*/
-/*@access FD_t @*/
 
 /* XXX: This is a hack.  I needed a to setup a notify callback
  * for the rollback transaction, but I did not want to create
  * a header for rpminstall.c.
  */
-extern void * rpmShowProgress(/*@null@*/ const void * arg,
+extern void * rpmShowProgress(const void * arg,
                         const rpmCallbackType what,
                         const unsigned long amount,
                         const unsigned long total,
-                        /*@null@*/ fnpyKey key,
-                        /*@null@*/ void * data)
-       /*@*/;
+                        fnpyKey key,
+                        void * data)
+       ;
 
 /**
  */
-static int archOkay(/*@null@*/ const char * pkgArch)
-       /*@*/
+static int archOkay(const char * pkgArch)
 {
     if (pkgArch == NULL) return 0;
     return (rpmMachineScore(RPM_MACHTABLE_INSTARCH, pkgArch) ? 1 : 0);
@@ -76,8 +57,7 @@ static int archOkay(/*@null@*/ const char * pkgArch)
 
 /**
  */
-static int osOkay(/*@null@*/ const char * pkgOs)
-       /*@*/
+static int osOkay(const char * pkgOs)
 {
     if (pkgOs == NULL) return 0;
     return (rpmMachineScore(RPM_MACHTABLE_INSTOS, pkgOs) ? 1 : 0);
@@ -86,7 +66,6 @@ static int osOkay(/*@null@*/ const char * pkgOs)
 /**
  */
 static int sharedCmp(const void * one, const void * two)
-       /*@*/
 {
     sharedFileInfo a = (sharedFileInfo) one;
     sharedFileInfo b = (sharedFileInfo) two;
@@ -108,13 +87,10 @@ static int sharedCmp(const void * one, const void * two)
  * @param reportConflicts
  */
 /* XXX only ts->{probs,rpmdb} modified */
-/*@-bounds@*/
 static int handleInstInstalledFiles(const rpmts ts,
                rpmte p, rpmfi fi,
                sharedFileInfo shared,
                int sharedCount, int reportConflicts)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fi, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     uint_32 tscolor = rpmtsColor(ts);
     uint_32 prefcolor = rpmtsPrefColor(ts);
@@ -216,10 +192,9 @@ static int handleInstInstalledFiles(const rpmts ts,
            }
            /* Save file identifier to mark as state REPLACED. */
            if ( !(isCfgFile || XFA_SKIPPING(fi->actions[fileNum])) ) {
-               /*@-assignexpose@*/ /* FIX: p->replaced, not fi */
+               /* FIX: p->replaced, not fi */
                if (!shared->isRemoved)
                    fi->replaced[numReplaced++] = *shared;
-               /*@=assignexpose@*/
            }
        }
 
@@ -243,15 +218,12 @@ static int handleInstInstalledFiles(const rpmts ts,
 
     return 0;
 }
-/*@=bounds@*/
 
 /**
  */
 /* XXX only ts->rpmdb modified */
 static int handleRmvdInstalledFiles(const rpmts ts, rpmfi fi,
                sharedFileInfo shared, int sharedCount)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fi, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     HGE_t hge = fi->hge;
     Header h;
@@ -270,7 +242,6 @@ static int handleRmvdInstalledFiles(const rpmts ts, rpmfi fi,
 
     xx = hge(h, RPMTAG_FILESTATES, NULL, (void **) &otherStates, NULL);
 
-/*@-boundswrite@*/
     for (i = 0; i < sharedCount; i++, shared++) {
        int otherFileNum, fileNum;
        otherFileNum = shared->otherFileNum;
@@ -281,7 +252,6 @@ static int handleRmvdInstalledFiles(const rpmts ts, rpmfi fi,
 
        fi->actions[fileNum] = FA_SKIP;
     }
-/*@=boundswrite@*/
 
     mi = rpmdbFreeIterator(mi);
 
@@ -290,11 +260,9 @@ static int handleRmvdInstalledFiles(const rpmts ts, rpmfi fi,
 
 #define        ISROOT(_d)      (((_d)[0] == '/' && (_d)[1] == '\0') ? "" : (_d))
 
-/*@unchecked@*/
 int _fps_debug = 0;
 
 static int fpsCompare (const void * one, const void * two)
-       /*@*/
 {
     const struct fingerPrint_s * a = (const struct fingerPrint_s *)one;
     const struct fingerPrint_s * b = (const struct fingerPrint_s *)two;
@@ -310,7 +278,6 @@ static int fpsCompare (const void * one, const void * two)
     if (adnlen == 1 && asnlen != 0) adnlen = 0;
     if (bdnlen == 1 && bsnlen != 0) bdnlen = 0;
 
-/*@-boundswrite@*/
     afn = t = alloca(adnlen+asnlen+abnlen+2);
     if (adnlen) t = stpcpy(t, a->entry->dirName);
     *t++ = '/';
@@ -324,15 +291,11 @@ static int fpsCompare (const void * one, const void * two)
     if (b->subDir && bsnlen) t = stpcpy(t, b->subDir);
     if (bbnlen) t = stpcpy(t, b->baseName);
     if (bfn[0] == '/' && bfn[1] == '/') bfn++;
-/*@=boundswrite@*/
 
     rc = strcmp(afn, bfn);
-/*@-modfilesys@*/
 if (_fps_debug)
 fprintf(stderr, "\trc(%d) = strcmp(\"%s\", \"%s\")\n", rc, afn, bfn);
-/*@=modfilesys@*/
 
-/*@-modfilesys@*/
 if (_fps_debug)
 fprintf(stderr, "\t%s/%s%s\trc %d\n",
 ISROOT(b->entry->dirName),
@@ -340,61 +303,50 @@ ISROOT(b->entry->dirName),
 b->baseName,
 rc
 );
-/*@=modfilesys@*/
 
     return rc;
 }
 
-/*@unchecked@*/
 static int _linear_fps_search = 0;
 
 static int findFps(const struct fingerPrint_s * fiFps,
                const struct fingerPrint_s * otherFps,
                int otherFc)
-       /*@*/
 {
     int otherFileNum;
 
-/*@-modfilesys@*/
 if (_fps_debug)
 fprintf(stderr, "==> %s/%s%s\n",
 ISROOT(fiFps->entry->dirName),
 (fiFps->subDir ? fiFps->subDir : ""),
 fiFps->baseName);
-/*@=modfilesys@*/
 
   if (_linear_fps_search) {
 
 linear:
     for (otherFileNum = 0; otherFileNum < otherFc; otherFileNum++, otherFps++) {
 
-/*@-modfilesys@*/
 if (_fps_debug)
 fprintf(stderr, "\t%4d %s/%s%s\n", otherFileNum,
 ISROOT(otherFps->entry->dirName),
 (otherFps->subDir ? otherFps->subDir : ""),
 otherFps->baseName);
-/*@=modfilesys@*/
 
        /* If the addresses are the same, so are the values. */
        if (fiFps == otherFps)
            break;
 
        /* Otherwise, compare fingerprints by value. */
-       /*@-nullpass@*/ /* LCL: looks good to me */
        if (FP_EQUAL((*fiFps), (*otherFps)))
            break;
-       /*@=nullpass@*/
     }
 
 if (otherFileNum == otherFc) {
-/*@-modfilesys@*/
 if (_fps_debug)
 fprintf(stderr, "*** FP_EQUAL NULL %s/%s%s\n",
 ISROOT(fiFps->entry->dirName),
 (fiFps->subDir ? fiFps->subDir : ""),
 fiFps->baseName);
-/*@=modfilesys@*/
 }
 
     return otherFileNum;
@@ -403,30 +355,24 @@ fiFps->baseName);
 
     const struct fingerPrint_s * bingoFps;
 
-/*@-boundswrite@*/
     bingoFps = bsearch(fiFps, otherFps, otherFc, sizeof(*otherFps), fpsCompare);
-/*@=boundswrite@*/
     if (bingoFps == NULL) {
-/*@-modfilesys@*/
 if (_fps_debug)
 fprintf(stderr, "*** bingoFps NULL %s/%s%s\n",
 ISROOT(fiFps->entry->dirName),
 (fiFps->subDir ? fiFps->subDir : ""),
 fiFps->baseName);
-/*@=modfilesys@*/
        goto linear;
     }
 
     /* If the addresses are the same, so are the values. */
-    /*@-nullpass@*/    /* LCL: looks good to me */
+       /* LCL: looks good to me */
     if (!(fiFps == bingoFps || FP_EQUAL((*fiFps), (*bingoFps)))) {
-/*@-modfilesys@*/
 if (_fps_debug)
 fprintf(stderr, "***  BAD %s/%s%s\n",
 ISROOT(bingoFps->entry->dirName),
 (bingoFps->subDir ? bingoFps->subDir : ""),
 bingoFps->baseName);
-/*@=modfilesys@*/
        goto linear;
     }
 
@@ -443,8 +389,6 @@ bingoFps->baseName);
 /* XXX only ts->{probs,di} modified */
 static void handleOverlappedFiles(const rpmts ts,
                const rpmte p, rpmfi fi)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fi, fileSystem, internalState @*/
 {
     uint_32 fixupSize = 0;
     rpmps ps;
@@ -523,7 +467,7 @@ static void handleOverlappedFiles(const rpmts ts,
 
            /* Added packages need only look at other added packages. */
            if (rpmteType(p) == TR_ADDED && rpmteType(otherFi->te) != TR_ADDED)
-               /*@innercontinue@*/ continue;
+               continue;
 
            otherFps = otherFi->fps;
            otherFc = rpmfiFC(otherFi);
@@ -533,13 +477,12 @@ static void handleOverlappedFiles(const rpmts ts,
 
            /* XXX Happens iff fingerprint for incomplete package install. */
            if (otherFi->actions[otherFileNum] != FA_UNKNOWN)
-               /*@innerbreak@*/ break;
+               break;
        }
 
        oFColor = rpmfiFColor(otherFi);
        oFColor &= tscolor;
 
-/*@-boundswrite@*/
        switch (rpmteType(p)) {
        case TR_ADDED:
          {
@@ -550,7 +493,7 @@ static void handleOverlappedFiles(const rpmts ts,
            if (otherPkgNum < 0) {
                /* XXX is this test still necessary? */
                if (fi->actions[i] != FA_UNKNOWN)
-                   /*@switchbreak@*/ break;
+                   break;
                if (rpmfiConfigConflict(fi)) {
                    /* Here is a non-overlapped pre-existing config file. */
                    fi->actions[i] = (FFlags & RPMFILE_NOREPLACE)
@@ -558,7 +501,7 @@ static void handleOverlappedFiles(const rpmts ts,
                } else {
                    fi->actions[i] = FA_CREATE;
                }
-               /*@switchbreak@*/ break;
+               break;
            }
 
 assert(otherFi != NULL);
@@ -616,7 +559,7 @@ assert(otherFi != NULL);
                if (!done)
                    fi->actions[i] = FA_CREATE;
            }
-         } /*@switchbreak@*/ break;
+         } break;
 
        case TR_REMOVED:
            if (otherPkgNum >= 0) {
@@ -625,18 +568,18 @@ assert(otherFi != NULL);
                if (otherFi->actions[otherFileNum] != FA_ERASE) {
                    /* On updates, don't remove files. */
                    fi->actions[i] = FA_SKIP;
-                   /*@switchbreak@*/ break;
+                   break;
                }
                /* Here is an overlapped removed file: skip in previous. */
                otherFi->actions[otherFileNum] = FA_SKIP;
            }
            if (XFA_SKIPPING(fi->actions[i]))
-               /*@switchbreak@*/ break;
+               break;
            if (rpmfiFState(fi) != RPMFILE_STATE_NORMAL)
-               /*@switchbreak@*/ break;
+               break;
            if (!(S_ISREG(FMode) && (FFlags & RPMFILE_CONFIG))) {
                fi->actions[i] = FA_ERASE;
-               /*@switchbreak@*/ break;
+               break;
            }
                
            /* Here is a pre-existing modified config file that needs saving. */
@@ -644,13 +587,12 @@ assert(otherFi != NULL);
                const unsigned char * MD5 = rpmfiMD5(fi);
                if (!domd5(fn, md5sum, 0, NULL) && memcmp(MD5, md5sum, 16)) {
                    fi->actions[i] = FA_BACKUP;
-                   /*@switchbreak@*/ break;
+                   break;
                }
            }
            fi->actions[i] = FA_ERASE;
-           /*@switchbreak@*/ break;
+           break;
        }
-/*@=boundswrite@*/
 
        /* Update disk space info for a file. */
        rpmtsUpdateDSI(ts, fiFps->entry->dev, rpmfiFSize(fi),
@@ -669,7 +611,6 @@ assert(otherFi != NULL);
  */
 static int ensureOlder(rpmts ts,
                const rpmte p, const Header h)
-       /*@modifies ts @*/
 {
     int_32 reqFlags = (RPMSENSE_LESS | RPMSENSE_EQUAL);
     const char * reqEVR;
@@ -681,7 +622,6 @@ static int ensureOlder(rpmts ts,
     if (p == NULL || h == NULL)
        return 1;
 
-/*@-boundswrite@*/
     nb = strlen(rpmteNEVR(p)) + (rpmteE(p) != NULL ? strlen(rpmteE(p)) : 0) + 1;
     t = alloca(nb);
     *t = '\0';
@@ -690,7 +630,6 @@ static int ensureOlder(rpmts ts,
     if (rpmteV(p) != NULL)     t = stpcpy(t, rpmteV(p));
     *t++ = '-';
     if (rpmteR(p) != NULL)     t = stpcpy(t, rpmteR(p));
-/*@=boundswrite@*/
 
     req = rpmdsSingle(RPMTAG_REQUIRENAME, rpmteN(p), reqEVR, reqFlags);
     rc = rpmdsNVRMatchesDep(h, req, _rpmds_nopromote);
@@ -718,11 +657,8 @@ static int ensureOlder(rpmts ts,
  * @param ts           transaction set
  * @param fi           file info set
  */
-/*@-mustmod@*/ /* FIX: fi->actions is modified. */
-/*@-bounds@*/
+/* FIX: fi->actions is modified. */
 static void skipFiles(const rpmts ts, rpmfi fi)
-       /*@globals rpmGlobalMacroContext, h_errno @*/
-       /*@modifies fi, rpmGlobalMacroContext @*/
 {
     uint_32 tscolor = rpmtsColor(ts);
     uint_32 FColor;
@@ -742,15 +678,12 @@ static void skipFiles(const rpmts ts, rpmfi fi)
        noDocs = rpmExpandNumeric("%{_excludedocs}");
 
     {  const char *tmpPath = rpmExpand("%{_netsharedpath}", NULL);
-       /*@-branchstate@*/
        if (tmpPath && *tmpPath != '%')
            netsharedPaths = splitString(tmpPath, strlen(tmpPath), ':');
-       /*@=branchstate@*/
        tmpPath = _free(tmpPath);
     }
 
     s = rpmExpand("%{_install_langs}", NULL);
-    /*@-branchstate@*/
     if (!(s && *s != '%'))
        s = _free(s);
     if (s) {
@@ -758,7 +691,6 @@ static void skipFiles(const rpmts ts, rpmfi fi)
        s = _free(s);
     } else
        languages = NULL;
-    /*@=branchstate@*/
 
     /* Compute directory refcount, skip directory if now empty. */
     dc = rpmfiDC(fi);
@@ -808,27 +740,27 @@ static void skipFiles(const rpmts ts, rpmfi fi)
            len = strlen(*nsp);
            if (dnlen >= len) {
                if (strncmp(dn, *nsp, len))
-                   /*@innercontinue@*/ continue;
+                   continue;
                /* Only directories or complete file paths can be net shared */
                if (!(dn[len] == '/' || dn[len] == '\0'))
-                   /*@innercontinue@*/ continue;
+                   continue;
            } else {
                if (len < (dnlen + bnlen))
-                   /*@innercontinue@*/ continue;
+                   continue;
                if (strncmp(dn, *nsp, dnlen))
-                   /*@innercontinue@*/ continue;
+                   continue;
                /* Insure that only the netsharedpath basename is compared. */
                if ((s = strchr((*nsp) + dnlen, '/')) != NULL && s[1] != '\0')
-                   /*@innercontinue@*/ continue;
+                   continue;
                if (strncmp(bn, (*nsp) + dnlen, bnlen))
-                   /*@innercontinue@*/ continue;
+                   continue;
                len = dnlen + bnlen;
                /* Only directories or complete file paths can be net shared */
                if (!((*nsp)[len] == '/' || (*nsp)[len] == '\0'))
-                   /*@innercontinue@*/ continue;
+                   continue;
            }
 
-           /*@innerbreak@*/ break;
+           break;
        }
 
        if (nsp && *nsp) {
@@ -844,16 +776,16 @@ static void skipFiles(const rpmts ts, rpmfi fi)
            const char **lang, *l, *le;
            for (lang = languages; *lang != NULL; lang++) {
                if (!strcmp(*lang, "all"))
-                   /*@innerbreak@*/ break;
+                   break;
                for (l = fi->flangs[i]; *l != '\0'; l = le) {
                    for (le = l; *le != '\0' && *le != '|'; le++)
                        {};
                    if ((le-l) > 0 && !strncmp(*lang, l, (le-l)))
-                       /*@innerbreak@*/ break;
+                       break;
                    if (*le == '|') le++;       /* skip over | */
                }
                if (*l != '\0')
-                   /*@innerbreak@*/ break;
+                   break;
            }
            if (*lang == NULL) {
                drc[ix]--;      dff[ix] = 1;
@@ -911,38 +843,34 @@ static void skipFiles(const rpmts ts, rpmfi fi)
            int_16 fFMode;
 
            if (XFA_SKIPPING(fi->actions[i]))
-               /*@innercontinue@*/ continue;
+               continue;
 
            fFMode = rpmfiFMode(fi);
 
            if (whatis(fFMode) != XDIR)
-               /*@innercontinue@*/ continue;
+               continue;
            fdn = rpmfiDN(fi);
            if (strlen(fdn) != dnlen)
-               /*@innercontinue@*/ continue;
+               continue;
            if (strncmp(fdn, dn, dnlen))
-               /*@innercontinue@*/ continue;
+               continue;
            fbn = rpmfiBN(fi);
            if (strlen(fbn) != bnlen)
-               /*@innercontinue@*/ continue;
+               continue;
            if (strncmp(fbn, bn, bnlen))
-               /*@innercontinue@*/ continue;
+               continue;
            rpmMessage(RPMMESS_DEBUG, _("excluding directory %s\n"), dn);
            fi->actions[i] = FA_SKIPNSTATE;
-           /*@innerbreak@*/ break;
+           break;
        }
     }
 
-/*@-dependenttrans@*/
     if (netsharedPaths) freeSplitString(netsharedPaths);
 #ifdef DYING   /* XXX freeFi will deal with this later. */
     fi->flangs = _free(fi->flangs);
 #endif
     if (languages) freeSplitString((char **)languages);
-/*@=dependenttrans@*/
 }
-/*@=bounds@*/
-/*@=mustmod@*/
 
 /**
  * Return transaction element's file info.
@@ -950,24 +878,18 @@ static void skipFiles(const rpmts ts, rpmfi fi)
  * @param tsi          transaction element iterator
  * @return             transaction element file info
  */
-static /*@null@*/
+static
 rpmfi rpmtsiFi(const rpmtsi tsi)
-       /*@*/
 {
     rpmfi fi = NULL;
 
     if (tsi != NULL && tsi->ocsave != -1) {
-       /*@-type -abstract@*/ /* FIX: rpmte not opaque */
+       /* FIX: rpmte not opaque */
        rpmte te = rpmtsElement(tsi->ts, tsi->ocsave);
-       /*@-assignexpose@*/
        if (te != NULL && (fi = te->fi) != NULL)
            fi->te = te;
-       /*@=assignexpose@*/
-       /*@=type =abstract@*/
     }
-    /*@-compdef -refcounttrans -usereleased @*/
     return fi;
-    /*@=compdef =refcounttrans =usereleased @*/
 }
 
 /**
@@ -978,9 +900,6 @@ rpmfi rpmtsiFi(const rpmtsi tsi)
  * @return                             RPMRC_OK, or RPMRC_FAIL
  */
 static rpmRC _rpmtsRollback(rpmts rollbackTransaction)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies rollbackTransaction,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     int    rc         = 0;
     int    numAdded   = 0;
@@ -1004,12 +923,12 @@ static rpmRC _rpmtsRollback(rpmts rollbackTransaction)
        switch (rpmteType(te)) {
        case TR_ADDED:
           numAdded++;
-          /*@switchbreak@*/ break;
+          break;
        case TR_REMOVED:
           numRemoved++;
-          /*@switchbreak@*/ break;
+          break;
        default:
-          /*@switchbreak@*/ break;
+          break;
        }       
     }
     tsi = rpmtsiFree(tsi);
@@ -1076,11 +995,11 @@ static rpmRC _rpmtsRollback(rpmts rollbackTransaction)
                rpmMessage(RPMMESS_NORMAL, _("\tRemoving %s:\n"), te->key);
                (void) unlink(te->key); /* XXX: Should check for an error? */
            }
-           /*@switchbreak@*/ break;
+           break;
                                                                                 
        /* Ignore erase elements...nothing to do */
        default:
-           /*@switchbreak@*/ break;
+           break;
        }
     }
     tsi = rpmtsiFree(tsi);
@@ -1103,11 +1022,8 @@ static rpmRC _rpmtsRollback(rpmts rollbackTransaction)
  * @return             RPMRC_NOTFOUND or RPMRC_OK
  */
 static rpmRC getRepackageHeaderFromTE(rpmts ts, rpmte te,
-               /*@out@*/ /*@null@*/ Header *hdrp,
-               /*@out@*/ /*@null@*/ const char **fnp)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, *hdrp, *fnp,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
+               Header *hdrp,
+               const char **fnp)
 {
     int_32 tid;
     const char * name;
@@ -1164,7 +1080,6 @@ static rpmRC getRepackageHeaderFromTE(rpmts ts, rpmte te,
     /* Now walk through index until we find the package (or we have
      * exhausted the index.
      */
-/*@-branchstate@*/
     do {
        /* If index is null we have exhausted the list and need to
         * get out of here...the repackaged package was not found.
@@ -1212,19 +1127,16 @@ static rpmRC getRepackageHeaderFromTE(rpmts ts, rpmte te,
        else
            rpIDT = NULL;
     } while (1);
-/*@=branchstate@*/
 
 exit:
     if (rc != RPMRC_NOTFOUND && h != NULL && hdrp != NULL) {
        rpmMessage(RPMMESS_DEBUG, _("\tRepackaged Package was %s...\n"), rp);
        if (hdrp != NULL)
            *hdrp = headerLink(h);
-/*@-branchstate@*/
        if (fnp != NULL)
            *fnp = rp;
        else
            rp = _free(rp);
-/*@=branchstate@*/
     }
     if (h != NULL)
        h = headerFree(h);
@@ -1243,9 +1155,6 @@ exit:
  */
 static rpmRC _rpmtsAddRollbackElement(rpmts rollbackTransaction,
                rpmts runningTransaction, rpmte te)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies rollbackTransaction, runningTransaction,
-               rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     Header h   = NULL;
     Header rph = NULL;
@@ -1297,7 +1206,7 @@ static rpmRC _rpmtsAddRollbackElement(rpmts rollbackTransaction,
                _("\tAdded from install element %s.\n"), rpmteNEVRA(te));
            rc = rpmtsAddInstallElement(rollbackTransaction, headerLink(rph),
                (fnpyKey) rpn, 1, te->relocs);
-           /*@innerbreak@*/ break;
+           break;
 
        case RPMRC_NOTFOUND:
            /* Add the header as an erase element, we did not
@@ -1307,13 +1216,13 @@ static rpmRC _rpmtsAddRollbackElement(rpmts rollbackTransaction,
            rpmMessage(RPMMESS_DEBUG,
                _("\tAdded from install element %s.\n"), rpmteNEVRA(te));
            rc = rpmtsAddEraseElement(rollbackTransaction, h, db_instance);
-           /*@innerbreak@*/ break;
+           break;
                        
        default:
            /* Not sure what to do on failure...just give up */
            rpmMessage(RPMMESS_FATALERROR,
                _("Could not get repackaged header for auto-rollback transaction!\n"));
-           /*@innerbreak@*/ break;
+           break;
        }
     }  break;
 
@@ -1353,19 +1262,19 @@ static rpmRC _rpmtsAddRollbackElement(rpmts rollbackTransaction,
            if (rc != RPMRC_OK)
                rpmMessage(RPMMESS_FATALERROR,
                    _("Could not add erase element to auto-rollback transaction.\n"));
-           /*@innerbreak@*/ break;
+           break;
 
        case RPMRC_NOTFOUND:
            /* Just did not have a repackaged package */
            rpmMessage(RPMMESS_DEBUG,
                _("\tNo repackaged package...nothing to do.\n"));
            rc = RPMRC_OK;
-           /*@innerbreak@*/ break;
+           break;
 
        default:
            rpmMessage(RPMMESS_FATALERROR,
                _("Failure reading repackaged package!\n"));
-           /*@innerbreak@*/ break;
+           break;
        }
        break;
 
@@ -1391,7 +1300,7 @@ cleanup:
     return rc;
 }
 
-#define        NOTIFY(_ts, _al) /*@i@*/ if ((_ts)->notify) (void) (_ts)->notify _al
+#define        NOTIFY(_ts, _al) if ((_ts)->notify) (void) (_ts)->notify _al
 
 int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
 {
@@ -1430,7 +1339,6 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
     /* If we are in test mode, there is no need to rollback on
      * failure, nor acquire the transaction lock.
      */
-/*@-branchstate@*/
     /* If we are in test mode, then there's no need for transaction lock. */
     if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) {
        rollbackOnFailure = 0;
@@ -1439,7 +1347,6 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet)
        if (lock == NULL)
            return -1;  /* XXX W2DO? */
     }
-/*@=branchstate@*/
 
     if (rpmtsFlags(ts) & RPMTRANS_FLAG_NOSCRIPTS)
        (void) rpmtsSetFlags(ts, (rpmtsFlags(ts) | _noTransScripts | _noTransTriggers));
@@ -1555,7 +1462,7 @@ rpmMessage(RPMMESS_DEBUG, _("sanity checking %d elements\n"), rpmtsNElements(ts)
                        rpmteNEVR(p), rpmteKey(p),
                        NULL, NULL,
                        NULL, 0);
-               /*@innerbreak@*/ break;
+               break;
            }
            mi = rpmdbFreeIterator(mi);
        }
@@ -1609,44 +1516,37 @@ rpmMessage(RPMMESS_DEBUG, _("sanity checking %d elements\n"), rpmtsNElements(ts)
                vsflags = rpmtsSetVSFlags(ts, ovsflags);
                switch (rpmrc) {
                default:
-                   /*@-noeffectuncon@*/ /* FIX: notify annotations */
+                   /* FIX: notify annotations */
                    p->fd = ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE,
                                    0, 0,
                                    rpmteKey(p), ts->notifyData);
-                   /*@=noeffectuncon@*/
                    p->fd = NULL;
-                   /*@switchbreak@*/ break;
+                   break;
                case RPMRC_NOTTRUSTED:
                case RPMRC_NOKEY:
                case RPMRC_OK:
-                   /*@switchbreak@*/ break;
+                   break;
                }
            }
 
-/*@-branchstate@*/
            if (rpmteFd(p) != NULL) {
                fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1);
                if (fi != NULL) {       /* XXX can't happen */
                    fi->te = p;
                    p->fi = fi;
                }
-/*@-compdef -usereleased@*/    /* p->fi->te undefined */
                psm = rpmpsmNew(ts, p, p->fi);
-/*@=compdef =usereleased@*/
 assert(psm != NULL);
                psm->scriptTag = RPMTAG_PRETRANS;
                psm->progTag = RPMTAG_PRETRANSPROG;
                xx = rpmpsmStage(psm, PSM_SCRIPT);
                psm = rpmpsmFree(psm);
 
-/*@-noeffectuncon -compdef -usereleased @*/
                (void) ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,
                                  rpmteKey(p), ts->notifyData);
-/*@=noeffectuncon =compdef =usereleased @*/
                p->fd = NULL;
                p->h = headerFree(p->h);
            }
-/*@=branchstate@*/
        }
        pi = rpmtsiFree(pi);
     }
@@ -1671,7 +1571,6 @@ rpmMessage(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount)
            continue;   /* XXX can't happen */
        fc = rpmfiFC(fi);
 
-       /*@-branchstate@*/
        switch (rpmteType(p)) {
        case TR_ADDED:
            numAdded++;
@@ -1679,13 +1578,12 @@ rpmMessage(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount)
            /* Skip netshared paths, not our i18n files, and excluded docs */
            if (fc > 0)
                skipFiles(ts, fi);
-           /*@switchbreak@*/ break;
+           break;
        case TR_REMOVED:
            numRemoved++;
            fi->record = rpmteDBOffset(p);
-           /*@switchbreak@*/ break;
+           break;
        }
-       /*@=branchstate@*/
 
        fi->fps = (fc > 0 ? xmalloc(fc * sizeof(*fi->fps)) : NULL);
     }
@@ -1694,13 +1592,11 @@ rpmMessage(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount)
     if (!rpmtsChrootDone(ts)) {
        const char * rootDir = rpmtsRootDir(ts);
        xx = chdir("/");
-       /*@-superuser -noeffect @*/
        if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') {
            /* opening db before chroot not optimal, see rhbz#103852 c#3 */
            xx = rpmdbOpenAll(ts->rdb);
            xx = chroot(rootDir);
        }
-       /*@=superuser =noeffect @*/
        (void) rpmtsSetChrootDone(ts, 1);
     }
 
@@ -1722,17 +1618,13 @@ rpmMessage(RPMMESS_DEBUG, _("computing %d file fingerprints\n"), totalFileCount)
 
        (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), 0);
        fpLookupList(fpc, fi->dnl, fi->bnl, fi->dil, fc, fi->fps);
-       /*@-branchstate@*/
        fi = rpmfiInit(fi, 0);
        if (fi != NULL)         /* XXX lclint */
        while ((i = rpmfiNext(fi)) >= 0) {
            if (XFA_SKIPPING(fi->actions[i]))
-               /*@innercontinue@*/ continue;
-           /*@-dependenttrans@*/
+               continue;
            htAddEntry(ts->ht, fi->fps + i, (void *) fi);
-           /*@=dependenttrans@*/
        }
-       /*@=branchstate@*/
        (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_FINGERPRINT), fc);
 
     }
@@ -1793,7 +1685,7 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
                qi = rpmtsiInit(ts);
                while ((q = rpmtsiNext(qi, TR_REMOVED)) != NULL) {
                    if (ro == knownBad)
-                       /*@innerbreak@*/ break;
+                       break;
                    if (rpmteDBOffset(q) == ro)
                        knownBad = ro;
                }
@@ -1815,7 +1707,6 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
        qsort(sharedList, numShared, sizeof(*shared), sharedCmp);
 
        /* For all files from this package that are in the database ... */
-       /*@-branchstate@*/
        for (i = 0; i < numShared; i = nexti) {
            int beingRemoved;
 
@@ -1824,7 +1715,7 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
            /* Find the end of the files in the other package. */
            for (nexti = i + 1; nexti < numShared; nexti++) {
                if (sharedList[nexti].otherPkg != shared->otherPkg)
-                   /*@innerbreak@*/ break;
+                   break;
            }
 
            /* Is this file from a package being removed? */
@@ -1832,9 +1723,9 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
            if (ts->removedPackages != NULL)
            for (j = 0; j < ts->numRemovedPackages; j++) {
                if (ts->removedPackages[j] != shared->otherPkg)
-                   /*@innercontinue@*/ continue;
+                   continue;
                beingRemoved = 1;
-               /*@innerbreak@*/ break;
+               break;
            }
 
            /* Determine the fate of each file. */
@@ -1842,14 +1733,13 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
            case TR_ADDED:
                xx = handleInstInstalledFiles(ts, p, fi, shared, nexti - i,
        !(beingRemoved || (rpmtsFilterFlags(ts) & RPMPROB_FILTER_REPLACEOLDFILES)));
-               /*@switchbreak@*/ break;
+               break;
            case TR_REMOVED:
                if (!beingRemoved)
                    xx = handleRmvdInstalledFiles(ts, fi, shared, nexti - i);
-               /*@switchbreak@*/ break;
+               break;
            }
        }
-       /*@=branchstate@*/
 
        free(sharedList);
 
@@ -1860,9 +1750,9 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
        switch (rpmteType(p)) {
        case TR_ADDED:
            rpmtsCheckDSIProblems(ts, p);
-           /*@switchbreak@*/ break;
+           break;
        case TR_REMOVED:
-           /*@switchbreak@*/ break;
+           break;
        }
        /* check for s-bit files to be removed */
        if (rpmteType(p) == TR_REMOVED) {
@@ -1886,10 +1776,8 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
     if (rpmtsChrootDone(ts)) {
        const char * rootDir = rpmtsRootDir(ts);
        const char * currDir = rpmtsCurrDir(ts);
-       /*@-superuser -noeffect @*/
        if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
            xx = chroot(".");
-       /*@=superuser =noeffect @*/
        (void) rpmtsSetChrootDone(ts, 0);
        if (currDir != NULL)
            xx = chdir(currDir);
@@ -1990,10 +1878,10 @@ rpmMessage(RPMMESS_DEBUG, _("computing file dispositions\n"));
                continue;       /* XXX can't happen */
            switch (rpmteType(p)) {
            case TR_ADDED:
-               /*@switchbreak@*/ break;
+               break;
            case TR_REMOVED:
                if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_REPACKAGE))
-                   /*@switchbreak@*/ break;
+                   break;
                if (!progress)
                    NOTIFY(ts, (NULL, RPMCALLBACK_REPACKAGE_START,
                                7, numRemoved, NULL, ts->notifyData));
@@ -2018,7 +1906,7 @@ assert(psm != NULL);
 
                (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_REPACKAGE), 0);
 
-               /*@switchbreak@*/ break;
+               break;
            }
        }
        pi = rpmtsiFree(pi);
@@ -2033,7 +1921,7 @@ assert(psm != NULL);
      */
     lastFailKey = (alKey)-2;   /* erased packages have -1 */
     pi = rpmtsiInit(ts);
-    /*@-branchstate@*/ /* FIX: fi reload needs work */
+    /* FIX: fi reload needs work */
     while ((p = rpmtsiNext(pi, 0)) != NULL) {
        alKey pkgKey;
        int gotfd;
@@ -2057,12 +1945,11 @@ assert(psm != NULL);
                rpmteNEVR(p), rpmteA(p), rpmteO(p), rpmteColor(p));
 
            p->h = NULL;
-           /*@-type@*/ /* FIX: rpmte not opaque */
+           /* FIX: rpmte not opaque */
            {
-               /*@-noeffectuncon@*/ /* FIX: notify annotations */
+               /* FIX: notify annotations */
                p->fd = ts->notify(p->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0,
                                rpmteKey(p), ts->notifyData);
-               /*@=noeffectuncon@*/
                if (rpmteFd(p) != NULL) {
                    rpmVSFlags ovsflags = rpmtsVSFlags(ts);
                    rpmVSFlags vsflags = ovsflags | RPMVSF_NEEDPAYLOAD;
@@ -2075,11 +1962,10 @@ assert(psm != NULL);
 
                    switch (rpmrc) {
                    default:
-                       /*@-noeffectuncon@*/ /* FIX: notify annotations */
+                       /* FIX: notify annotations */
                        p->fd = ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE,
                                        0, 0,
                                        rpmteKey(p), ts->notifyData);
-                       /*@=noeffectuncon@*/
                        p->fd = NULL;
                        ourrc++;
 
@@ -2099,16 +1985,15 @@ assert(psm != NULL);
                            xx = _rpmtsRollback(rollbackTransaction);
                            return -1;
                        }
-                       /*@innerbreak@*/ break;
+                       break;
                    case RPMRC_NOTTRUSTED:
                    case RPMRC_NOKEY:
                    case RPMRC_OK:
-                       /*@innerbreak@*/ break;
+                       break;
                    }
                    if (rpmteFd(p) != NULL) gotfd = 1;
                }
            }
-           /*@=type@*/
 
            if (rpmteFd(p) != NULL) {
                /*
@@ -2139,9 +2024,8 @@ assert(psm != NULL);
                    fi->fstates = NULL;
                    fi->actions = NULL;
                    fi->replaced = NULL;
-/*@-nullstate@*/ /* FIX: fi->actions is NULL */
+/* FIX: fi->actions is NULL */
                    fi = rpmfiFree(fi);
-/*@=nullstate@*/
 
                    savep = rpmtsSetRelocateElement(ts, p);
                    fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1);
@@ -2162,7 +2046,7 @@ assert(psm != NULL);
                }
                psm->fi = rpmfiLink(p->fi, NULL);
 
-/*@-nullstate@*/ /* FIX: psm->fi may be NULL */
+/* FIX: psm->fi may be NULL */
                if (rpmpsmStage(psm, PSM_PKGINSTALL)) {
                    ourrc++;
                    lastFailKey = pkgKey;
@@ -2206,7 +2090,6 @@ assert(psm != NULL);
                        return -1;
                    }
                }
-/*@=nullstate@*/
            } else {
                ourrc++;
                lastFailKey = pkgKey;
@@ -2230,20 +2113,17 @@ assert(psm != NULL);
            }
 
            if (gotfd) {
-               /*@-noeffectuncon @*/ /* FIX: check rc */
+               /* FIX: check rc */
                (void) ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,
                        rpmteKey(p), ts->notifyData);
-               /*@=noeffectuncon @*/
-               /*@-type@*/
                p->fd = NULL;
-               /*@=type@*/
            }
 
            p->h = headerFree(p->h);
 
            (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_INSTALL), 0);
 
-           /*@switchbreak@*/ break;
+           break;
 
        case TR_REMOVED:
            (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_ERASE), 0);
@@ -2302,22 +2182,19 @@ assert(psm != NULL);
 
            (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_ERASE), 0);
 
-           /*@switchbreak@*/ break;
+           break;
        }
        xx = rpmdbSync(rpmtsGetRdb(ts));
 
-/*@-nullstate@*/ /* FIX: psm->fi may be NULL */
+/* FIX: psm->fi may be NULL */
        psm = rpmpsmFree(psm);
-/*@=nullstate@*/
 
 #ifdef DYING
-/*@-type@*/ /* FIX: p is almost opaque */
+/* FIX: p is almost opaque */
        p->fi = rpmfiFree(p->fi);
-/*@=type@*/
 #endif
 
     }
-    /*@=branchstate@*/
     pi = rpmtsiFree(pi);
 
     /* If we created a rollback transaction lets get rid of it */
@@ -2356,11 +2233,11 @@ assert(psm != NULL);
                    p->fd = ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE,
                                    0, 0, rpmteKey(p), ts->notifyData);
                    p->fd = NULL;
-                   /*@switchbreak@*/ break;
+                   break;
                case RPMRC_NOTTRUSTED:
                case RPMRC_NOKEY:
                case RPMRC_OK:
-                   /*@switchbreak@*/ break;
+                   break;
                }
            }
 
@@ -2368,19 +2245,15 @@ assert(psm != NULL);
                p->fi = rpmfiNew(ts, p->h, RPMTAG_BASENAMES, 1);
                if (p->fi != NULL)      /* XXX can't happen */
                    p->fi->te = p;
-/*@-compdef -usereleased@*/    /* p->fi->te undefined */
                psm = rpmpsmNew(ts, p, p->fi);
-/*@=compdef =usereleased@*/
 assert(psm != NULL);
                psm->scriptTag = RPMTAG_POSTTRANS;
                psm->progTag = RPMTAG_POSTTRANSPROG;
                xx = rpmpsmStage(psm, PSM_SCRIPT);
                psm = rpmpsmFree(psm);
 
-/*@-noeffectuncon -compdef -usereleased @*/
                (void) ts->notify(p->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,
                                  rpmteKey(p), ts->notifyData);
-/*@=noeffectuncon =compdef =usereleased @*/
                p->fd = NULL;
                p->fi = rpmfiFree(p->fi);
                p->h = headerFree(p->h);
@@ -2391,10 +2264,9 @@ assert(psm != NULL);
 
     rpmtsFreeLock(lock);
 
-    /*@-nullstate@*/ /* FIX: ts->flList may be NULL */
+    /* FIX: ts->flList may be NULL */
     if (ourrc)
        return -1;
     else
        return 0;
-    /*@=nullstate@*/
 }
index b6a8bf6..484de16 100644 (file)
 #include "ugid.h"
 #include "debug.h"
 
-/*@access rpmps @*/
-/*@access rpmProblem @*/
-/*@access rpmpsm @*/   /* XXX for %verifyscript through rpmpsmStage() */
-
 #define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m)))
 
-/*@unchecked@*/
 extern int _rpmds_unspecified_epoch_noise;
 
 int rpmVerifyFile(const rpmts ts, const rpmfi fi,
@@ -36,7 +31,6 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
     int rc;
 
     /* Prepend the path to root (if specified). */
-/*@-bounds@*/
     if (rootDir && *rootDir != '\0'
      && !(rootDir[0] == '/' && rootDir[1] == '\0'))
     {
@@ -54,7 +48,6 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
        t = stpcpy(t, fn);
        fn = tb;
     }
-/*@=bounds@*/
 
     *res = RPMVERIFY_NONE;
 
@@ -67,7 +60,7 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
     case RPMFILE_STATE_NOTINSTALLED:
     case RPMFILE_STATE_WRONGCOLOR:
        return 0;
-       /*@notreached@*/ break;
+       break;
     case RPMFILE_STATE_NORMAL:
        break;
     }
@@ -114,7 +107,6 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
      */
     flags &= ~(omitMask | RPMVERIFY_FAILURES);
 
-/*@=branchstate@*/
 
     if (flags & RPMVERIFY_MD5) {
        unsigned char md5sum[16];
@@ -217,11 +209,8 @@ int rpmVerifyFile(const rpmts ts, const rpmfi fi,
  * @param scriptFd      file handle to use for stderr (or NULL)
  * @return              0 on success
  */
-static int rpmVerifyScript(/*@unused@*/ QVA_t qva, rpmts ts,
-               rpmfi fi, /*@null@*/ FD_t scriptFd)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fi, scriptFd, rpmGlobalMacroContext,
-               fileSystem, internalState @*/
+static int rpmVerifyScript(QVA_t qva, rpmts ts,
+               rpmfi fi, FD_t scriptFd)
 {
     rpmpsm psm = rpmpsmNew(ts, NULL, fi);
     int rc = 0;
@@ -253,13 +242,10 @@ static int rpmVerifyScript(/*@unused@*/ QVA_t qva, rpmts ts,
  * @return             0 no problems, 1 problems found
  */
 static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
-       /*@globals h_errno, fileSystem, internalState @*/
-       /*@modifies ts, fi, fileSystem, internalState  @*/
 {
     rpmVerifyAttrs verifyResult = 0;
-    /*@-type@*/ /* FIX: union? */
+    /* FIX: union? */
     rpmVerifyAttrs omitMask = ((qva->qva_flags & VERIFY_ATTRS) ^ VERIFY_ATTRS);
-    /*@=type@*/
     int ec = 0;                /* assume no problems */
     char * t, * te;
     char buf[BUFSIZ];
@@ -282,9 +268,7 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
        && (fileAttrs & RPMFILE_GHOST))
            continue;
 
-/*@-boundswrite@*/
        rc = rpmVerifyFile(ts, fi, &verifyResult, omitMask);
-/*@=boundswrite@*/
        if (rc) {
            if (!(fileAttrs & (RPMFILE_MISSINGOK|RPMFILE_GHOST)) || rpmIsVerbose()) {
                sprintf(te, _("missing   %c %s"),
@@ -306,8 +290,8 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
        } else if (verifyResult || rpmIsVerbose()) {
            const char * size, * MD5, * link, * mtime, * mode;
            const char * group, * user, * rdev;
-           /*@observer@*/ static const char *const aok = ".";
-           /*@observer@*/ static const char *const unknown = "?";
+           static const char *const aok = ".";
+           static const char *const unknown = "?";
 
            ec = 1;
 
@@ -345,7 +329,6 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
            te += strlen(te);
        }
 
-/*@-boundswrite@*/
        if (te > t) {
            *te++ = '\n';
            *te = '\0';
@@ -353,7 +336,6 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
            te = t = buf;
            *t = '\0';
        }
-/*@=boundswrite@*/
     }
     fi = rpmfiUnlink(fi, "verifyHeader");
        
@@ -367,10 +349,8 @@ static int verifyHeader(QVA_t qva, const rpmts ts, rpmfi fi)
  * @param h            header
  * @return             0 no problems, 1 problems found
  */
-static int verifyDependencies(/*@unused@*/ QVA_t qva, rpmts ts,
+static int verifyDependencies(QVA_t qva, rpmts ts,
                Header h)
-       /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
-       /*@modifies ts, h, rpmGlobalMacroContext, fileSystem, internalState @*/
 {
     rpmps ps;
     int numProblems;
@@ -385,7 +365,6 @@ static int verifyDependencies(/*@unused@*/ QVA_t qva, rpmts ts,
     ps = rpmtsProblems(ts);
 
     numProblems = rpmpsNumProblems(ps);
-    /*@-branchstate@*/
     if (ps != NULL && numProblems > 0) {
        const char * pkgNEVR, * altNEVR;
        rpmProblem p;
@@ -398,7 +377,6 @@ static int verifyDependencies(/*@unused@*/ QVA_t qva, rpmts ts,
            nb += strlen(altNEVR+2) + sizeof(", ") - 1;
        }
        te = t = alloca(nb);
-/*@-boundswrite@*/
        *te = '\0';
        pkgNEVR = (ps->probs->pkgNEVR ? ps->probs->pkgNEVR : "?pkgNEVR?");
        sprintf(te, _("Unsatisfied dependencies for %s: "), pkgNEVR);
@@ -418,10 +396,8 @@ static int verifyDependencies(/*@unused@*/ QVA_t qva, rpmts ts,
            te = t;
            *t = '\0';
        }
-/*@=boundswrite@*/
        rc = 1;
     }
-    /*@=branchstate@*/
 
     ps = rpmpsFree(ps);
 
@@ -442,13 +418,11 @@ int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
 
        if (qva->qva_flags & VERIFY_DEPS) {
            int save_noise = _rpmds_unspecified_epoch_noise;
-/*@-mods@*/
            if (rpmIsVerbose())
                _rpmds_unspecified_epoch_noise = 1;
            if ((rc = verifyDependencies(qva, ts, h)) != 0)
                ec = rc;
            _rpmds_unspecified_epoch_noise = save_noise;
-/*@=mods@*/
        }
        if (qva->qva_flags & VERIFY_FILES) {
            if ((rc = verifyHeader(qva, ts, fi)) != 0)