summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/expression.c14
-rw-r--r--build/files.c1
-rw-r--r--build/myftw.c5
-rw-r--r--build/myftw.h6
-rw-r--r--build/pack.c1
-rw-r--r--build/parsePreamble.c2
-rw-r--r--build/parseScript.c1
-rw-r--r--build/parseSpec.c4
-rw-r--r--build/spec.c7
9 files changed, 33 insertions, 8 deletions
diff --git a/build/expression.c b/build/expression.c
index 71bc588ab..9a2d69e43 100644
--- a/build/expression.c
+++ b/build/expression.c
@@ -41,6 +41,7 @@ typedef struct _value {
/**
*/
static Value valueMakeInteger(int i)
+ /*@*/
{
Value v;
@@ -53,6 +54,7 @@ static Value valueMakeInteger(int i)
/**
*/
static Value valueMakeString(/*@only@*/ const char *s)
+ /*@*/
{
Value v;
@@ -65,6 +67,7 @@ static Value valueMakeString(/*@only@*/ const char *s)
/**
*/
static void valueFree( /*@only@*/ Value v)
+ /*@modifies v @*/
{
if (v) {
if (v->type == VALUE_TYPE_STRING)
@@ -75,6 +78,7 @@ static void valueFree( /*@only@*/ Value v)
#ifdef DEBUG_PARSER
static void valueDump(const char *msg, Value v, FILE *fp)
+ /*@*/
{
if (msg)
fprintf(fp, "%s ", msg);
@@ -162,6 +166,7 @@ ETTE_t exprTokTable[] = {
};
static const char *prToken(int val)
+ /*@*/
{
ETTE_t *et;
@@ -177,6 +182,7 @@ static const char *prToken(int val)
* @param state expression parser state
*/
static int rdToken(ParseState state)
+ /*@modifies state->nextToken @*/
{
int token;
Value v = NULL;
@@ -310,12 +316,14 @@ static int rdToken(ParseState state)
return 0;
}
-static Value doLogical(ParseState state);
+static Value doLogical(ParseState state)
+ /*@*/;
/**
* @param state expression parser state
*/
static Value doPrimary(ParseState state)
+ /*@modifies state->nextToken @*/
{
Value v;
@@ -392,6 +400,7 @@ static Value doPrimary(ParseState state)
* @param state expression parser state
*/
static Value doMultiplyDivide(ParseState state)
+ /*@modifies state->nextToken @*/
{
Value v1, v2 = NULL;
@@ -441,6 +450,7 @@ static Value doMultiplyDivide(ParseState state)
* @param state expression parser state
*/
static Value doAddSubtract(ParseState state)
+ /*@modifies state->nextToken @*/
{
Value v1, v2 = NULL;
@@ -499,6 +509,7 @@ static Value doAddSubtract(ParseState state)
* @param state expression parser state
*/
static Value doRelational(ParseState state)
+ /*@modifies state->nextToken @*/
{
Value v1, v2 = NULL;
@@ -590,6 +601,7 @@ static Value doRelational(ParseState state)
* @param state expression parser state
*/
static Value doLogical(ParseState state)
+ /*@modifies state->nextToken @*/
{
Value v1, v2 = NULL;
diff --git a/build/files.c b/build/files.c
index d27840391..6f10598b9 100644
--- a/build/files.c
+++ b/build/files.c
@@ -211,6 +211,7 @@ static void dumpAttrRec(const char * msg, AttrRec ar)
/**
*/
static char *strtokWithQuotes(char *s, char *delim)
+ /*@*/
{
static char *olds = NULL;
char *token;
diff --git a/build/myftw.c b/build/myftw.c
index b30ce6f24..c91b8c648 100644
--- a/build/myftw.c
+++ b/build/myftw.c
@@ -57,6 +57,7 @@ myftw_dir (DIR **dirs, int level, int descriptors,
char *dir, size_t len,
myftwFunc func,
void *fl)
+ /*@*/
{
int got;
struct dirent *entry;
@@ -127,9 +128,7 @@ myftw_dir (DIR **dirs, int level, int descriptors,
else
flag = MYFTW_F;
- /*@-modunconnomods@*/
retval = (*func) (fl, dir, &s);
- /*@=modunconnomods@*/
if (flag == MYFTW_D)
{
@@ -225,9 +224,7 @@ int myftw (const char *dir,
len = strlen (dir);
memcpy ((void *) buf, (void *) dir, len + 1);
- /*@-modunconnomods@*/
retval = (*func) (fl, buf, &s);
- /*@=modunconnomods@*/
if (flag == MYFTW_D)
{
diff --git a/build/myftw.h b/build/myftw.h
index 3b19d7abc..074f3edae 100644
--- a/build/myftw.h
+++ b/build/myftw.h
@@ -18,9 +18,11 @@
extern "C" {
#endif
-typedef int (*myftwFunc) (void *fl, const char *name, struct stat *statp);
+typedef int (*myftwFunc) (void *fl, const char *name, struct stat *statp)
+ /*@*/;
-int myftw (const char *dir, int descriptors, myftwFunc func, void *fl);
+int myftw (const char *dir, int descriptors, myftwFunc func, void *fl)
+ /*@modifies *fl, fileSystem @*/;
#ifdef __cplusplus
}
diff --git a/build/pack.c b/build/pack.c
index eeafff458..dfb936e4d 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -343,6 +343,7 @@ static unsigned char header_magic[8] = {
static int rpmpkg_version = -1;
static int rpmLeadVersion(void)
+ /*@*/
{
int rpmlead_version;
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index bc0bb0184..d5b182189 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -253,7 +253,7 @@ static int checkForValidArchitectures(Spec spec)
* @return 0 if OK
*/
static int checkForRequired(Header h, const char * NVR)
- /* LCL: parse error here with modifies */
+ /*@modifies h @*/ /* LCL: parse error here with modifies */
{
int res = 0;
rpmTag * p;
diff --git a/build/parseScript.c b/build/parseScript.c
index 6f6917c1e..d94f1539d 100644
--- a/build/parseScript.c
+++ b/build/parseScript.c
@@ -15,6 +15,7 @@
*/
static int addTriggerIndex(Package pkg, const char *file,
const char *script, const char *prog)
+ /*@modifies pkg->triggerFiles @*/
{
struct TriggerFileEntry *tfe;
struct TriggerFileEntry *list = pkg->triggerFiles;
diff --git a/build/parseSpec.c b/build/parseSpec.c
index c86ed66ee..84324ee3d 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -43,6 +43,7 @@ static struct PartRec {
/**
*/
static inline void initParts(struct PartRec *p)
+ /*@modifies p->len @*/
{
for (; p->token != NULL; p++)
p->len = strlen(p->token);
@@ -70,6 +71,7 @@ rpmParseState isPart(const char *line)
/**
*/
static int matchTok(const char *token, const char *line)
+ /*@*/
{
const char *b, *be = line;
size_t toklen = strlen(token);
@@ -100,6 +102,7 @@ void handleComments(char *s)
/**
*/
static void forceIncludeFile(Spec spec, const char * fileName)
+ /*@modifies spec->fileStack @*/
{
OFI_t * ofi;
@@ -112,6 +115,7 @@ static void forceIncludeFile(Spec spec, const char * fileName)
/**
*/
static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
+ /*@modifies spec->nextline @*/
{
char *last;
char ch;
diff --git a/build/spec.c b/build/spec.c
index 1ec0043e9..785304b77 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -25,6 +25,7 @@ extern struct MacroContext_s rpmGlobalMacroContext;
*/
static inline
/*@null@*/ struct TriggerFileEntry * freeTriggerFiles(/*@only@*/ /*@null@*/ struct TriggerFileEntry * p)
+ /*@modifies p @*/
{
struct TriggerFileEntry *o, *q = p;
@@ -46,6 +47,7 @@ static inline
*/
static inline
/*@null@*/ struct Source * freeSources(/*@only@*/ /*@null@*/ struct Source * s)
+ /*@modifies s @*/
{
struct Source *r, *t = s;
@@ -189,6 +191,7 @@ Package freePackages(Package packages)
/**
*/
static inline /*@owned@*/ struct Source *findSource(Spec spec, int num, int flag)
+ /*@*/
{
struct Source *p;
@@ -338,6 +341,7 @@ int addSource(Spec spec, Package pkg, const char *field, int tag)
/**
*/
static inline /*@only@*/ /*@null@*/ speclines newSl(void)
+ /*@*/
{
speclines sl = NULL;
if (specedit) {
@@ -352,6 +356,7 @@ static inline /*@only@*/ /*@null@*/ speclines newSl(void)
/**
*/
static inline /*@null@*/ speclines freeSl(/*@only@*/ /*@null@*/ speclines sl)
+ /*@modifies sl @*/
{
int i;
if (sl == NULL) return NULL;
@@ -366,6 +371,7 @@ static inline /*@null@*/ speclines freeSl(/*@only@*/ /*@null@*/ speclines sl)
/**
*/
static inline /*@only@*/ /*@null@*/ spectags newSt(void)
+ /*@*/
{
spectags st = NULL;
if (specedit) {
@@ -380,6 +386,7 @@ static inline /*@only@*/ /*@null@*/ spectags newSt(void)
/**
*/
static inline /*@null@*/ spectags freeSt(/*@only@*/ /*@null@*/ spectags st)
+ /*@modifies st @*/
{
int i;
if (st == NULL) return NULL;