-unrecogcomments # XXX ignore doxygen markings
+strict # lclint level
--includenest 16 # getting deep, sigh
+
+# --- in progress
+#+bounds # 281
+#+boundswrite # 132
# --- +partial artifacts
-declundef
-fielduse # 1 occurence <bits/sigset.h>
-forblock # tedious
-ifblock # tedious
--incondefs # <bits/{ipc,pthreadtypes}.h> heartburn
--matchfields # <bits/ipc.h> heartburn
-namechecks # tedious ANSI compliance checks
--numenummembers 1024 # RPMTAG has 138 members
--numstructfields 256 # Java jni.h has 229 fields
-ptrarith # tedious
-compdestroy
-mustdefine
--shiftimplementation
-#-shiftnegative
+-sys-dir-errors
-strictops
--strictusereleased
--stringliterallen 4096 # redhat*PubKey's are big
-whileblock # tedious
# --- not-yet at checks level
--ansi-reserved
+enumint
-mustfree
-predboolptr
# --- not-yet at standard level
-boolops
--predboolint
+boolint
+charint
+ignorequals
/* Call a function on every element in a directory tree. */
+/*@-bounds@*/
int myftw (const char *dir,
int descriptors,
myftwFunc func,
return retval;
}
+/*@=bounds@*/
+strict # lclint level
# --- in progress
-#+bounds
-#+boundswrite
+#+bounds # 629
+#+boundswrite # 317
-redecl
# --- +partial artifacts
-varuse
# --- not-yet at strict level
--bitwisesigned # pita
+-bitwisesigned # 255
-elseifcomplete # 95 occurences
-exportconst # 839 occurences
-exportfcn
-fielduse # 1 occurence <bits/sigset.h>
-forblock # tedious
-ifblock # tedious
--incondefs # <bits/{ipc,pthreadtypes}.h> heartburn
--namechecks # tedious ANSI compliance checks
+-namechecks # 1843 tedious ANSI compliance checks
-ptrarith # 164
-compdestroy # 66
-mustdefine # 66
--shiftimplementation # 696
+-sys-dir-errors
-strictops # 46
-whileblock # 54
/*@access Header@*/ /* XXX compared with NULL */
/*@access FD_t@*/ /* XXX compared with NULL */
+/*@-bounds@*/
char ** splitString(const char * str, int length, char sep)
{
const char * source;
return list;
}
+/*@=bounds@*/
void freeSplitString(char ** list)
{
/**
*/
+/*@-bounds@*/
static void installArgCallback( /*@unused@*/ poptContext con,
/*@unused@*/ enum poptCallbackReason reason,
const struct poptOption * opt, const char * arg,
}
/*@=branchstate@*/
}
+/*@=bounds@*/
/**
*/
* @param psm package state machine data
* @return 0 always
*/
+/*@-bounds@*/
static int markReplacedFiles(const PSM_t psm)
/*@globals fileSystem@*/
/*@modifies psm, fileSystem @*/
return 0;
}
+/*@=bounds@*/
/**
* Create directory if it does not exist, make sure path is writable.
return;
}
+/*@-bounds@*/
alKey rpmalAdd(rpmal * alistp, alKey pkgKey, fnpyKey key,
rpmds provides, rpmfi fi)
{
assert(((alNum)(alp - al->list)) == pkgNum);
return ((alKey)(alp - al->list));
}
+/*@=bounds@*/
/**
* Compare two available index entries by name (qsort/bsearch).
/** \ingroup rpmcli
* Should version 3 packages be produced?
*/
-/*@-redecl@*/
+/*@unchecked@*/
extern int _noDirTokens;
-/*@=redecl@*/
#ifdef __cplusplus
extern "C" {
return i;
}
-rpmds rpmdsInit(/*@returned@*/ /*@null@*/ rpmds ds)
+rpmds rpmdsInit(/*@null@*/ rpmds ds)
/*@modifies ds @*/
{
if (ds != NULL)
int_32 * Flags; /*!< Flags identifying context/comparison. */
rpmTagType Nt, EVRt, Ft; /*!< Tag data types. */
int_32 Count; /*!< No. of elements */
-/*@refs@*/ int nrefs; /*!< Reference count. */
+/*@refs@*/
+ int nrefs; /*!< Reference count. */
};
#endif /* _RPMDS_INTERNAL */
* @param msg
* @return new dependency set reference
*/
-/*@unused@*/
+/*@unused@*/ /*@newref@*/
rpmds rpmdsLink (/*@null@*/ rpmds ds, /*@null@*/ const char * msg)
/*@modifies ds @*/;
/** @todo Remove debugging entry from the ABI. */
+/*@newref@*/
rpmds XrpmdsLink (/*@null@*/ rpmds ds, /*@null@*/ const char * msg,
const char * fn, unsigned ln)
/*@modifies ds @*/;
* @param actions file dispositions
* @return header with relocated files
*/
+/*@-bounds@*/
static
Header relocateFileList(const rpmts ts, rpmfi fi,
Header origH, fileAction * actions)
return h;
}
+/*@=bounds@*/
rpmfi rpmfiFree(rpmfi fi, int freefimem)
{
};
/** @todo Generalize --freshen policies. */
+/*@-bounds@*/
int rpmInstall(rpmts ts,
struct rpmInstallArguments_s * ia,
const char ** fileArgv)
return eiu->numFailed;
}
+/*@=bounds@*/
int rpmErase(rpmts ts,
const struct rpmInstallArguments_s * ia,
/*@checked@*/
extern struct MacroContext_s * rpmCLIMacroContext;
-/*@observer@*/ /*@checked@*/
+/*@unchecked@*/ /*@observer@*/
extern const char * RPMVERSION;
-/*@observer@*/ /*@checked@*/
+/*@unchecked@*/ /*@observer@*/
extern const char * rpmNAME;
-/*@observer@*/ /*@checked@*/
+/*@unchecked@*/ /*@observer@*/
extern const char * rpmEVR;
-/*@checked@*/
+/*@unchecked@*/
extern int rpmFLAGS;
/*@=redecl@*/
/**
*/
+/*@-bounds@*/
static int rpmPlatform(const char * platform)
/*@globals nplatpat, platpat,
rpmGlobalMacroContext, fileSystem, internalState @*/
/*@=modobserver@*/
return rc;
}
+/*@=bounds@*/
# if defined(__linux__) && defined(__i386__)
/**
*/
+/*@-bounds@*/
static void addTE(rpmts ts, rpmte p, Header h,
/*@dependent@*/ /*@null@*/ fnpyKey key,
/*@null@*/ rpmRelocation * relocs)
p->relocs = NULL;
}
}
+/*@=bounds@*/
rpmte rpmteFree(rpmte te)
{
return strcmp(astr, bstr);
}
+/*@-bounds@*/
int rpmtsSolve(rpmts ts, rpmds ds)
{
const char * errstr;
return rc;
/*@=nullstate@*/
}
+/*@=bounds@*/
int rpmtsAvailable(rpmts ts, const rpmds ds)
{
* Create an empty transaction set.
* @return new transaction set
*/
-/*@only@*/
+/*@newref@*/
rpmts rpmtsCreate(void)
/*@*/;
/**
*/
/*@-mustmod@*/ /* FIX: fi->actions is modified. */
+/*@-bounds@*/
static void skipFiles(const rpmts ts, rpmfi fi)
/*@globals rpmGlobalMacroContext @*/
/*@modifies fi, rpmGlobalMacroContext @*/
#endif
if (languages) freeSplitString((char **)languages);
}
+/*@=bounds@*/
/*@=mustmod@*/
/**
-exportfcn # 25
-globs # 12 <ctype.h>
-ifblock # 202
--incondefs # 37 <bits/{ipc,pthreadtypes}.h> heartburn
-namechecks # 206
-ptrarith # 43
-mustdefine # 10
-shiftimplementation # 120
+-sys-dir-errors
-strictops # 16
-whileblock # 10
* Empty table marker to enable displaying popt alias/exec options.
*/
/*@-exportvar@*/
-/*@observer@*/ /*@checked@*/
+/*@unchecked@*/ /*@observer@*/
extern struct poptOption poptAliasOptions[];
/*@=exportvar@*/
#define POPT_AUTOALIAS { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptAliasOptions, \
* Auto help table options.
*/
/*@-exportvar@*/
-/*@observer@*/ /*@checked@*/
+/*@unchecked@*/ /*@observer@*/
extern struct poptOption poptHelpOptions[];
/*@=exportvar@*/
#define POPT_AUTOHELP { NULL, '\0', POPT_ARG_INCLUDE_TABLE, poptHelpOptions, \
-fielduse # 225 occurence <bits/sigset.h>
-forblock # tedious
-ifblock # tedious
--incondefs # 93 <bits/{ipc,pthreadtypes}.h> heartburn
-namechecks # 1679
-ptrarith # 201
-compdestroy # 125
-mustdefine # 76
--shiftimplementation # 296
+-sys-dir-errors
-strictops # 54
-strictusereleased # 3
if (((*vallenp) + need) >= (*allocedp)) {
if ((*allocedp) <= need)
(*allocedp) += need;
+/*@-shiftimplementation@*/
(*allocedp) <<= 1;
+/*@=shiftimplementation@*/
/*@-unqualifiedtrans@*/ /* FIX: double indirection */
(*valp) = xrealloc((*valp), (*allocedp)+1);
/*@=unqualifiedtrans@*/
if (((*vallenp) + need) >= (*allocedp)) {
if ((*allocedp) <= need)
(*allocedp) += need;
+/*@-shiftimplementation@*/
(*allocedp) <<= 1;
+/*@=shiftimplementation@*/
/*@-unqualifiedtrans@*/ /* FIX: double indirection */
(*valp) = xrealloc((*valp), (*allocedp)+1);
/*@=unqualifiedtrans@*/
if (((*vallenp) + need) >= (*allocedp)) {
if ((*allocedp) <= need)
(*allocedp) += need;
+/*@-shiftimplementation@*/
(*allocedp) <<= 1;
+/*@=shiftimplementation@*/
/*@-unqualifiedtrans@*/ /* FIX: double indirection */
(*valp) = xrealloc((*valp), (*allocedp)+1);
/*@=unqualifiedtrans@*/
if (((*vallenp) + need) >= (*allocedp)) {
if ((*allocedp) <= need)
(*allocedp) += need;
+/*@-shiftimplementation@*/
(*allocedp) <<= 1;
+/*@=shiftimplementation@*/
/*@-unqualifiedtrans@*/ /* FIX: double indirection */
(*valp) = xrealloc((*valp), (*allocedp)+1);
/*@=unqualifiedtrans@*/
if (((*vallenp) + need) >= (*allocedp)) {
if ((*allocedp) <= need)
(*allocedp) += need;
+/*@-shiftimplementation@*/
(*allocedp) <<= 1;
+/*@=shiftimplementation@*/
/*@-unqualifiedtrans@*/ /* FIX: double indirection */
(*valp) = xrealloc((*valp), (*allocedp)+1);
/*@=unqualifiedtrans@*/
goto EXPONENTIAL;
}
} else {
+/*@-shiftimplementation@*/
EXPONENTIAL: for (i = size; ; i <<= 1)
if ((p = (b + i)) >= t) {
if ((p = t - size) > b &&
else
b = p;
/*@=infloopsuncon@*/
+/*@=shiftimplementation@*/
COPY: b = t;
}
i = size;
* @return 0 on success
*/
int rpmdbRebuild(/*@null@*/ const char * prefix)
- /*@globals rpmGlobalMacroContext, fileSystem @*/
- /*@modifies rpmGlobalMacroContext, fileSystem @*/;
+ /*@globals rpmGlobalMacroContext, fileSystem, internalState @*/
+ /*@modifies rpmGlobalMacroContext, fileSystem, internalState @*/;
/**
* Mergesort, same arguments as qsort(2).
+strict # lclint level
+# --- in progress
+#+bounds # 334
+#+boundswrite # 152
+
# --- +partial artifacts
-declundef
-exportheadervar
-fielduse # 72
-forblock # tedious
-ifblock # tedious
--incondefs # 96 <bits/{ipc,pthreadtypes}.h> heartburn
--namechecks # 1454 tedious ANSI compliance checks
+-namechecks # 929 tedious ANSI compliance checks
-ptrarith # 104
-compdestroy # 21
-mustdefine # 34
--shiftimplementation # ctype.h pain
+-sys-dir-errors
-strictops # 51
-whileblock # tedious
/**
* readlink(2) clone.
*/
+/*@-incondefs@*/
int Readlink(const char * path, /*@out@*/ char * buf, size_t bufsiz)
/*@globals errno, fileSystem @*/
/*@modifies *buf, errno, fileSystem @*/
/*@requires maxSet(buf) >= (bufsiz - 1) @*/
/*@ensures result <= bufsiz @*/;
+/*@=incondefs@*/
/**
* stat(2) clone.
/**
*/
+/*@-incondefs@*/
ssize_t fdRead(void * cookie, /*@out@*/ char * buf, size_t count)
/*@globals errno, fileSystem @*/
/*@modifies *cookie, *buf, errno, fileSystem @*/
/*@requires maxSet(buf) >= (count - 1) @*/
/*@ensures maxRead(buf) >= count @*/ ;
#define fdRead(_fd, _buf, _count) fdio->read((_fd), (_buf), (_count))
+/*@=incondefs@*/
/**
*/
/*@=redecl@*/
/*@-redecl@*/
+/*@unchecked@*/
extern int _ftp_debug;
/*@=redecl@*/
/*@innerbreak@*/ break;
case 0x03:
pgpPrtVal(" iterated/salted ", pgpHashTbl, p[2]);
- /*@-shiftnegative@*/ /* FIX: unsigned cast */
+ /*@-shiftnegative -shiftimplementation @*/ /* FIX: unsigned cast */
i = (16 + (p[11] & 0xf)) << ((p[11] >> 4) + 6);
- /*@=shiftnegative@*/
+ /*@=shiftnegative =shiftimplementation @*/
pgpPrtHex("", p+3, 8);
pgpPrtInt(" iter", i);
p += 11;
}
void pgpCleanDig(struct pgpDig_s * dig)
- /*@modifies dig @*/
{
if (dig != NULL) {
int i;
PGPARMORKEY_COMMENT = 2, /*!< Comment: */
PGPARMORKEY_MESSAGEID = 3, /*!< MessageID: */
PGPARMORKEY_HASH = 4, /*!< Hash: */
- PGPARMORKEY_CHARSET = 5 /*!< Charset: */
+ PGPARMORKEY_CHARSET = 5 /*!< Charset: */
} pgpArmorKey;
/*@=typeuse@*/
/**
*/
void pgpCleanDig(/*@null@*/ struct pgpDig_s * dig)
- /*@modifies *dig @*/;
+ /*@modifies dig @*/;
/**
*/
/**
*/
+/*@-incondefs@*/
/*@unchecked@*/
/*@only@*/ /*@null@*/
urlinfo *_url_cache = NULL;
+/*@=incondefs@*/
/**
*/
+/*@-incondefs@*/
/*@unchecked@*/
int _url_count = 0;
+/*@=incondefs@*/
/**
* Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.