diff options
Diffstat (limited to 'lib/rpmts.c')
-rw-r--r-- | lib/rpmts.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/rpmts.c b/lib/rpmts.c index 9f23790d3..cb98fc2d1 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -185,10 +185,13 @@ 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", "x86_64", "alpha", "alphaev5", "alphaev56", "alphapca56", "alphaev6", "alphaev67", @@ -206,6 +209,7 @@ static int isArch(const char * arch) "noarch", NULL, }; +/*@=nullassign@*/ for (av = arches; *av != NULL; av++) { if (!strcmp(arch, *av)) @@ -213,6 +217,7 @@ static int isArch(const char * arch) } return 0; } +/*@=boundsread@*/ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, const void * keyp, size_t keylen) @@ -225,7 +230,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, return NULL; /* Parse out "N(EVR).A" tokens from a label key. */ -/*@-branchstate@*/ +/*@-bounds -branchstate@*/ if (rpmtag == RPMDBI_LABEL && keyp != NULL) { const char * s = keyp; const char *se; @@ -239,7 +244,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, switch (c) { default: *t++ = c; - break; + /*@switchbreak@*/ break; case '(': /* XXX Fail if nested parens. */ if (level++ != 0) { @@ -248,7 +253,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, } /* Parse explicit epoch. */ for (se = s; *se && xisdigit(*se); se++) - ; + {}; if (*se == ':') { /* XXX skip explicit epoch's (for now) */ *t++ = '-'; @@ -257,7 +262,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, /* No Epoch: found. Convert '(' to '-' and chug. */ *t++ = '-'; } - break; + /*@switchbreak@*/ break; case ')': /* XXX Fail if nested parens. */ if (--level != 0) { @@ -265,7 +270,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, return NULL; } /* Don't copy trailing ')' */ - break; + /*@switchbreak@*/ break; } } if (level) { @@ -281,7 +286,7 @@ rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag, arch = t; } } -/*@=branchstate@*/ +/*@=bounds =branchstate@*/ mi = rpmdbInitIterator(ts->rdb, rpmtag, keyp, keylen); |