More branchstate lclint annotations.
authorjbj <devnull@localhost>
Mon, 15 Oct 2001 19:27:13 +0000 (19:27 +0000)
committerjbj <devnull@localhost>
Mon, 15 Oct 2001 19:27:13 +0000 (19:27 +0000)
CVS patchset: 5114
CVS date: 2001/10/15 19:27:13

lib/rpmrc.c
lib/transaction.c
rpmdb/rpmdb.c
rpmio/rpmio.c

index e379dd6..5105ff4 100644 (file)
@@ -1,4 +1,3 @@
-/*@-branchstate@*/
 #include "system.h"
 
 #include <stdarg.h>
@@ -653,6 +652,7 @@ int rpmReadRC(const char * rcfiles)
     rpmSetMachine(NULL, NULL); /* XXX WTFO? Why bother? */
 
     {  const char *mfpath;
+       /*@-branchstate@*/
        if ((mfpath = rpmGetVar(RPMVAR_MACROFILES)) != NULL) {
            mfpath = xstrdup(mfpath);
 /*@-globs@*/ /* FIX: rpmGlobalMacroContext not in <rpmlib.h> */
@@ -660,6 +660,7 @@ int rpmReadRC(const char * rcfiles)
 /*@=globs@*/
            mfpath = _free(mfpath);
        }
+       /*@=branchstate@*/
     }
 
     return rc;
@@ -699,6 +700,7 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
     next[nb + 1] = '\0';
   }
 
+    /*@-branchstate@*/
     while (*next != '\0') {
        linenum++;
 
@@ -880,6 +882,7 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn)
            }
        }
     }
+    /*@=branchstate@*/
 
     return 0;
 }
@@ -1105,6 +1108,7 @@ 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);
@@ -1120,6 +1124,7 @@ 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*/
@@ -1314,7 +1319,9 @@ 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;
     }
 }
@@ -1502,6 +1509,7 @@ 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 */
@@ -1530,6 +1538,7 @@ 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) {
@@ -1574,10 +1583,12 @@ 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);
@@ -1710,4 +1721,3 @@ int rpmShowRC(FILE * fp)
 
     return 0;
 }
-/*@=branchstate@*/
index 6485427..641df90 100644 (file)
@@ -1,4 +1,3 @@
-/*@-branchstate@*/
 /** \ingroup rpmtrans
  * \file lib/transaction.c
  */
@@ -414,18 +413,22 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi,
        /* FIXME: Trailing /'s will confuse us greatly. Internal ones will 
           too, but those are more trouble to fix up. :-( */
        t = alloca_strdup(rawRelocations[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 (rawRelocations[i].newPath) {
            int del;
 
            t = alloca_strdup(rawRelocations[i].newPath);
+           /*@-branchstate@*/
            relocations[i].newPath = (t[0] == '/' && t[1] == '\0')
                ? t
                : stripTrailingChar(t, '/');
+           /*@=branchstate@*/
 
            /*@-nullpass@*/     /* FIX:  relocations[i].oldPath == NULL */
            /* Verify that the relocation's old path is in the header. */
@@ -554,10 +557,12 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi,
 
        len = reldel +
                strlen(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1;
+       /*@-branchstate@*/
        if (len >= fileAlloced) {
            fileAlloced = len * 2;
            fn = xrealloc(fn, fileAlloced);
        }
+       /*@=branchstate@*/
        *fn = '\0';
        fnlen = stpcpy( stpcpy(fn, dirNames[dirIndexes[i]]), baseNames[i]) - fn;
 
@@ -770,6 +775,7 @@ static int psTrim(rpmProblemSet filter, rpmProblemSet target)
     rpmProblem t = target->probs;
     int gotProblems = 0;
 
+    /*@-branchstate@*/
     while ((f - filter->probs) < filter->numProblems) {
        if (!f->ignoreProblem) {
            f++;
@@ -793,6 +799,7 @@ static int psTrim(rpmProblemSet filter, rpmProblemSet target)
        t->ignoreProblem = f->ignoreProblem;
        t++, f++;
     }
+    /*@=branchstate@*/
 
     if ((t - target->probs) < target->numProblems)
        gotProblems = 1;
@@ -1095,10 +1102,12 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht,
            continue;
 
        j = strlen(fi->dnl[fi->dil[i]]) + strlen(fi->bnl[i]) + 1;
+       /*@-branchstate@*/
        if (j > fileSpecAlloced) {
            fileSpecAlloced = j * 2;
            filespec = xrealloc(filespec, fileSpecAlloced);
        }
+       /*@=branchstate@*/
 
        (void) stpcpy( stpcpy( filespec, fi->dnl[fi->dil[i]]), fi->bnl[i]);
 
@@ -1316,12 +1325,15 @@ static void skipFiles(const rpmTransactionSet ts, TFI_t 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) {
@@ -1329,6 +1341,7 @@ static void skipFiles(const rpmTransactionSet ts, TFI_t fi)
        s = _free(s);
     } else
        languages = NULL;
+    /*@=branchstate@*/
 
     /* Compute directory refcount, skip directory if now empty. */
     drc = alloca(fi->dc * sizeof(*drc));
@@ -1505,12 +1518,14 @@ static /*@dependent@*/ struct availablePackage * tsGetAlp(void * a)
     struct availablePackage * alp = NULL;
     int oc = iter->ocsave;
 
+    /*@-branchstate@*/
     if (oc != -1) {
        rpmTransactionSet ts = iter->ts;
        TFI_t fi = ts->flList + oc;
        if (ts->addedPackages.list && fi->type == TR_ADDED)
            alp = ts->addedPackages.list + ts->order[oc].u.addedIndex;
     }
+    /*@=branchstate@*/
     return alp;
 }
 
@@ -1760,6 +1775,7 @@ int rpmRunTransactions(   rpmTransactionSet ts,
 
        /* XXX watchout: fi->type must be set for tsGetAlp() to "work" */
        fi->type = ts->order[oc].type;
+       /*@-branchstate@*/
        switch (fi->type) {
        case TR_ADDED:
            i = ts->order[oc].u.addedIndex;
@@ -1798,6 +1814,7 @@ int rpmRunTransactions(   rpmTransactionSet ts,
            loadFi(fi->h, fi);
            /*@switchbreak@*/ break;
        }
+       /*@=branchstate@*/
 
        if (fi->fc)
            fi->fps = xmalloc(fi->fc * sizeof(*fi->fps));
@@ -2053,6 +2070,7 @@ assert(alp == fi->ap);
            i = alp - ts->addedPackages.list;
 
            h = headerLink(fi->h);
+           /*@-branchstate@*/
            if (alp->fd == NULL) {
                alp->fd = ts->notify(fi->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0,
                            alp->key, ts->notifyData);
@@ -2078,6 +2096,7 @@ assert(alp == fi->ap);
                    if (alp->fd) gotfd = 1;
                }
            }
+           /*@=branchstate@*/
 
            if (alp->fd) {
                Header hsave = NULL;
@@ -2142,4 +2161,3 @@ assert(alp == fi->ap);
        return 0;
     /*@=nullstate@*/
 }
-/*@=branchstate@*/
index a9106c8..1703f22 100644 (file)
@@ -1,4 +1,3 @@
-/*@-branchstate@*/
 /** \ingroup rpmdb dbi
  * \file rpmdb/rpmdb.c
  */
@@ -544,7 +543,9 @@ static int dbiSearch(dbiIndex dbi, DBC * dbcursor,
            }
            break;
        }
+       /*@-branchstate@*/
        if (setp) *setp = set;
+       /*@=branchstate@*/
     }
     return rc;
 }
@@ -1122,6 +1123,7 @@ static int rpmdbFindByFile(rpmdb db, /*@null@*/ const char * filespec,
 
     *matches = NULL;
     if (filespec == NULL) return -2;
+    /*@-branchstate@*/
     if ((baseName = strrchr(filespec, '/')) != NULL) {
        char * t;
        size_t len;
@@ -1135,6 +1137,7 @@ static int rpmdbFindByFile(rpmdb db, /*@null@*/ const char * filespec,
        dirName = "";
        baseName = filespec;
     }
+    /*@=branchstate@*/
     if (baseName == NULL)
        return -2;
 
@@ -1302,6 +1305,7 @@ static int dbiFindMatches(dbiIndex dbi, DBC * dbcursor,
     gotMatches = 0;
 
     /* Make sure the version and release match. */
+    /*@-branchstate@*/
     for (i = 0; i < dbiIndexSetCount(*matches); i++) {
        unsigned int recoff = dbiIndexRecordOffset(*matches, i);
        Header h;
@@ -1340,6 +1344,7 @@ static int dbiFindMatches(dbiIndex dbi, DBC * dbcursor,
 
        h = headerFree(h);
     }
+    /*@=branchstate@*/
 
     if (gotMatches) {
        (*matches)->count = gotMatches;
@@ -1527,12 +1532,14 @@ rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
        return mi;
 
     dbi = dbiOpen(mi->mi_rpmdb, RPMDBI_PACKAGES, 0);
+    /*@-branchstate@*/
     if (mi->mi_h) {
        if (dbi && mi->mi_dbc && mi->mi_modified && mi->mi_prevoffset) {
            xx = dbiUpdateRecord(dbi, mi->mi_dbc, mi->mi_prevoffset, mi->mi_h);
        }
        mi->mi_h = headerFree(mi->mi_h);
     }
+    /*@=branchstate@*/
     if (dbi) {
        if (dbi->dbi_rmw)
            xx = dbiCclose(dbi, dbi->dbi_rmw, 0);
@@ -1554,8 +1561,10 @@ rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
 
     mi->mi_release = _free(mi->mi_release);
     mi->mi_version = _free(mi->mi_version);
+    /*@-branchstate@*/
     if (dbi && mi->mi_dbc)
        xx = dbiCclose(dbi, mi->mi_dbc, DBI_ITERATOR);
+    /*@=branchstate@*/
     mi->mi_dbc = NULL;
     mi->mi_set = dbiFreeIndexSet(mi->mi_set);
     mi->mi_keyp = _free(mi->mi_keyp);
@@ -1781,6 +1790,7 @@ int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTag tag,
     if (mode == RPMMIRE_DEFAULT)
        mode = defmode;
 
+    /*@-branchstate@*/
     switch (mode) {
     case RPMMIRE_DEFAULT:
     case RPMMIRE_STRCMP:
@@ -1803,6 +1813,7 @@ int rpmdbSetIteratorRE(rpmdbMatchIterator mi, rpmTag tag,
        rc = -1;
        break;
     }
+    /*@=branchstate@*/
 
     if (rc) {
        /*@=kepttrans@*/        /* FIX: mire has kept values */
@@ -2065,7 +2076,9 @@ if (dbi->dbi_api == 1 && dbi->dbi_rpmtag == RPMDBI_PACKAGES && rc == EFAULT) {
 
     mi->mi_h = headerCopyLoad(uh);
     /* XXX db1 with hybrid, simulated db interface on falloc.c needs free. */
+    /*@-branchstate@*/
     if (dbi->dbi_api == 1) uh = _free(uh);
+    /*@=branchstate@*/
 
     /* Did the header load correctly? */
     if (mi->mi_h == NULL || !headerIsEntry(mi->mi_h, RPMTAG_NAME)) {
@@ -2375,6 +2388,7 @@ int rpmdbRemove(rpmdb db, /*@unused@*/ int rid, unsigned int hdrNum)
            dbi = NULL;
            rpmtag = dbiTags[dbix];
 
+           /*@-branchstate@*/
            switch (rpmtag) {
            /* Filter out temporary databases */
            case RPMDBI_AVAILABLE:
@@ -2396,6 +2410,7 @@ int rpmdbRemove(rpmdb db, /*@unused@*/ int rid, unsigned int hdrNum)
                continue;
                /*@notreached@*/ /*@switchbreak@*/ break;
            }
+           /*@=branchstate@*/
        
            if (!hge(h, rpmtag, &rpmtype, (void **) &rpmvals, &rpmcnt))
                continue;
@@ -2510,8 +2525,10 @@ static INLINE int addIndexEntry(dbiIndex dbi, DBC * dbcursor,
     } else {
 
        /* With duplicates, cursor is positioned, discard the record. */
+       /*@-branchstate@*/
        if (rc == 0 && dbi->dbi_permit_dups)
            set = dbiFreeIndexSet(set);
+       /*@=branchstate@*/
 
        if (set == NULL || rc < 0) {            /* not found */
            rc = 0;
@@ -2575,6 +2592,7 @@ int rpmdbAdd(rpmdb db, int iid, Header h)
        size_t datalen = 0;
 
       dbi = dbiOpen(db, RPMDBI_PACKAGES, 0);
+      /*@-branchstate@*/
       if (dbi != NULL) {
 
        /* XXX db0: hack to pass sizeof header to fadAlloc */
@@ -2606,6 +2624,7 @@ int rpmdbAdd(rpmdb db, int iid, Header h)
        xx = dbiCclose(dbi, dbcursor, DBI_WRITECURSOR);
        dbcursor = NULL;
       }
+      /*@=branchstate@*/
 
     }
 
@@ -2674,6 +2693,7 @@ int rpmdbAdd(rpmdb db, int iid, Header h)
                /*@switchbreak@*/ break;
            }
 
+           /*@-branchstate@*/
            if (rpmcnt <= 0) {
                if (rpmtag != RPMTAG_GROUP)
                    continue;
@@ -2683,6 +2703,7 @@ int rpmdbAdd(rpmdb db, int iid, Header h)
                rpmvals = (const char **) "Unknown";
                rpmcnt = 1;
            }
+           /*@=branchstate@*/
 
          dbi = dbiOpen(db, rpmtag, 0);
          if (dbi != NULL) {
@@ -2893,6 +2914,7 @@ int rpmdbFindFpList(rpmdb db, fingerPrint * fpList, dbiIndexSet * matchList,
 char * db1basename (int rpmtag)
 {
     char * base = NULL;
+    /*@-branchstate@*/
     switch (rpmtag) {
     case RPMDBI_PACKAGES:      base = "packages.rpm";          break;
     case RPMTAG_NAME:          base = "nameindex.rpm";         break;
@@ -2908,6 +2930,7 @@ char * db1basename (int rpmtag)
        (void) stpcpy( stpcpy(base, tn), ".idx");
       }        break;
     }
+    /*@=branchstate@*/
     return xstrdup(base);
 }
 
@@ -2921,6 +2944,7 @@ static int rpmdbRemoveDatabase(const char * prefix,
     int xx;
 
     i = strlen(dbpath);
+    /*@-branchstate@*/
     if (dbpath[i - 1] != '/') {
        filename = alloca(i);
        strcpy(filename, dbpath);
@@ -2928,6 +2952,7 @@ static int rpmdbRemoveDatabase(const char * prefix,
        filename[i + 1] = '\0';
        dbpath = filename;
     }
+    /*@=branchstate@*/
     
     filename = alloca(strlen(prefix) + strlen(dbpath) + 40);
 
@@ -2985,6 +3010,7 @@ static int rpmdbMoveDatabase(const char * prefix,
     int xx;
  
     i = strlen(olddbpath);
+    /*@-branchstate@*/
     if (olddbpath[i - 1] != '/') {
        ofilename = alloca(i + 2);
        strcpy(ofilename, olddbpath);
@@ -2992,8 +3018,10 @@ static int rpmdbMoveDatabase(const char * prefix,
        ofilename[i + 1] = '\0';
        olddbpath = ofilename;
     }
+    /*@=branchstate@*/
     
     i = strlen(newdbpath);
+    /*@-branchstate@*/
     if (newdbpath[i - 1] != '/') {
        nfilename = alloca(i + 2);
        strcpy(nfilename, newdbpath);
@@ -3001,6 +3029,7 @@ static int rpmdbMoveDatabase(const char * prefix,
        nfilename[i + 1] = '\0';
        newdbpath = nfilename;
     }
+    /*@=branchstate@*/
     
     ofilename = alloca(strlen(prefix) + strlen(olddbpath) + 40);
     nfilename = alloca(strlen(prefix) + strlen(newdbpath) + 40);
@@ -3117,7 +3146,9 @@ int rpmdbRebuild(const char * prefix)
     int _dbapi;
     int _dbapi_rebuild;
 
+    /*@-branchstate@*/
     if (prefix == NULL) prefix = "/";
+    /*@=branchstate@*/
 
     _dbapi = rpmExpandNumeric("%{_dbapi}");
     _dbapi_rebuild = rpmExpandNumeric("%{_dbapi_rebuild}");
@@ -3296,4 +3327,3 @@ exit:
     return rc;
 }
 /*@=globs@*/
-/*@=branchstate@*/
index 4362857..9c3ccdf 100644 (file)
@@ -1,4 +1,3 @@
-/*@-branchstate@*/
 /** \ingroup rpmio
  * \file rpmio/rpmio.c
  */
@@ -673,6 +672,7 @@ const char *const ftpStrerror(int errorNumber) {
 const char *urlStrerror(const char *url)
 {
     const char *retstr;
+    /*@-branchstate@*/
     switch (urlIsURL(url)) {
     case URL_IS_FTP:
     case URL_IS_HTTP:
@@ -687,6 +687,7 @@ const char *urlStrerror(const char *url)
        retstr = strerror(errno);
        break;
     }
+    /*@=branchstate@*/
     return retstr;
 }
 
@@ -1032,9 +1033,12 @@ static int ftpLogin(urlinfo u)
 
     if ((port = (u->proxyp > 0 ? u->proxyp : u->port)) < 0) port = IPPORT_FTP;
 
+    /*@-branchstate@*/
     if ((user = (u->proxyu ? u->proxyu : u->user)) == NULL)
        user = "anonymous";
+    /*@=branchstate@*/
 
+    /*@-branchstate@*/
     if ((password = u->password) == NULL) {
        uid_t uid = getuid();
        struct passwd * pw;
@@ -1047,9 +1051,12 @@ static int ftpLogin(urlinfo u)
            password = "root@";
        }
     }
+    /*@=branchstate@*/
 
+    /*@-branchstate@*/
     if (fdFileno(u->ctrl) >= 0 && fdWritable(u->ctrl, 0) < 1)
        /*@-refcounttrans@*/ (void) fdClose(u->ctrl); /*@=refcounttrans@*/
+    /*@=branchstate@*/
 
 /*@-usereleased@*/
     if (fdFileno(u->ctrl) < 0) {
@@ -1079,8 +1086,10 @@ errxit:
     fdSetSyserrno(u->ctrl, errno, ftpStrerror(rc));
     /*@=observertrans@*/
 errxit2:
+    /*@-branchstate@*/
     if (fdFileno(u->ctrl) >= 0)
        /*@-refcounttrans@*/ (void) fdClose(u->ctrl); /*@=refcounttrans@*/
+    /*@=branchstate@*/
     /*@-compdef@*/
     return rc;
     /*@=compdef@*/
@@ -1220,8 +1229,10 @@ errxit:
     /*@-observertrans@*/
     fdSetSyserrno(u->ctrl, errno, ftpStrerror(rc));
     /*@=observertrans@*/
+    /*@-branchstate@*/
     if (fdFileno(data) >= 0)
        /*@-refcounttrans@*/ (void) fdClose(data); /*@=refcounttrans@*/
+    /*@=branchstate@*/
     return rc;
 }
 
@@ -1505,12 +1516,16 @@ static int httpReq(FD_t ctrl, const char * httpCmd, const char * httpArg)
 
     if ((port = (u->proxyp > 0 ? u->proxyp : u->port)) < 0) port = 80;
     path = (u->proxyh || u->proxyp > 0) ? u->url : httpArg;
+    /*@-branchstate@*/
     if (path == NULL) path = "";
+    /*@=branchstate@*/
 
 reopen:
+    /*@-branchstate@*/
     if (fdFileno(ctrl) >= 0 && (rc = fdWritable(ctrl, 0)) < 1) {
        /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
     }
+    /*@=branchstate@*/
 
 /*@-usereleased@*/
     if (fdFileno(ctrl) < 0) {
@@ -1560,6 +1575,7 @@ fprintf(stderr, "-> %s", req);
        goto errxit;
     }
 
+    /*@-branchstate@*/
     if (!strcmp(httpCmd, "PUT")) {
        ctrl->wr_chunked = 1;
     } else {
@@ -1575,6 +1591,7 @@ fprintf(stderr, "-> %s", req);
            goto errxit;
        }
     }
+    /*@=branchstate@*/
 
     ctrl = fdLink(ctrl, "open data (httpReq)");
     return 0;
@@ -1584,8 +1601,10 @@ errxit:
     fdSetSyserrno(ctrl, errno, ftpStrerror(rc));
     /*@=observertrans@*/
 errxit2:
+    /*@-branchstate@*/
     if (fdFileno(ctrl) >= 0)
        /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
+    /*@=branchstate@*/
     return rc;
 /*@=usereleased@*/
 }
@@ -1749,6 +1768,7 @@ static inline int ufdSeek(void * cookie, _libio_pos_t pos, int whence)
     return fdSeek(cookie, pos, whence);
 }
 
+/*@-branchstate@*/
 /*@-usereleased@*/     /* LCL: fd handling is tricky here. */
 int ufdClose( /*@only@*/ void * cookie)
 {
@@ -1756,6 +1776,7 @@ int ufdClose( /*@only@*/ void * cookie)
 
     UFDONLY(fd);
 
+    /*@-branchstate@*/
     if (fd->url) {
        urlinfo u = fd->url;
 
@@ -1863,6 +1884,7 @@ fprintf(stderr, "-> \r\n");
     return fdClose(fd);
 }
 /*@=usereleased@*/
+/*@=branchstate@*/
 
 /*@-nullstate@*/       /* FIX: u->{ctrl,data}->url undef after XurlLink. */
 /*@null@*/ FD_t ftpOpen(const char *url, /*@unused@*/ int flags,
@@ -2601,6 +2623,7 @@ DBGIO(fd, (stderr, "==> Fclose(%p) %s\n", (fd ? fd : NULL), fdbg(fd)));
 /*@=modfilesys@*/
 
     fd = fdLink(fd, "Fclose");
+    /*@-branchstate@*/
     while (fd->nfps >= 0) {
        FDSTACK_t * fps = &fd->fps[fd->nfps];
        
@@ -2654,6 +2677,7 @@ DBGIO(fd, (stderr, "==> Fclose(%p) %s\n", (fd ? fd : NULL), fdbg(fd)));
            ec = rc;
        fdPop(fd);
     }
+    /*@=branchstate@*/
     fd = fdFree(fd, "Fclose");
     return ec;
 /*@=usereleased@*/
@@ -2764,6 +2788,7 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n", fd, fmode, fdbg(fd));
     if (end == NULL && other[0] == '\0')
        /*@-refcounttrans -retalias@*/ return fd; /*@=refcounttrans =retalias@*/
 
+    /*@-branchstate@*/
     if (end && *end) {
        if (!strcmp(end, "fdio")) {
            iof = fdio;
@@ -2812,6 +2837,7 @@ fprintf(stderr, "*** Fdopen fpio fp %p\n", (void *)fp);
            /*@=internalglobs@*/
        }
     }
+    /*@=branchstate@*/
     if (iof == NULL)
        /*@-refcounttrans -retalias@*/ return fd; /*@=refcounttrans =retalias@*/
 
@@ -2863,6 +2889,7 @@ FD_t Fopen(const char *path, const char *fmode)
     if (stdio[0] == '\0')
        return NULL;
 
+    /*@-branchstate@*/
     if (end == NULL || !strcmp(end, "fdio")) {
 if (_rpmio_debug)
 fprintf(stderr, "*** Fopen fdio path %s fmode %s\n", path, fmode);
@@ -2915,9 +2942,12 @@ fprintf(stderr, "*** Fopen WTFO path %s fmode %s\n", path, fmode);
            return fd;
        }
     }
+    /*@=branchstate@*/
 
+    /*@-branchstate@*/
     if (fd)
        fd = Fdopen(fd, fmode);
+    /*@=branchstate@*/
     return fd;
 }
 
@@ -3019,4 +3049,3 @@ static struct FDIO_s fpio_s = {
   ufdOpen, NULL, fdGetFp, NULL,        Mkdir, Chdir, Rmdir, Rename, Unlink
 };
 FDIO_t fpio = /*@-compmempass@*/ &fpio_s /*@=compmempass@*/ ;
-/*@=branchstate@*/