diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/depends.c | 38 | ||||
-rw-r--r-- | lib/formats.c | 6 | ||||
-rw-r--r-- | lib/fsm.c | 29 | ||||
-rw-r--r-- | lib/header.c | 32 | ||||
-rw-r--r-- | lib/header_internal.c | 55 | ||||
-rw-r--r-- | lib/misc.c | 14 | ||||
-rw-r--r-- | lib/package.c | 60 | ||||
-rw-r--r-- | lib/psm.c | 18 | ||||
-rw-r--r-- | lib/query.c | 22 | ||||
-rw-r--r-- | lib/rpmchecksig.c | 52 | ||||
-rw-r--r-- | lib/rpminstall.c | 14 | ||||
-rw-r--r-- | lib/rpmrc.c | 13 | ||||
-rw-r--r-- | lib/transaction.c | 127 |
13 files changed, 278 insertions, 202 deletions
diff --git a/lib/depends.c b/lib/depends.c index 86922e46c..ad6e384cd 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -462,7 +462,7 @@ static void alMakeIndex(availableList al) if (al->list[i].multiLib && !isDependsMULTILIB(al->list[i].provideFlags[j])) { ai->size--; - continue; + /*@innercontinue@*/ continue; } ai->index[k].package = al->list + i; @@ -1001,7 +1001,7 @@ alAllFileSatisfiesDepend(const availableList al, for (i = 0; i < dirMatch->numFiles; i++) { if (dirMatch->files[i].baseName == NULL || strcmp(dirMatch->files[i].baseName, baseName)) - continue; + /*@innercontinue@*/ continue; /* * If a file dependency would be satisfied by a file @@ -1009,7 +1009,7 @@ alAllFileSatisfiesDepend(const availableList al, */ if (al->list[dirMatch->files[i].pkgNum].multiLib && !isFileMULTILIB(dirMatch->files[i].fileFlags)) - continue; + /*@innercontinue@*/ continue; if (keyType) rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (added files)\n"), @@ -1113,7 +1113,7 @@ alAllSatisfiesDepend(const availableList al, /* Filter out provides that came along for the ride. */ if (strcmp(p->provides[i], keyName)) - continue; + /*@innercontinue@*/ continue; proEVR = (p->providesEVR ? p->providesEVR[i] : NULL); proFlags = (p->provideFlags ? p->provideFlags[i] : 0); @@ -1125,7 +1125,7 @@ alAllSatisfiesDepend(const availableList al, if (keyType && keyDepend && rc) rpmMessage(RPMMESS_DEBUG, _("%s: %-45s YES (added provide)\n"), keyType, keyDepend+2); - break; + /*@switchbreak@*/ break; } if (rc) { @@ -1418,7 +1418,7 @@ static int checkPackageDeps(rpmTransactionSet ts, problemsSet psp, switch (rc) { case 0: /* requirements are satisfied. */ - break; + /*@switchbreak@*/ break; case 1: /* requirements are not satisfied. */ rpmMessage(RPMMESS_DEBUG, _("package %s-%s-%s require not satisfied: %s\n"), name, version, release, keyDepend+2); @@ -1454,11 +1454,11 @@ static int checkPackageDeps(rpmTransactionSet ts, problemsSet psp, } psp->num++; - break; + /*@switchbreak@*/ break; case 2: /* something went wrong! */ default: ourrc = 1; - break; + /*@switchbreak@*/ break; } keyDepend = _free(keyDepend); } @@ -1521,13 +1521,13 @@ static int checkPackageDeps(rpmTransactionSet ts, problemsSet psp, } psp->num++; - break; + /*@switchbreak@*/ break; case 1: /* conflicts don't exist. */ - break; + /*@switchbreak@*/ break; case 2: /* something went wrong! */ default: ourrc = 1; - break; + /*@switchbreak@*/ break; } keyDepend = _free(keyDepend); } @@ -1914,14 +1914,15 @@ int rpmdepOrder(rpmTransactionSet ts) /* First, do pre-requisites. */ for (j = 0; j < p->requiresCount; j++) { - if (p->requireFlags == NULL) continue; /* XXX can't happen */ + if (p->requireFlags == NULL) /* XXX can't happen */ + /*@innercontinue@*/ continue; /* Skip if not %pre/%post requires or legacy prereq. */ if (isErasePreReq(p->requireFlags[j]) || !( isInstallPreReq(p->requireFlags[j]) || isLegacyPreReq(p->requireFlags[j]) )) - continue; + /*@innercontinue@*/ continue; /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */ (void) addRelation(ts, p, selected, j); @@ -1931,14 +1932,15 @@ int rpmdepOrder(rpmTransactionSet ts) /* Then do co-requisites. */ for (j = 0; j < p->requiresCount; j++) { - if (p->requireFlags == NULL) continue; /* XXX can't happen */ + if (p->requireFlags == NULL) /* XXX can't happen */ + /*@innercontinue@*/ continue; /* Skip if %pre/%post requires or legacy prereq. */ if (isErasePreReq(p->requireFlags[j]) || ( isInstallPreReq(p->requireFlags[j]) || isLegacyPreReq(p->requireFlags[j]) )) - continue; + /*@innercontinue@*/ continue; /* T3. Record next "q <- p" relation (i.e. "p" requires "q"). */ (void) addRelation(ts, p, selected, j); @@ -2226,7 +2228,7 @@ int rpmdepCheck(rpmTransactionSet ts, for (j = 0; j < p->providesCount; j++) { /* Adding: check provides key against conflicts matches. */ if (!checkDependentConflicts(ts, ps, p->provides[j])) - continue; + /*@innercontinue@*/ continue; rc = 1; /*@innerbreak@*/ break; } @@ -2265,7 +2267,7 @@ int rpmdepCheck(rpmTransactionSet ts, for (j = 0; j < providesCount; j++) { /* Erasing: check provides against requiredby matches. */ if (!checkDependentPackages(ts, ps, provides[j])) - continue; + /*@innercontinue@*/ continue; rc = 1; /*@innerbreak@*/ break; } @@ -2300,7 +2302,7 @@ int rpmdepCheck(rpmTransactionSet ts, (void) stpcpy( stpcpy(fileName, dirNames[dirIndexes[j]]) , baseNames[j]); /* Erasing: check filename against requiredby matches. */ if (!checkDependentPackages(ts, ps, fileName)) - continue; + /*@innercontinue@*/ continue; rc = 1; /*@innerbreak@*/ break; } diff --git a/lib/formats.c b/lib/formats.c index 44df0327c..9bb47723b 100644 --- a/lib/formats.c +++ b/lib/formats.c @@ -333,7 +333,8 @@ static int triggercondsTag(Header h, /*@out@*/ rpmTagType * type, chptr = xstrdup(""); for (j = 0; j < numNames; j++) { - if (indices[j] != i) continue; + if (indices[j] != i) + /*@innercontinue@*/ continue; item = xmalloc(strlen(names[j]) + strlen(versions[j]) + 20); if (flags[j] & RPMSENSE_SENSEMASK) { @@ -397,7 +398,8 @@ static int triggertypeTag(Header h, /*@out@*/ rpmTagType * type, *type = RPM_STRING_ARRAY_TYPE; for (i = 0; i < numScripts; i++) { for (j = 0; j < numNames; j++) { - if (indices[j] != i) continue; + if (indices[j] != i) + /*@innercontinue@*/ continue; if (flags[j] & RPMSENSE_TRIGGERIN) conds[i] = xstrdup("in"); @@ -84,11 +84,13 @@ const char * fsmFsPath(/*@special@*/ /*@null@*/ const FSM_t fsm, * @param p file info iterator * @retval NULL always */ +/*@-mustmod@*/ /* LCL: *p is modified */ static /*@null@*/ void * mapFreeIterator(/*@only@*//*@null@*/const void * p) /*@modifies *p @*/ { return _free((void *)p); } +/*@=mustmod@*/ /** \ingroup payload * Create file info iterator. @@ -120,6 +122,7 @@ mapInitIterator(/*@kept@*/ const void * a, /*@kept@*/ const void * b) * @param a file info iterator * @return next index, -1 on termination */ +/*@-mustmod@*/ /* LCL: *a is modified */ static int mapNextIterator(void * a) /*@modifies *a @*/ { @@ -135,6 +138,7 @@ static int mapNextIterator(void * a) iter->isave = i; return i; } +/*@=mustmod@*/ /** \ingroup payload */ @@ -268,14 +272,18 @@ static /*@only@*/ void * dnlInitIterator(/*@special@*/ const FSM_t fsm, const char * dnl; int jlen; - if (!dnli->active[j] || j == dil) continue; + if (!dnli->active[j] || j == dil) + /*@innercontinue@*/ continue; dnl = fi->dnl[j]; jlen = strlen(dnl); - if (jlen != (dnlen+bnlen+1)) continue; - if (strncmp(dnl, fi->dnl[dil], dnlen)) continue; - if (strncmp(dnl+dnlen, fi->bnl[i], bnlen)) continue; + if (jlen != (dnlen+bnlen+1)) + /*@innercontinue@*/ continue; + if (strncmp(dnl, fi->dnl[dil], dnlen)) + /*@innercontinue@*/ continue; + if (strncmp(dnl+dnlen, fi->bnl[i], bnlen)) + /*@innercontinue@*/ continue; if (dnl[dnlen+bnlen] != '/' || dnl[dnlen+bnlen+1] != '\0') - continue; + /*@innercontinue@*/ continue; /* This directory is included in the package. */ dnli->active[j] = 0; /*@innerbreak@*/ break; @@ -1094,7 +1102,8 @@ static int fsmMkdirs(/*@special@*/ 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 != '/') continue; + if (*te != '/') + /*@innercontinue@*/ continue; *te = '\0'; @@ -1107,7 +1116,7 @@ static int fsmMkdirs(/*@special@*/ FSM_t fsm) *te = '/'; /* Move pre-existing path marker forward. */ fsm->dnlx[dc] = (te - dn); - continue; + /*@innercontinue@*/ continue; } /*@=usedef =compdef =nullpass =nullderef@*/ @@ -1317,7 +1326,8 @@ 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) continue; + if (fsm->li->filex[i] < 0) + /*@innercontinue@*/ continue; nlink++; if (j == -1) j = i; } @@ -1751,7 +1761,8 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; fsm->commit && fsm->li->linksLeft) { for (i = 0 ; i < fsm->li->linksLeft; i++) { - if (fsm->li->filex[i] < 0) continue; + if (fsm->li->filex[i] < 0) + /*@innercontinue@*/ continue; rc = CPIOERR_MISSING_HARDLINK; if (fsm->failedFile && *fsm->failedFile == NULL) { fsm->ix = fsm->li->filex[i]; diff --git a/lib/header.c b/lib/header.c index 96c6f0ebb..f912e6117 100644 --- a/lib/header.c +++ b/lib/header.c @@ -387,16 +387,16 @@ static int regionSwab(/*@null@*/ indexEntry entry, int il, int dl, for (; ie.info.count > 0; ie.info.count--, it += 1) *it = htonl(*it); t = (char *) it; - } break; + } /*@switchbreak@*/ break; case RPM_INT16_TYPE: { int_16 * it = (int_16 *) t; for (; ie.info.count > 0; ie.info.count--, it += 1) *it = htons(*it); t = (char *) it; - } break; + } /*@switchbreak@*/ break; default: t += ie.length; - break; + /*@switchbreak@*/ break; } dl += ie.length; @@ -487,7 +487,7 @@ static /*@only@*/ /*@null@*/ void * doHeaderUnload(Header h, /* Skip rest of entries in region, but account for dribbles. */ for (; i < h->indexUsed && entry->info.offset <= rid+1; i++, entry++) { if (entry->info.offset <= rid) - continue; + /*@innercontinue@*/ continue; /* Alignment */ type = entry->info.type; @@ -650,7 +650,7 @@ t = te; te += sizeof(int_32); src += sizeof(int_32); } - break; + /*@switchbreak@*/ break; case RPM_INT16_TYPE: count = entry->info.count; @@ -660,12 +660,12 @@ t = te; te += sizeof(int_16); src += sizeof(int_16); } - break; + /*@switchbreak@*/ break; default: memcpy(te, entry->data, entry->length); te += entry->length; - break; + /*@switchbreak@*/ break; } pe++; } @@ -1772,7 +1772,7 @@ freeFormat( /*@only@*/ /*@null@*/ sprintfToken format, int num) format[i].u.array.format = freeFormat(format[i].u.array.format, format[i].u.array.numTokens); - break; + /*@switchbreak@*/ break; case PTOK_COND: format[i].u.cond.ifFormat = freeFormat(format[i].u.cond.ifFormat, @@ -1780,12 +1780,12 @@ freeFormat( /*@only@*/ /*@null@*/ sprintfToken format, int num) format[i].u.cond.elseFormat = freeFormat(format[i].u.cond.elseFormat, format[i].u.cond.numElseTokens); - break; + /*@switchbreak@*/ break; case PTOK_NONE: case PTOK_TAG: case PTOK_STRING: default: - break; + /*@switchbreak@*/ break; } } format = _free(format); @@ -1898,7 +1898,7 @@ static int parseFormat(char * str, const headerTagTableEntry tags, *dst++ = *start++; - break; /* out of switch */ + /*@switchbreak@*/ break; } currToken++; @@ -1916,7 +1916,7 @@ static int parseFormat(char * str, const headerTagTableEntry tags, return 1; } start = newEnd; - break; /* out of switch */ + /*@switchbreak@*/ break; } /*@-assignexpose@*/ @@ -2015,7 +2015,7 @@ static int parseFormat(char * str, const headerTagTableEntry tags, start = next; - break; + /*@switchbreak@*/ break; case '[': *dst++ = '\0'; @@ -2042,7 +2042,7 @@ static int parseFormat(char * str, const headerTagTableEntry tags, format[currToken].type = PTOK_ARRAY; - break; + /*@switchbreak@*/ break; case ']': case '}': @@ -2063,7 +2063,7 @@ static int parseFormat(char * str, const headerTagTableEntry tags, *start++ = '\0'; if (endPtr) *endPtr = start; done = 1; - break; + /*@switchbreak@*/ break; default: if (currToken < 0 || format[currToken].type != PTOK_STRING) { @@ -2080,7 +2080,7 @@ static int parseFormat(char * str, const headerTagTableEntry tags, } else { *dst++ = *start++; } - break; + /*@switchbreak@*/ break; } if (done) break; diff --git a/lib/header_internal.c b/lib/header_internal.c index a96154ca7..9c30d1351 100644 --- a/lib/header_internal.c +++ b/lib/header_internal.c @@ -45,17 +45,37 @@ void headerDump(Header h, FILE *f, int flags, " OFSET COUNT\n"); for (i = 0; i < h->indexUsed; i++) { switch (p->info.type) { - case RPM_NULL_TYPE: type = "NULL"; break; - case RPM_CHAR_TYPE: type = "CHAR"; break; - case RPM_BIN_TYPE: type = "BIN"; break; - case RPM_INT8_TYPE: type = "INT8"; break; - case RPM_INT16_TYPE: type = "INT16"; break; - case RPM_INT32_TYPE: type = "INT32"; break; + case RPM_NULL_TYPE: + type = "NULL"; + /*@switchbreak@*/ break; + case RPM_CHAR_TYPE: + type = "CHAR"; + /*@switchbreak@*/ break; + case RPM_BIN_TYPE: + type = "BIN"; + /*@switchbreak@*/ break; + case RPM_INT8_TYPE: + type = "INT8"; + /*@switchbreak@*/ break; + case RPM_INT16_TYPE: + type = "INT16"; + /*@switchbreak@*/ break; + case RPM_INT32_TYPE: + type = "INT32"; + /*@switchbreak@*/ break; /*case RPM_INT64_TYPE: type = "INT64"; break;*/ - case RPM_STRING_TYPE: type = "STRING"; break; - case RPM_STRING_ARRAY_TYPE: type = "STRING_ARRAY"; break; - case RPM_I18NSTRING_TYPE: type = "I18N_STRING"; break; - default: type = "(unknown)"; break; + case RPM_STRING_TYPE: + type = "STRING"; + /*@switchbreak@*/ break; + case RPM_STRING_ARRAY_TYPE: + type = "STRING_ARRAY"; + /*@switchbreak@*/ break; + case RPM_I18NSTRING_TYPE: + type = "I18N_STRING"; + /*@switchbreak@*/ break; + default: + type = "(unknown)"; + /*@switchbreak@*/ break; } tage = tags; @@ -84,7 +104,7 @@ void headerDump(Header h, FILE *f, int flags, (int) *((int_32 *) dp)); dp += sizeof(int_32); } - break; + /*@switchbreak@*/ break; case RPM_INT16_TYPE: while (c--) { @@ -93,7 +113,7 @@ void headerDump(Header h, FILE *f, int flags, (int) *((int_16 *) dp)); dp += sizeof(int_16); } - break; + /*@switchbreak@*/ break; case RPM_INT8_TYPE: while (c--) { fprintf(f, " Data: %.3d 0x%02x (%d)\n", ct++, @@ -101,7 +121,7 @@ void headerDump(Header h, FILE *f, int flags, (int) *((int_8 *) dp)); dp += sizeof(int_8); } - break; + /*@switchbreak@*/ break; case RPM_BIN_TYPE: while (c > 0) { fprintf(f, " Data: %.3d ", ct); @@ -115,7 +135,7 @@ void headerDump(Header h, FILE *f, int flags, } fprintf(f, "\n"); } - break; + /*@switchbreak@*/ break; case RPM_CHAR_TYPE: while (c--) { char ch = (char) *((char *) dp); @@ -125,7 +145,7 @@ void headerDump(Header h, FILE *f, int flags, (int) *((char *) dp)); dp += sizeof(char); } - break; + /*@switchbreak@*/ break; case RPM_STRING_TYPE: case RPM_STRING_ARRAY_TYPE: case RPM_I18NSTRING_TYPE: @@ -134,14 +154,13 @@ void headerDump(Header h, FILE *f, int flags, dp = strchr(dp, 0); dp++; } - break; + /*@switchbreak@*/ break; default: fprintf(stderr, _("Data type %d not supported\n"), (int) p->info.type); - break; + /*@switchbreak@*/ break; } } p++; } } - diff --git a/lib/misc.c b/lib/misc.c index 6206dbb88..7af38780c 100644 --- a/lib/misc.c +++ b/lib/misc.c @@ -174,9 +174,9 @@ static int rpmMkpath(const char * path, mode_t mode, uid_t uid, gid_t gid) switch(errno) { default: return errno; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; case ENOENT: - break; + /*@switchbreak@*/ break; } rc = mkdir(d, mode); if (rc) @@ -243,9 +243,9 @@ int makeTempFile(const char * prefix, const char ** fnptr, FD_t * fdptr) case URL_IS_HTTP: case URL_IS_DASH: goto errxit; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; default: - break; + /*@switchbreak@*/ break; } fd = Fopen(tempfn, "w+x.ufdio"); @@ -414,7 +414,7 @@ exit: static void doBuildFileList(Header h, /*@out@*/ const char *** fileListPtr, /*@out@*/ int * fileCountPtr, rpmTag baseNameTag, rpmTag dirNameTag, rpmTag dirIndexesTag) - /*@modifies h @*/ + /*@modifies *fileListPtr, *fileCountPtr @*/ { HGE_t hge = (HGE_t)headerGetEntryMinMemory; HFD_t hfd = headerFreeData; @@ -587,9 +587,9 @@ fprintf(stderr, "*** rpmGlob argv[%d] \"%s\"\n", argc, argv[argc]); case URL_IS_PATH: case URL_IS_DASH: strncpy(globRoot, av[j], nb); - break; + /*@switchbreak@*/ break; case URL_IS_UNKNOWN: - break; + /*@switchbreak@*/ break; } globRoot += nb; *globRoot = '\0'; diff --git a/lib/package.c b/lib/package.c index 683e73ac7..77778cb87 100644 --- a/lib/package.c +++ b/lib/package.c @@ -32,17 +32,31 @@ void headerMergeLegacySigs(Header h, const Header sig) ptr = hfd(ptr, type)) { switch (tag) { - case RPMSIGTAG_SIZE: tag = RPMTAG_SIGSIZE; break; - case RPMSIGTAG_LEMD5_1: tag = RPMTAG_SIGLEMD5_1;break; - case RPMSIGTAG_PGP: tag = RPMTAG_SIGPGP; break; - case RPMSIGTAG_LEMD5_2: tag = RPMTAG_SIGLEMD5_2;break; - case RPMSIGTAG_MD5: tag = RPMTAG_SIGMD5; break; - case RPMSIGTAG_GPG: tag = RPMTAG_SIGGPG; break; - case RPMSIGTAG_PGP5: tag = RPMTAG_SIGPGP5; break; + case RPMSIGTAG_SIZE: + tag = RPMTAG_SIGSIZE; + /*@switchbreak@*/ break; + case RPMSIGTAG_LEMD5_1: + tag = RPMTAG_SIGLEMD5_1; + /*@switchbreak@*/ break; + case RPMSIGTAG_PGP: + tag = RPMTAG_SIGPGP; + /*@switchbreak@*/ break; + case RPMSIGTAG_LEMD5_2: + tag = RPMTAG_SIGLEMD5_2; + /*@switchbreak@*/ break; + case RPMSIGTAG_MD5: + tag = RPMTAG_SIGMD5; + /*@switchbreak@*/ break; + case RPMSIGTAG_GPG: + tag = RPMTAG_SIGGPG; + /*@switchbreak@*/ break; + case RPMSIGTAG_PGP5: + tag = RPMTAG_SIGPGP5; + /*@switchbreak@*/ break; default: if (!(tag >= HEADER_SIGBASE && tag < HEADER_TAGBASE)) continue; - break; + /*@switchbreak@*/ break; } if (ptr == NULL) continue; /* XXX can't happen */ if (!headerIsEntry(h, tag)) @@ -66,18 +80,32 @@ Header headerRegenSigHeader(const Header h) ptr = hfd(ptr, type)) { switch (tag) { - case RPMTAG_SIGSIZE: stag = RPMSIGTAG_SIZE; break; - case RPMTAG_SIGLEMD5_1: stag = RPMSIGTAG_LEMD5_1;break; - case RPMTAG_SIGPGP: stag = RPMSIGTAG_PGP; break; - case RPMTAG_SIGLEMD5_2: stag = RPMSIGTAG_LEMD5_2;break; - case RPMTAG_SIGMD5: stag = RPMSIGTAG_MD5; break; - case RPMTAG_SIGGPG: stag = RPMSIGTAG_GPG; break; - case RPMTAG_SIGPGP5: stag = RPMSIGTAG_PGP5; break; + case RPMTAG_SIGSIZE: + stag = RPMSIGTAG_SIZE; + /*@switchbreak@*/ break; + case RPMTAG_SIGLEMD5_1: + stag = RPMSIGTAG_LEMD5_1; + /*@switchbreak@*/ break; + case RPMTAG_SIGPGP: + stag = RPMSIGTAG_PGP; + /*@switchbreak@*/ break; + case RPMTAG_SIGLEMD5_2: + stag = RPMSIGTAG_LEMD5_2; + /*@switchbreak@*/ break; + case RPMTAG_SIGMD5: + stag = RPMSIGTAG_MD5; + /*@switchbreak@*/ break; + case RPMTAG_SIGGPG: + stag = RPMSIGTAG_GPG; + /*@switchbreak@*/ break; + case RPMTAG_SIGPGP5: + stag = RPMSIGTAG_PGP5; + /*@switchbreak@*/ break; default: if (!(tag >= HEADER_SIGBASE && tag < HEADER_TAGBASE)) continue; stag = tag; - break; + /*@switchbreak@*/ break; } if (ptr == NULL) continue; /* XXX can't happen */ if (!headerIsEntry(sig, stag)) @@ -283,10 +283,10 @@ static int rpmInstallLoadMacros(TFI_t fi, Header h) case RPM_INT32_TYPE: sprintf(numbuf, "%d", *body.i32p); addMacro(NULL, tagm->macroname, NULL, numbuf, -1); - break; + /*@switchbreak@*/ break; case RPM_STRING_TYPE: addMacro(NULL, tagm->macroname, NULL, body.str, -1); - break; + /*@switchbreak@*/ break; case RPM_NULL_TYPE: case RPM_CHAR_TYPE: case RPM_INT8_TYPE: @@ -295,7 +295,7 @@ static int rpmInstallLoadMacros(TFI_t fi, Header h) case RPM_STRING_ARRAY_TYPE: case RPM_I18NSTRING_TYPE: default: - break; + /*@switchbreak@*/ break; } } return 0; @@ -370,7 +370,7 @@ static int mergeFiles(TFI_t fi, Header h, Header newH) ((int_8 *) newdata)[k++] = ((int_8 *) data)[j]; (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc); free (newdata); - break; + /*@switchbreak@*/ break; case RPM_INT16_TYPE: newdata = xcalloc(fc, sizeof(int_16)); for (j = 0, k = 0; j < count; j++) @@ -378,7 +378,7 @@ static int mergeFiles(TFI_t fi, Header h, Header newH) ((int_16 *) newdata)[k++] = ((int_16 *) data)[j]; (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc); free (newdata); - break; + /*@switchbreak@*/ break; case RPM_INT32_TYPE: newdata = xcalloc(fc, sizeof(int_32)); for (j = 0, k = 0; j < count; j++) @@ -386,7 +386,7 @@ static int mergeFiles(TFI_t fi, Header h, Header newH) ((int_32 *) newdata)[k++] = ((int_32 *) data)[j]; (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc); free (newdata); - break; + /*@switchbreak@*/ break; case RPM_STRING_ARRAY_TYPE: newdata = xcalloc(fc, sizeof(char *)); for (j = 0, k = 0; j < count; j++) @@ -394,12 +394,12 @@ static int mergeFiles(TFI_t fi, Header h, Header newH) ((char **) newdata)[k++] = ((char **) data)[j]; (void) headerAddOrAppendEntry(h, mergeTags[i], type, newdata, fc); free (newdata); - break; + /*@switchbreak@*/ break; default: rpmError(RPMERR_DATATYPE, _("Data type %d not supported\n"), (int) type); return 1; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; } data = hfd(data, type); } @@ -461,7 +461,7 @@ static int mergeFiles(TFI_t fi, Header h, Header newH) } for (j = 0, k = 0; j < newCount; j++) { if (!newNames[j] || !isDependsMULTILIB(newFlags[j])) - continue; + /*@innercontinue@*/ continue; if (j != k) { newNames[k] = newNames[j]; newEVR[k] = newEVR[j]; diff --git a/lib/query.c b/lib/query.c index c5c42ae09..7de754c57 100644 --- a/lib/query.c +++ b/lib/query.c @@ -270,17 +270,21 @@ int showQueryPackage(QVA_t qva, /*@unused@*/rpmdb rpmdb, Header h) rpmfileState fstate = fileStatesList[i]; switch (fstate) { case RPMFILE_STATE_NORMAL: - te = stpcpy(te, _("normal ")); break; + te = stpcpy(te, _("normal ")); + /*@switchbreak@*/ break; case RPMFILE_STATE_REPLACED: - te = stpcpy(te, _("replaced ")); break; + te = stpcpy(te, _("replaced ")); + /*@switchbreak@*/ break; case RPMFILE_STATE_NOTINSTALLED: - te = stpcpy(te, _("not installed ")); break; + te = stpcpy(te, _("not installed ")); + /*@switchbreak@*/ break; case RPMFILE_STATE_NETSHARED: - te = stpcpy(te, _("net shared ")); break; + te = stpcpy(te, _("net shared ")); + /*@switchbreak@*/ break; default: sprintf(te, _("(unknown %3d) "), (int)fileStatesList[i]); te += strlen(te); - break; + /*@switchbreak@*/ break; } } else { te = stpcpy(te, _("(no state) ")); @@ -457,11 +461,11 @@ printNewSpecfile(Spec spec) (void) stpcpy( stpcpy( stpcpy(buf, tn), ": "), msgstr); sl->sl_lines[t->t_startx] = buf; } - break; + /*@switchbreak@*/ break; case RPMTAG_DESCRIPTION: for (j = 1; j < t->t_nlines; j++) { if (*sl->sl_lines[t->t_startx + j] == '%') - continue; + /*@innercontinue@*/ continue; /*@-unqualifiedtrans@*/ sl->sl_lines[t->t_startx + j] = _free(sl->sl_lines[t->t_startx + j]); @@ -474,7 +478,7 @@ printNewSpecfile(Spec spec) sl->sl_lines[t->t_startx + 1] = xstrdup(msgstr); if (t->t_nlines > 2) sl->sl_lines[t->t_startx + 2] = xstrdup("\n\n"); - break; + /*@switchbreak@*/ break; } } msgstr = _free(msgstr); @@ -506,7 +510,7 @@ 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. */ - continue; + /*@innercontinue@*/ continue; if (!strcmp(t->name, ext->name)) /*@innerbreak@*/ break; } diff --git a/lib/rpmchecksig.c b/lib/rpmchecksig.c index 4ce4d8937..972b871ff 100644 --- a/lib/rpmchecksig.c +++ b/lib/rpmchecksig.c @@ -149,13 +149,13 @@ int rpmReSign(rpmResignFlags flags, char * passPhrase, const char ** argv) case 1: rpmError(RPMERR_BADSIGTYPE, _("%s: Can't sign v1.0 RPM\n"), rpm); goto exit; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; case 2: rpmError(RPMERR_BADSIGTYPE, _("%s: Can't re-sign v2.0 RPM\n"), rpm); goto exit; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; default: - break; + /*@switchbreak@*/ break; } rc = rpmReadSignature(fd, &sig, l->signature_type); @@ -293,9 +293,9 @@ int rpmCheckSig(rpmCheckSigFlags flags, const char ** argv) rpmError(RPMERR_BADSIGTYPE, _("%s: No signature available (v1.0 RPM)\n"), pkgfn); res++; goto bottom; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; default: - break; + /*@switchbreak@*/ break; } rc = rpmReadSignature(fd, &sig, l->signature_type); @@ -328,12 +328,13 @@ int rpmCheckSig(rpmCheckSigFlags flags, const char ** argv) headerNextIterator(hi, &tag, &type, &ptr, &count); ptr = headerFreeData(ptr, type)) { - if (ptr == NULL) continue; /* XXX can't happen */ + if (ptr == NULL) /* XXX can't happen */ + /*@innercontinue@*/ continue; switch (tag) { case RPMSIGTAG_PGP5: /* XXX legacy */ case RPMSIGTAG_PGP: if (!(flags & CHECKSIG_PGP)) - continue; + /*@innercontinue@*/ continue; if (rpmIsVerbose()) fprintf(stderr, "========================= Package RSA Signature\n"); (void) pgpPrtPkts(ptr, count, dig, rpmIsVerbose()); @@ -373,10 +374,10 @@ fprintf(stderr, "========================= Red Hat RSA Public Key\n"); hexstr = _free(hexstr); } - break; + /*@switchbreak@*/ break; case RPMSIGTAG_GPG: if (!(flags & CHECKSIG_GPG)) - continue; + /*@innercontinue@*/ continue; if (rpmIsVerbose()) fprintf(stderr, "========================= Package DSA Signature\n"); (void) pgpPrtPkts(ptr, count, dig, rpmIsVerbose()); @@ -393,18 +394,19 @@ fprintf(stderr, "========================= Red Hat DSA Public Key\n"); (void) pgpPrtPkts(gpgpk, gpgpklen, NULL, rpmIsVerbose()); } (void) pgpPrtPkts(gpgpk, gpgpklen, dig, 0); - break; + /*@switchbreak@*/ break; case RPMSIGTAG_LEMD5_2: case RPMSIGTAG_LEMD5_1: case RPMSIGTAG_MD5: if (!(flags & CHECKSIG_MD5)) - continue; - break; + /*@innercontinue@*/ continue; + /*@switchbreak@*/ break; default: - continue; - /*@notreached@*/ break; + /*@innercontinue@*/ continue; + /*@notreached@*/ /*@switchbreak@*/ break; } - if (ptr == NULL) continue; /* XXX can't happen */ + if (ptr == NULL) /* XXX can't happen */ + /*@innercontinue@*/ continue; if ((res3 = rpmVerifySignature(sigtarget, tag, ptr, count, dig, result))) { @@ -417,13 +419,13 @@ fprintf(stderr, "========================= Red Hat DSA Public Key\n"); case RPMSIGTAG_SIZE: strcat(buffer, "SIZE "); res2 = 1; - break; + /*@switchbreak@*/ break; case RPMSIGTAG_LEMD5_2: case RPMSIGTAG_LEMD5_1: case RPMSIGTAG_MD5: strcat(buffer, "MD5 "); res2 = 1; - break; + /*@switchbreak@*/ break; case RPMSIGTAG_PGP5: /* XXX legacy */ case RPMSIGTAG_PGP: switch (res3) { @@ -452,7 +454,7 @@ fprintf(stderr, "========================= Red Hat DSA Public Key\n"); res2 = 1; /*@innerbreak@*/ break; } - break; + /*@switchbreak@*/ break; case RPMSIGTAG_GPG: /* Do not consider this a failure */ switch (res3) { @@ -468,11 +470,11 @@ fprintf(stderr, "========================= Red Hat DSA Public Key\n"); res2 = 1; /*@innerbreak@*/ break; } - break; + /*@switchbreak@*/ break; default: strcat(buffer, "?UnknownSignatureType? "); res2 = 1; - break; + /*@switchbreak@*/ break; } } } else { @@ -482,22 +484,22 @@ fprintf(stderr, "========================= Red Hat DSA Public Key\n"); switch (tag) { case RPMSIGTAG_SIZE: strcat(buffer, "size "); - break; + /*@switchbreak@*/ break; case RPMSIGTAG_LEMD5_2: case RPMSIGTAG_LEMD5_1: case RPMSIGTAG_MD5: strcat(buffer, "md5 "); - break; + /*@switchbreak@*/ break; case RPMSIGTAG_PGP5: /* XXX legacy */ case RPMSIGTAG_PGP: strcat(buffer, "pgp "); - break; + /*@switchbreak@*/ break; case RPMSIGTAG_GPG: strcat(buffer, "gpg "); - break; + /*@switchbreak@*/ break; default: strcat(buffer, "??? "); - break; + /*@switchbreak@*/ break; } } } diff --git a/lib/rpminstall.c b/lib/rpminstall.c index aa52ea0b9..757a11b19 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -275,18 +275,18 @@ restart: eiu->numFailed++; eiu->pkgURL[eiu->pkgx] = NULL; tfn = _free(tfn); - break; + /*@switchbreak@*/ break; } eiu->pkgState[eiu->pkgx] = 1; eiu->pkgURL[eiu->pkgx] = tfn; eiu->pkgx++; - } break; + } /*@switchbreak@*/ break; case URL_IS_PATH: default: eiu->pkgURL[eiu->pkgx] = fileURL; fileURL = NULL; eiu->pkgx++; - break; + /*@switchbreak@*/ break; } } fileURL = _free(fileURL); @@ -396,7 +396,7 @@ restart: count = rpmdbGetIteratorCount(mi); while ((oldH = rpmdbNextIterator(mi)) != NULL) { if (rpmVersionCompare(oldH, eiu->h) < 0) - continue; + /*@innercontinue@*/ continue; /* same or newer package already installed */ count = 0; /*@innerbreak@*/ break; @@ -421,20 +421,20 @@ restart: case 0: rpmMessage(RPMMESS_DEBUG, "\tadded binary package [%d]\n", eiu->numRPMS); - break; + /*@switchbreak@*/ break; case 1: rpmMessage(RPMMESS_ERROR, _("error reading from file %s\n"), *eiu->fnp); eiu->numFailed++; goto exit; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; case 2: rpmMessage(RPMMESS_ERROR, _("file %s requires a newer version of RPM\n"), *eiu->fnp); eiu->numFailed++; goto exit; - /*@notreached@*/ break; + /*@notreached@*/ /*@switchbreak@*/ break; } eiu->numRPMS++; diff --git a/lib/rpmrc.c b/lib/rpmrc.c index 8e6c964e3..573a67246 100644 --- a/lib/rpmrc.c +++ b/lib/rpmrc.c @@ -134,7 +134,7 @@ static int optionCompare(const void * a, const void * b) } static void rpmRebuildTargetVars(/*@null@*/ const char **target, /*@null@*/ const char ** canontarget) - /*@modifies *target, *canontarget @*/; + /*@modifies *canontarget @*/; static /*@observer@*/ /*@null@*/ machCacheEntry machCacheFindEntry(const machCache cache, const char * key) @@ -733,7 +733,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@*/ break; + } /*@notreached@*/ /*@switchbreak@*/ break; case RPMVAR_MACROFILES: fn = rpmGetPath(se, NULL); if (fn == NULL || *fn == '\0') { @@ -743,7 +743,7 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn) return 1; } se = (char *)fn; - break; + /*@switchbreak@*/ break; case RPMVAR_PROVIDES: { char *t; s = rpmGetVar(RPMVAR_PROVIDES); @@ -754,9 +754,9 @@ static int doReadRC( /*@killref@*/ FD_t fd, const char * urlfn) while (*se != '\0') *t++ = *se++; *t++ = '\0'; se = (char *)fn; - } break; + } /*@switchbreak@*/ break; default: - break; + /*@switchbreak@*/ break; } if (option->archSpecific) { @@ -1553,7 +1553,8 @@ void rpmFreeRpmrc(void) for (j = 0; j < t->cache.size; j++) { machCacheEntry e; e = t->cache.cache + j; - if (e == NULL) continue; + if (e == NULL) + /*@innercontinue@*/ continue; e->name = _free(e->name); if (e->equivs) { for (k = 0; k < e->count; k++) diff --git a/lib/transaction.c b/lib/transaction.c index 707273002..2e4fde41f 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -115,7 +115,7 @@ int rpmtransGetKeys(const rpmTransactionSet ts, const void *** ep, int * nep) struct availablePackage * alp; alp = ts->addedPackages.list + ts->order[oc].u.addedIndex; *e = alp->key; - break; + /*@switchbreak@*/ break; } /*@fallthrough@*/ default: @@ -123,7 +123,7 @@ int rpmtransGetKeys(const rpmTransactionSet ts, const void *** ep, int * nep) /*@-mods@*/ /* FIX: double indirection. */ *e = NULL; /*@=mods@*/ - break; + /*@switchbreak@*/ break; } } } @@ -451,7 +451,7 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi, 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) - continue; + /*@innercontinue@*/ continue; /*@-usereleased@*/ /* LCL: ??? */ tmpReloc = relocations[j - 1]; relocations[j - 1] = relocations[j]; @@ -487,7 +487,7 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi, for (j = 0; j < numRelocations; j++) { if (relocations[j].oldPath == NULL || /* XXX can't happen */ strcmp(validRelocations[i], relocations[j].oldPath)) - continue; + /*@innercontinue@*/ continue; /* On install, a relocate to NULL means skip the path. */ if (relocations[j].newPath) { actualRelocations[numActual] = relocations[j].newPath; @@ -564,22 +564,23 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi, * relocation list be a good idea? */ for (j = numRelocations - 1; j >= 0; j--) { - if (relocations[j].oldPath == NULL) continue; /* XXX can't happen */ + if (relocations[j].oldPath == NULL) /* XXX can't happen */ + /*@innercontinue@*/ continue; len = strcmp(relocations[j].oldPath, "/") ? strlen(relocations[j].oldPath) : 0; if (fnlen < len) - continue; + /*@innercontinue@*/ 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)) - continue; + /*@innercontinue@*/ continue; if (strncmp(relocations[j].oldPath, fn, len)) - continue; + /*@innercontinue@*/ continue; /*@innerbreak@*/ break; } if (j < 0) continue; @@ -594,9 +595,9 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi, len = strlen(dirNames[j]) - 1; while (len > 0 && dirNames[j][len-1] == '/') len--; if (fnlen != len) - continue; + /*@innercontinue@*/ continue; if (strncmp(fn, dirNames[j], fnlen)) - continue; + /*@innercontinue@*/ continue; /*@innerbreak@*/ break; } if (j < dirCount) @@ -635,9 +636,9 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi, /* Does this directory already exist in the directory list? */ for (j = 0; j < dirCount; j++) { if (fnlen != strlen(dirNames[j])) - continue; + /*@innercontinue@*/ continue; if (strncmp(fn, dirNames[j], fnlen)) - continue; + /*@innercontinue@*/ continue; /*@innerbreak@*/ break; } @@ -670,20 +671,21 @@ static Header relocateFileList(const rpmTransactionSet ts, TFI_t fi, for (i = dirCount - 1; i >= 0; i--) { for (j = numRelocations - 1; j >= 0; j--) { - if (relocations[j].oldPath == NULL) continue; /* XXX can't happen */ + if (relocations[j].oldPath == NULL) /* XXX can't happen */ + /*@innercontinue@*/ continue; len = strcmp(relocations[j].oldPath, "/") ? strlen(relocations[j].oldPath) : 0; if (len && strncmp(relocations[j].oldPath, dirNames[i], len)) - continue; + /*@innercontinue@*/ 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] != '/') - continue; + /*@innercontinue@*/ continue; if (relocations[j].newPath) { /* Relocate the path */ const char * s = relocations[j].newPath; @@ -1135,7 +1137,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht, for (otherPkgNum = j - 1; otherPkgNum >= 0; otherPkgNum--) { /* Added packages need only look at other added packages. */ if (fi->type == TR_ADDED && recs[otherPkgNum]->type != TR_ADDED) - continue; + /*@innercontinue@*/ continue; /* TESTME: there are more efficient searches in the world... */ for (otherFileNum = 0; otherFileNum < recs[otherPkgNum]->fc; @@ -1163,7 +1165,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht, if (otherPkgNum < 0) { /* XXX is this test still necessary? */ if (fi->actions[i] != FA_UNKNOWN) - break; + /*@switchbreak@*/ break; if ((fi->fflags[i] & RPMFILE_CONFIG) && !lstat(filespec, &sb)) { /* Here is a non-overlapped pre-existing config file. */ @@ -1172,7 +1174,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht, } else { fi->actions[i] = FA_CREATE; } - break; + /*@switchbreak@*/ break; } /* Mark added overlapped non-identical files as a conflict. */ @@ -1196,36 +1198,36 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht, } else { fi->actions[i] = FA_CREATE; } - } break; + } /*@switchbreak@*/ break; case TR_REMOVED: if (otherPkgNum >= 0) { /* Here is an overlapped added file we don't want to nuke. */ if (recs[otherPkgNum]->actions[otherFileNum] != FA_ERASE) { /* On updates, don't remove files. */ fi->actions[i] = FA_SKIP; - break; + /*@switchbreak@*/ break; } /* Here is an overlapped removed file: skip in previous. */ recs[otherPkgNum]->actions[otherFileNum] = FA_SKIP; } if (XFA_SKIPPING(fi->actions[i])) - break; + /*@switchbreak@*/ break; if (fi->fstates && fi->fstates[i] != RPMFILE_STATE_NORMAL) - break; + /*@switchbreak@*/ break; if (!(S_ISREG(fi->fmodes[i]) && (fi->fflags[i] & RPMFILE_CONFIG))) { fi->actions[i] = FA_ERASE; - break; + /*@switchbreak@*/ break; } /* Here is a pre-existing modified config file that needs saving. */ { char mdsum[50]; if (!mdfile(filespec, mdsum) && strcmp(fi->fmd5s[i], mdsum)) { fi->actions[i] = FA_BACKUP; - break; + /*@switchbreak@*/ break; } } fi->actions[i] = FA_ERASE; - break; + /*@switchbreak@*/ break; } if (ds) { @@ -1237,7 +1239,7 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht, case FA_ALTNAME: ds->ineeded++; ds->bneeded += s; - break; + /*@switchbreak@*/ break; /* * FIXME: If two packages share a file (same md5sum), and @@ -1247,15 +1249,15 @@ static void handleOverlappedFiles(TFI_t fi, hashTable ht, case FA_CREATE: ds->bneeded += s; ds->bneeded -= BLOCK_ROUND(fi->replacedSizes[i], ds->bsize); - break; + /*@switchbreak@*/ break; case FA_ERASE: ds->ineeded--; ds->bneeded -= s; - break; + /*@switchbreak@*/ break; default: - break; + /*@switchbreak@*/ break; } ds->bneeded -= BLOCK_ROUND(fixupSize, ds->bsize); @@ -1351,16 +1353,22 @@ static void skipFiles(const rpmTransactionSet ts, TFI_t fi) len = strlen(*nsp); if (dnlen >= len) { - if (strncmp(dn, *nsp, len)) continue; + if (strncmp(dn, *nsp, len)) + /*@innercontinue@*/ continue; /* Only directories or complete file paths can be net shared */ - if (!(dn[len] == '/' || dn[len] == '\0')) continue; + if (!(dn[len] == '/' || dn[len] == '\0')) + /*@innercontinue@*/ continue; } else { - if (len < (dnlen + bnlen)) continue; - if (strncmp(dn, *nsp, dnlen)) continue; - if (strncmp(bn, (*nsp) + dnlen, bnlen)) continue; + if (len < (dnlen + bnlen)) + /*@innercontinue@*/ continue; + if (strncmp(dn, *nsp, dnlen)) + /*@innercontinue@*/ continue; + if (strncmp(bn, (*nsp) + dnlen, bnlen)) + /*@innercontinue@*/ continue; len = dnlen + bnlen; /* Only directories or complete file paths can be net shared */ - if (!((*nsp)[len] == '/' || (*nsp)[len] == '\0')) continue; + if (!((*nsp)[len] == '/' || (*nsp)[len] == '\0')) + /*@innercontinue@*/ continue; } /*@innerbreak@*/ break; @@ -1427,18 +1435,18 @@ static void skipFiles(const rpmTransactionSet ts, TFI_t fi) const char * dir; if (XFA_SKIPPING(fi->actions[i])) - continue; + /*@innercontinue@*/ continue; if (whatis(fi->fmodes[i]) != XDIR) - continue; + /*@innercontinue@*/ continue; dir = fi->dnl[fi->dil[i]]; if (strlen(dir) != dnlen) - continue; + /*@innercontinue@*/ continue; if (strncmp(dir, dn, dnlen)) - continue; + /*@innercontinue@*/ continue; if (strlen(fi->bnl[i]) != bnlen) - continue; + /*@innercontinue@*/ continue; if (strncmp(fi->bnl[i], bn, bnlen)) - continue; + /*@innercontinue@*/ continue; rpmMessage(RPMMESS_DEBUG, _("excluding directory %s\n"), dn); fi->actions[i] = FA_SKIPNSTATE; /*@innerbreak@*/ break; @@ -1758,7 +1766,7 @@ int rpmRunTransactions( rpmTransactionSet ts, /* Skip netshared paths, not our i18n files, and excluded docs */ skipFiles(ts, fi); - break; + /*@switchbreak@*/ break; case TR_REMOVED: fi->ap = NULL; fi->record = ts->order[oc].u.removed.dboffset; @@ -1776,7 +1784,7 @@ int rpmRunTransactions( rpmTransactionSet ts, } /* XXX header arg unused. */ loadFi(fi->h, fi); - break; + /*@switchbreak@*/ break; } if (fi->fc) @@ -1807,7 +1815,7 @@ int rpmRunTransactions( rpmTransactionSet ts, fpLookupList(fpc, fi->dnl, fi->bnl, fi->dil, fi->fc, fi->fps); for (i = 0; i < fi->fc; i++) { if (XFA_SKIPPING(fi->actions[i])) - continue; + /*@innercontinue@*/ continue; /*@-dependenttrans@*/ htAddEntry(ht, fi->fps + i, fi); /*@=dependenttrans@*/ @@ -1856,9 +1864,9 @@ int rpmRunTransactions( rpmTransactionSet ts, case TR_REMOVED: if (ts->order[k].u.removed.dboffset == ro) knownBad = ro; - break; + /*@switchbreak@*/ break; case TR_ADDED: - break; + /*@switchbreak@*/ break; } } @@ -1893,7 +1901,7 @@ int rpmRunTransactions( rpmTransactionSet ts, beingRemoved = 0; for (j = 0; j < ts->numRemovedPackages; j++) { if (ts->removedPackages[j] != shared->otherPkg) - continue; + /*@innercontinue@*/ continue; beingRemoved = 1; /*@innerbreak@*/ break; } @@ -1904,11 +1912,11 @@ int rpmRunTransactions( rpmTransactionSet ts, (void) handleInstInstalledFiles(fi, ts->rpmdb, shared, nexti - i, !(beingRemoved || (ts->ignoreSet & RPMPROB_FILTER_REPLACEOLDFILES)), ts->probs, ts->transFlags); - break; + /*@switchbreak@*/ break; case TR_REMOVED: if (!beingRemoved) (void) handleRmvdInstalledFiles(fi, ts->rpmdb, shared, nexti - i); - break; + /*@switchbreak@*/ break; } } @@ -1923,14 +1931,14 @@ int rpmRunTransactions( rpmTransactionSet ts, switch (fi->type) { case TR_ADDED: if (!(ts->di && fi->fc)) - break; + /*@switchbreak@*/ break; for (i = 0; i < ts->filesystemCount; i++) { dip = ts->di + i; /* XXX Avoid FAT and other file systems that have not inodes. */ if (dip->iavail <= 0) - continue; + /*@innercontinue@*/ continue; if (adj_fs_blocks(dip->bneeded) > dip->bavail) psAppend(ts->probs, RPMPROB_DISKSPACE, fi->ap, @@ -1942,9 +1950,9 @@ int rpmRunTransactions( rpmTransactionSet ts, ts->filesystems[i], NULL, NULL, (adj_fs_blocks(dip->ineeded) - dip->iavail)); } - break; + /*@switchbreak@*/ break; case TR_REMOVED: - break; + /*@switchbreak@*/ break; } } tsi = tsFreeIterator(tsi); @@ -2002,11 +2010,11 @@ int rpmRunTransactions( rpmTransactionSet ts, psm->fi = fi; switch (fi->type) { case TR_ADDED: - break; + /*@switchbreak@*/ break; case TR_REMOVED: if (ts->transFlags & RPMTRANS_FLAG_REPACKAGE) (void) psmStage(psm, PSM_PKGSAVE); - break; + /*@switchbreak@*/ break; } } tsi = tsFreeIterator(tsi); @@ -2024,8 +2032,7 @@ int rpmRunTransactions( rpmTransactionSet ts, gotfd = 0; psm->fi = fi; - switch (fi->type) - { + switch (fi->type) { case TR_ADDED: alp = tsGetAlp(tsi); assert(alp == fi->ap); @@ -2091,17 +2098,17 @@ assert(alp == fi->ap); alp->key, ts->notifyData); alp->fd = NULL; } - break; + /*@switchbreak@*/ break; case TR_REMOVED: oc = tsGetOc(tsi); /* If install failed, then we shouldn't erase. */ if (ts->order[oc].u.removed.dependsOnIndex == lastFailed) - break; + /*@switchbreak@*/ break; if (psmStage(psm, PSM_PKGERASE)) ourrc++; - break; + /*@switchbreak@*/ break; } (void) rpmdbSync(ts->rpmdb); } |