diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/.lclintrc | 2 | ||||
-rw-r--r-- | build/expression.c | 4 | ||||
-rw-r--r-- | build/files.c | 32 | ||||
-rw-r--r-- | build/misc.c | 2 | ||||
-rw-r--r-- | build/myftw.c | 2 | ||||
-rw-r--r-- | build/names.c | 16 | ||||
-rw-r--r-- | build/pack.c | 8 | ||||
-rw-r--r-- | build/parseBuildInstallClean.c | 2 | ||||
-rw-r--r-- | build/parseChangelog.c | 4 | ||||
-rw-r--r-- | build/parsePreamble.c | 12 | ||||
-rw-r--r-- | build/parsePrep.c | 6 | ||||
-rw-r--r-- | build/parseScript.c | 2 | ||||
-rw-r--r-- | build/parseSpec.c | 8 | ||||
-rw-r--r-- | build/poptBT.c | 2 | ||||
-rw-r--r-- | build/reqprov.c | 2 | ||||
-rw-r--r-- | build/spec.c | 12 |
16 files changed, 115 insertions, 1 deletions
diff --git a/build/.lclintrc b/build/.lclintrc index 024e1a355..a9eced267 100644 --- a/build/.lclintrc +++ b/build/.lclintrc @@ -14,7 +14,7 @@ # --- in progress #+bounds # 281 -#+boundswrite # 132 ++boundswrite # 132 # --- +partial artifacts -declundef diff --git a/build/expression.c b/build/expression.c index 8921c3294..e1d80098d 100644 --- a/build/expression.c +++ b/build/expression.c @@ -181,6 +181,7 @@ static const char *prToken(int val) /** * @param state expression parser state */ +/*@-boundswrite@*/ static int rdToken(ParseState state) /*@globals rpmGlobalMacroContext @*/ /*@modifies state->nextToken, state->p, state->tokenValue, @@ -317,6 +318,7 @@ static int rdToken(ParseState state) return 0; } +/*@=boundswrite@*/ static Value doLogical(ParseState state) /*@globals rpmGlobalMacroContext @*/ @@ -461,6 +463,7 @@ static Value doMultiplyDivide(ParseState state) /** * @param state expression parser state */ +/*@-boundswrite@*/ static Value doAddSubtract(ParseState state) /*@globals rpmGlobalMacroContext @*/ /*@modifies state->nextToken, state->p, state->tokenValue, @@ -520,6 +523,7 @@ static Value doAddSubtract(ParseState state) if (v2) valueFree(v2); return v1; } +/*@=boundswrite@*/ /** * @param state expression parser state diff --git a/build/files.c b/build/files.c index 8912bf2ba..bcbf2e82d 100644 --- a/build/files.c +++ b/build/files.c @@ -216,6 +216,7 @@ static void dumpAttrRec(const char * msg, AttrRec ar) /** */ +/*@-boundswrite@*/ static char *strtokWithQuotes(char *s, char *delim) /*@modifies *s @*/ { @@ -256,6 +257,7 @@ static char *strtokWithQuotes(char *s, char *delim) return token; /*@=retalias =temptrans @*/ } +/*@=boundswrite@*/ /** */ @@ -311,6 +313,7 @@ VFA_t verifyAttrs[] = { * @param fl package file tree walk data * @return 0 on success */ +/*@-boundswrite@*/ static int parseForVerify(char * buf, FileList fl) /*@modifies buf, fl->processingFailed, fl->currentVerifyFlags, fl->defVerifyFlags, @@ -398,6 +401,7 @@ static int parseForVerify(char * buf, FileList fl) return 0; } +/*@=boundswrite@*/ #define isAttrDefault(_ars) ((_ars)[0] == '-' && (_ars)[1] == '\0') @@ -407,6 +411,7 @@ static int parseForVerify(char * buf, FileList fl) * @param fl package file tree walk data * @return 0 on success */ +/*@-boundswrite@*/ static int parseForDev(char * buf, FileList fl) /*@modifies buf, fl->processingFailed, fl->noGlob, fl->devtype, fl->devmajor, fl->devminor @*/ @@ -500,6 +505,7 @@ exit: } return rc; } +/*@=boundswrite@*/ /** * Parse %attr and %defattr from file manifest. @@ -507,6 +513,7 @@ exit: * @param fl package file tree walk data * @return 0 on success */ +/*@-boundswrite@*/ static int parseForAttr(char * buf, FileList fl) /*@modifies buf, fl->processingFailed, fl->cur_ar, fl->def_ar, @@ -631,6 +638,7 @@ static int parseForAttr(char * buf, FileList fl) return 0; } +/*@=boundswrite@*/ /** * Parse %config from file manifest. @@ -638,6 +646,7 @@ static int parseForAttr(char * buf, FileList fl) * @param fl package file tree walk data * @return 0 on success */ +/*@-boundswrite@*/ static int parseForConfig(char * buf, FileList fl) /*@modifies buf, fl->processingFailed, fl->currentFlags @*/ @@ -695,6 +704,7 @@ static int parseForConfig(char * buf, FileList fl) return 0; } +/*@=boundswrite@*/ /** */ @@ -709,6 +719,7 @@ static int langCmp(const void * ap, const void * bp) /*@*/ * @param fl package file tree walk data * @return 0 on success */ +/*@-bounds@*/ static int parseForLang(char * buf, FileList fl) /*@modifies buf, fl->processingFailed, fl->currentLangs, fl->nLangs @*/ @@ -795,9 +806,11 @@ static int parseForLang(char * buf, FileList fl) return 0; } +/*@=bounds@*/ /** */ +/*@-boundswrite@*/ static int parseForRegexLang(const char * fileName, /*@out@*/ char ** lang) /*@globals rpmGlobalMacroContext @*/ /*@modifies *lang, rpmGlobalMacroContext @*/ @@ -839,9 +852,11 @@ static int parseForRegexLang(const char * fileName, /*@out@*/ char ** lang) *lang = buf; return 0; } +/*@=boundswrite@*/ /** */ +/*@-boundswrite@*/ static int parseForRegexMultiLib(const char *fileName) /*@globals rpmGlobalMacroContext @*/ /*@modifies rpmGlobalMacroContext @*/ @@ -871,6 +886,7 @@ static int parseForRegexMultiLib(const char *fileName) return 0; } +/*@=boundswrite@*/ /** */ @@ -906,6 +922,7 @@ VFA_t virtualFileAttributes[] = { * @retval fileName * @return 0 on success */ +/*@-boundswrite@*/ static int parseForSimple(/*@unused@*/Spec spec, Package pkg, char * buf, FileList fl, /*@out@*/ const char ** fileName) /*@globals rpmGlobalMacroContext @*/ @@ -1031,6 +1048,7 @@ static int parseForSimple(/*@unused@*/Spec spec, Package pkg, char * buf, return res; } +/*@=boundswrite@*/ /** */ @@ -1101,6 +1119,7 @@ static int checkHardLinks(FileList fl) * @param h * @param isSrc */ +/*@-bounds@*/ static void genCpioListAndHeader(/*@partial@*/ FileList fl, rpmfi * cpioList, Header h, int isSrc) /*@globals rpmGlobalMacroContext, @@ -1453,9 +1472,11 @@ static void genCpioListAndHeader(/*@partial@*/ FileList fl, /*@=branchstate@*/ } } +/*@=bounds@*/ /** */ +/*@-boundswrite@*/ static /*@null@*/ FileListRec freeFileList(/*@only@*/ FileListRec fileList, int count) /*@*/ @@ -1468,6 +1489,7 @@ static /*@null@*/ FileListRec freeFileList(/*@only@*/ FileListRec fileList, fileList = _free(fileList); return NULL; } +/*@=boundswrite@*/ /** * Add a file to the package manifest. @@ -1476,6 +1498,7 @@ static /*@null@*/ FileListRec freeFileList(/*@only@*/ FileListRec fileList, * @param statp file stat (possibly NULL) * @return 0 on success */ +/*@-boundswrite@*/ static int addFile(FileList fl, const char * diskURL, /*@null@*/ struct stat * statp) /*@globals rpmGlobalMacroContext, @@ -1690,6 +1713,7 @@ static int addFile(FileList fl, const char * diskURL, return 0; } +/*@=boundswrite@*/ /** * Add a file to a binary package. @@ -1698,6 +1722,7 @@ static int addFile(FileList fl, const char * diskURL, * @param fileURL * @return 0 on success */ +/*@-boundswrite@*/ static int processBinaryFile(/*@unused@*/ Package pkg, FileList fl, const char * fileURL) /*@globals rpmGlobalMacroContext, @@ -1770,9 +1795,11 @@ exit: fl->processingFailed = 1; return rc; } +/*@=boundswrite@*/ /** */ +/*@-boundswrite@*/ static int processPackageFiles(Spec spec, Package pkg, int installSpecialDoc, int test) /*@globals rpmGlobalMacroContext, @@ -2037,6 +2064,7 @@ exit: fl.docDirs[fl.docDirCount] = _free(fl.docDirs[fl.docDirCount]); return fl.processingFailed; } +/*@=boundswrite@*/ void initSourceHeader(Spec spec) { @@ -2238,6 +2266,7 @@ int processSourceFiles(Spec spec) /** */ +/*@-boundswrite@*/ static StringBuf getOutputFrom(char * dir, char * argv[], const char * writePtr, int writeBytesLeft, int failNonZero) @@ -2375,6 +2404,7 @@ top: } return readBuff; } +/*@=boundswrite@*/ /** */ @@ -2435,6 +2465,7 @@ DepMsg_t depMsgs[] = { /** */ +/*@-bounds@*/ static int generateDepends(Spec spec, Package pkg, rpmfi cpioList, int multiLib) /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/ @@ -2578,6 +2609,7 @@ static int generateDepends(Spec spec, Package pkg, rpmfi cpioList, int multiLib) myargv = _free(myargv); return rc; } +/*@=bounds@*/ /** */ diff --git a/build/misc.c b/build/misc.c index 05e08067e..e14f75d8d 100644 --- a/build/misc.c +++ b/build/misc.c @@ -6,6 +6,7 @@ #include "rpmbuild.h" #include "debug.h" +/*@-boundswrite@*/ int parseNum(const char * line, int * res) { char * s1 = NULL; @@ -16,3 +17,4 @@ int parseNum(const char * line, int * res) if (res) *res = rc; return (((*s1) || (s1 == line) || (rc == ULONG_MAX)) ? 1 : 0); } +/*@=boundswrite@*/ diff --git a/build/myftw.c b/build/myftw.c index ce04f8576..a55b06781 100644 --- a/build/myftw.c +++ b/build/myftw.c @@ -51,6 +51,7 @@ Cambridge, MA 02139, USA. */ /** */ +/*@-boundswrite@*/ /*@-nullstate@*/ static int myftw_dir (DIR **dirs, int level, int descriptors, @@ -173,6 +174,7 @@ myftw_dir (DIR **dirs, int level, int descriptors, return errno == 0 ? 0 : -1; } /*@=nullstate@*/ +/*@=boundswrite@*/ /* Call a function on every element in a directory tree. */ diff --git a/build/names.c b/build/names.c index d3a1c1d52..aecb943c4 100644 --- a/build/names.c +++ b/build/names.c @@ -26,6 +26,7 @@ static ugstr_t gnames[1024]; /*@unchecked@*/ static int gid_used = 0; +/*@-boundswrite@*/ void freeNames(void) { int x; @@ -34,7 +35,9 @@ void freeNames(void) for (x = 0; x < gid_used; x++) gnames[x] = _free(gnames[x]); } +/*@=boundswrite@*/ +/*@-boundswrite@*/ const char *getUname(uid_t uid) { struct passwd *pw; @@ -56,7 +59,9 @@ const char *getUname(uid_t uid) unames[x] = (pw ? xstrdup(pw->pw_name) : NULL); return unames[x]; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ const char *getUnameS(const char *uname) { struct passwd *pw; @@ -78,7 +83,9 @@ const char *getUnameS(const char *uname) unames[x] = (pw ? xstrdup(pw->pw_name) : xstrdup(uname)); return unames[x]; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ uid_t getUidS(const char *uname) { struct passwd *pw; @@ -100,7 +107,9 @@ uid_t getUidS(const char *uname) unames[x] = (pw ? xstrdup(pw->pw_name) : xstrdup(uname)); return uids[x]; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ const char *getGname(gid_t gid) { struct group *gr; @@ -122,7 +131,9 @@ const char *getGname(gid_t gid) gnames[x] = (gr ? xstrdup(gr->gr_name) : NULL); return gnames[x]; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ const char *getGnameS(const char *gname) { struct group *gr; @@ -144,7 +155,9 @@ const char *getGnameS(const char *gname) gnames[x] = (gr ? xstrdup(gr->gr_name) : xstrdup(gname)); return gnames[x]; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ gid_t getGidS(const char *gname) { struct group *gr; @@ -166,6 +179,7 @@ gid_t getGidS(const char *gname) gnames[x] = (gr ? xstrdup(gr->gr_name) : xstrdup(gname)); return gids[x]; } +/*@=boundswrite@*/ int_32 *const getBuildTime(void) { @@ -176,6 +190,7 @@ int_32 *const getBuildTime(void) return buildTime; } +/*@-boundswrite@*/ const char *const buildHost(void) { static char hostname[1024]; @@ -198,4 +213,5 @@ const char *const buildHost(void) } return(hostname); } +/*@=boundswrite@*/ /*@=mods@*/ diff --git a/build/pack.c b/build/pack.c index eb9519dc6..21cd0a922 100644 --- a/build/pack.c +++ b/build/pack.c @@ -280,6 +280,7 @@ static int processScriptFiles(Spec spec, Package pkg) return 0; } +/*@-boundswrite@*/ int readRPM(const char *fileName, Spec *specp, struct rpmlead *lead, Header *sigs, CSA_t csa) { @@ -368,6 +369,7 @@ int readRPM(const char *fileName, Spec *specp, struct rpmlead *lead, return 0; } +/*@=boundswrite@*/ #ifdef DYING /*@unchecked@*/ @@ -402,6 +404,7 @@ static int rpmLeadVersion(void) return rpmlead_version; } +/*@-boundswrite@*/ int writeRPM(Header *hdrp, const char *fileName, int type, CSA_t csa, char *passPhrase, const char **cookie) { @@ -711,6 +714,7 @@ exit: return rc; } +/*@=boundswrite@*/ /*@unchecked@*/ static int_32 copyTags[] = { @@ -720,6 +724,7 @@ static int_32 copyTags[] = { 0 }; +/*@-boundswrite@*/ int packageBinaries(Spec spec) { struct cpioSourceArchive_s csabuf; @@ -818,7 +823,9 @@ int packageBinaries(Spec spec) return 0; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ int packageSources(Spec spec) { struct cpioSourceArchive_s csabuf; @@ -856,3 +863,4 @@ int packageSources(Spec spec) } return rc; } +/*@=boundswrite@*/ diff --git a/build/parseBuildInstallClean.c b/build/parseBuildInstallClean.c index 9012f78f1..dcca38814 100644 --- a/build/parseBuildInstallClean.c +++ b/build/parseBuildInstallClean.c @@ -9,6 +9,7 @@ /*@access StringBuf @*/ +/*@-boundswrite@*/ int parseBuildInstallClean(Spec spec, rpmParseState parsePart) { int nextPart, rc; @@ -52,3 +53,4 @@ int parseBuildInstallClean(Spec spec, rpmParseState parsePart) return nextPart; } +/*@=boundswrite@*/ diff --git a/build/parseChangelog.c b/build/parseChangelog.c index 632cf207c..539c49fed 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -34,6 +34,7 @@ void addChangelogEntry(Header h, time_t time, const char *name, const char *text * @retval secs secs since the unix epoch * @return 0 on success, -1 on error */ +/*@-boundswrite@*/ static int dateToTimet(const char * datestr, /*@out@*/ time_t * secs) /*@modifies *secs @*/ { @@ -98,6 +99,7 @@ static int dateToTimet(const char * datestr, /*@out@*/ time_t * secs) return 0; } +/*@=boundswrite@*/ /** * Add %changelog section to header. @@ -105,6 +107,7 @@ static int dateToTimet(const char * datestr, /*@out@*/ time_t * secs) * @param sb changelog strings * @return 0 on success */ +/*@-boundswrite@*/ static int addChangelog(Header h, StringBuf sb) /*@modifies h @*/ { @@ -201,6 +204,7 @@ static int addChangelog(Header h, StringBuf sb) return 0; } +/*@=boundswrite@*/ int parseChangelog(Spec spec) { diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 4ba021837..23dccfdd0 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -66,6 +66,7 @@ static void addOrAppendListEntry(Header h, int_32 tag, char * line) /** */ +/*@-boundswrite@*/ static int parseSimplePart(char *line, /*@out@*/char **name, /*@out@*/int *flag) /*@globals internalState@*/ /*@modifies *name, *flag, internalState @*/ @@ -96,6 +97,7 @@ static int parseSimplePart(char *line, /*@out@*/char **name, /*@out@*/int *flag) return (strtok(NULL, " \t\n")) ? 1 : 0; } +/*@=boundswrite@*/ /** */ @@ -140,6 +142,7 @@ static struct tokenBits_s buildScriptBits[] = { /** */ +/*@-boundswrite@*/ static int parseBits(const char * s, const tokenBits tokbits, /*@out@*/ rpmsenseFlags * bp) /*@modifies *bp @*/ @@ -173,6 +176,7 @@ static int parseBits(const char * s, const tokenBits tokbits, if (c == 0 && bp) *bp = bits; return (c ? RPMERR_BADSPEC : 0); } +/*@=boundswrite@*/ /** */ @@ -339,6 +343,7 @@ static void fillOutMainPackage(Header h) /** */ +/*@-boundswrite@*/ static int readIcon(Header h, const char * file) /*@globals rpmGlobalMacroContext, fileSystem@*/ @@ -397,6 +402,7 @@ exit: fn = _free(fn); return rc; } +/*@=boundswrite@*/ spectag stashSt(Spec spec, Header h, int tag, const char * lang) { @@ -442,6 +448,7 @@ extern int noLang; /** */ +/*@-boundswrite@*/ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro, const char *lang) /*@globals rpmGlobalMacroContext, @@ -702,6 +709,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, const char *macro, return 0; } +/*@=boundswrite@*/ /* This table has to be in a peculiar order. If one tag is the */ /* same as another, plus a few letters, it must come first. */ @@ -776,6 +784,7 @@ static inline void initPreambleList(void) /** */ +/*@-boundswrite@*/ static int findPreambleTag(Spec spec, /*@out@*/int * tag, /*@null@*/ /*@out@*/ const char ** macro, /*@out@*/ char * lang) /*@modifies *tag, *macro, *lang @*/ @@ -831,7 +840,9 @@ static int findPreambleTag(Spec spec, /*@out@*/int * tag, /*@=onlytrans =observertrans =dependenttrans@*/ return 0; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ int parsePreamble(Spec spec, int initialPackage) { int nextPart; @@ -927,3 +938,4 @@ int parsePreamble(Spec spec, int initialPackage) return nextPart; } +/*@=boundswrite@*/ diff --git a/build/parsePrep.c b/build/parsePrep.c index 1728abc86..489093d61 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -64,6 +64,7 @@ static int checkOwners(const char * urlfn) * @param removeEmpties include -E? * @return expanded %patch macro (NULL on error) */ +/*@-boundswrite@*/ /*@observer@*/ static char *doPatch(Spec spec, int c, int strip, const char *db, int reverse, int removeEmpties) /*@globals rpmGlobalMacroContext, @@ -150,6 +151,7 @@ static int checkOwners(const char * urlfn) urlfn = _free(urlfn); return buf; } +/*@=boundswrite@*/ /** * Expand %setup macro into %prep scriptlet. @@ -158,6 +160,7 @@ static int checkOwners(const char * urlfn) * @param quietly should -vv be omitted from tar? * @return expanded %setup macro (NULL on error) */ +/*@-boundswrite@*/ /*@observer@*/ static const char *doUntar(Spec spec, int c, int quietly) /*@globals rpmGlobalMacroContext, fileSystem@*/ @@ -268,6 +271,7 @@ static int checkOwners(const char * urlfn) urlfn = _free(urlfn); return buf; } +/*@=boundswrite@*/ /** * Parse %setup macro. @@ -432,6 +436,7 @@ static int doSetupMacro(Spec spec, char *line) * @param line current line from spec file * @return 0 on success */ +/*@-boundswrite@*/ static int doPatchMacro(Spec spec, char *line) /*@globals rpmGlobalMacroContext, fileSystem@*/ @@ -539,6 +544,7 @@ static int doPatchMacro(Spec spec, char *line) return 0; } +/*@=boundswrite@*/ int parsePrep(Spec spec) { diff --git a/build/parseScript.c b/build/parseScript.c index 95c88921f..4e30f1382 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -66,6 +66,7 @@ static int addTriggerIndex(Package pkg, const char *file, /* We then pass the remaining arguments to parseRCPOT, along with */ /* an index we just determined. */ +/*@-boundswrite@*/ int parseScript(Spec spec, int parsePart) { /* There are a few options to scripts: */ @@ -315,3 +316,4 @@ exit: return rc; } +/*@=boundswrite@*/ diff --git a/build/parseSpec.c b/build/parseSpec.c index 2fa374bab..9dc84d078 100644 --- a/build/parseSpec.c +++ b/build/parseSpec.c @@ -94,12 +94,14 @@ static int matchTok(const char *token, const char *line) return rc; } +/*@-boundswrite@*/ void handleComments(char *s) { SKIPSPACE(s); if (*s == '#') *s = '\0'; } +/*@=boundswrite@*/ /** */ @@ -116,6 +118,7 @@ static void forceIncludeFile(Spec spec, const char * fileName) /** */ +/*@-boundswrite@*/ static int copyNextLine(Spec spec, OFI_t *ofi, int strip) /*@globals rpmGlobalMacroContext, fileSystem @*/ @@ -175,7 +178,9 @@ static int copyNextLine(Spec spec, OFI_t *ofi, int strip) return 0; } +/*@=boundswrite@*/ +/*@-boundswrite@*/ int readLine(Spec spec, int strip) { #ifdef DYING @@ -354,6 +359,7 @@ retry: return 0; /*@=compmempass@*/ } +/*@=boundswrite@*/ void closeSpec(Spec spec) { @@ -374,6 +380,7 @@ extern int noLang; /* XXX FIXME: pass as arg */ /*@=redecl@*/ /*@todo Skip parse recursion if os is not compatible. @*/ +/*@-boundswrite@*/ int parseSpec(Spec *specp, const char *specFile, const char *rootURL, const char *buildRootURL, int recursing, const char *passPhrase, char *cookie, int anyarch, int force) @@ -614,3 +621,4 @@ fprintf(stderr, "*** PS buildRootURL(%s) %p macro set to %s\n", spec->buildRootU return 0; } +/*@=boundswrite@*/ diff --git a/build/poptBT.c b/build/poptBT.c index 5b961943a..972f25f5b 100644 --- a/build/poptBT.c +++ b/build/poptBT.c @@ -72,6 +72,7 @@ static int useCatalog = 0; /** */ +/*@-boundswrite@*/ static void buildArgCallback( /*@unused@*/ poptContext con, /*@unused@*/ enum poptCallbackReason reason, const struct poptOption * opt, const char * arg, @@ -131,6 +132,7 @@ static void buildArgCallback( /*@unused@*/ poptContext con, break; } } +/*@=boundswrite@*/ /** */ diff --git a/build/reqprov.c b/build/reqprov.c index 18775014b..cebdadc29 100644 --- a/build/reqprov.c +++ b/build/reqprov.c @@ -117,6 +117,7 @@ int addReqProv(/*@unused@*/ Spec spec, Header h, return 0; } +/*@-boundswrite@*/ int rpmlibNeedsFeature(Header h, const char * feature, const char * featureEVR) { char * reqname = alloca(sizeof("rpmlib()") + strlen(feature)); @@ -127,3 +128,4 @@ int rpmlibNeedsFeature(Header h, const char * feature, const char * featureEVR) return addReqProv(NULL, h, RPMSENSE_RPMLIB|(RPMSENSE_LESS|RPMSENSE_EQUAL), reqname, featureEVR, 0); } +/*@=boundswrite@*/ diff --git a/build/spec.c b/build/spec.c index 3c4f405f8..d0366af00 100644 --- a/build/spec.c +++ b/build/spec.c @@ -61,6 +61,7 @@ static inline return NULL; } +/*@-boundswrite@*/ int lookupPackage(Spec spec, const char *name, int flag, /*@out@*/Package *pkg) { const char *pname; @@ -101,6 +102,7 @@ int lookupPackage(Spec spec, const char *name, int flag, /*@out@*/Package *pkg) /*@-dependenttrans@*/ *pkg = p; /*@=dependenttrans@*/ return ((p == NULL) ? 1 : 0); } +/*@=boundswrite@*/ Package newPackage(Spec spec) { @@ -250,6 +252,7 @@ int parseNoSource(Spec spec, const char * field, int tag) return 0; } +/*@-boundswrite@*/ int addSource(Spec spec, Package pkg, const char *field, int tag) { struct Source *p; @@ -344,6 +347,7 @@ int addSource(Spec spec, Package pkg, const char *field, int tag) return 0; } +/*@=boundswrite@*/ /** */ @@ -364,6 +368,7 @@ static inline /*@only@*/ /*@null@*/ speclines newSl(void) /** */ +/*@-boundswrite@*/ static inline /*@null@*/ speclines freeSl(/*@only@*/ /*@null@*/ speclines sl) /*@modifies sl @*/ { @@ -376,6 +381,7 @@ static inline /*@null@*/ speclines freeSl(/*@only@*/ /*@null@*/ speclines sl) sl->sl_lines = _free(sl->sl_lines); return _free(sl); } +/*@=boundswrite@*/ /** */ @@ -421,7 +427,9 @@ Spec newSpec(void) spec->st = newSt(); spec->fileStack = NULL; +/*@-boundswrite@*/ spec->lbuf[0] = '\0'; +/*@=boundswrite@*/ spec->line = spec->lbuf; spec->nextline = NULL; spec->nextpeekc = '\0'; @@ -526,6 +534,7 @@ Spec freeSpec(Spec spec) spec->buildRestrictions = headerFree(spec->buildRestrictions, "spec->>buildRestrictions"); if (!spec->recursing) { +/*@-boundswrite@*/ if (spec->BASpecs != NULL) while (spec->BACount--) { /*@-unqualifiedtrans@*/ @@ -533,6 +542,7 @@ Spec freeSpec(Spec spec) freeSpec(spec->BASpecs[spec->BACount]); /*@=unqualifiedtrans@*/ } +/*@=boundswrite@*/ /*@-compdef@*/ spec->BASpecs = _free(spec->BASpecs); /*@=compdef@*/ @@ -558,7 +568,9 @@ Spec freeSpec(Spec spec) ofi->fd = NULL; ofi->fileName = NULL; ofi->lineNum = 0; +/*@-boundswrite@*/ ofi->readBuf[0] = '\0'; +/*@=boundswrite@*/ ofi->readPtr = NULL; ofi->next = NULL; |