Remove splint tags.

This commit is contained in:
Ralf Corsépius 2007-09-11 19:23:32 +02:00
parent ebef4f211c
commit e9f3a5c89d
9 changed files with 9 additions and 53 deletions

View File

@ -22,12 +22,9 @@ struct DIGEST_CTX_s {
uint32_t paramlen; /*!< No. bytes of digest parameters. */ uint32_t paramlen; /*!< No. bytes of digest parameters. */
uint32_t digestlen; /*!< No. bytes of digest. */ uint32_t digestlen; /*!< No. bytes of digest. */
void * param; /*!< Digest parameters. */ void * param; /*!< Digest parameters. */
int (*Reset) (void * param) int (*Reset) (void * param); /*!< Digest initialize. */
/*@modifies param @*/; /*!< Digest initialize. */ int (*Update) (void * param, const byte * data, size_t size); /*!< Digest transform. */
int (*Update) (void * param, const byte * data, size_t size) int (*Digest) (void * param, byte * digest); /*!< Digest finish. */
/*@modifies param @*/; /*!< Digest transform. */
int (*Digest) (void * param, byte * digest)
/*@modifies param, digest @*/; /*!< Digest finish. */
}; };
DIGEST_CTX DIGEST_CTX

View File

@ -53,8 +53,6 @@ typedef FILE * FD_t;
#include "debug.h" #include "debug.h"
/*@access FD_t@*/ /* XXX compared with NULL */
static struct MacroContext_s rpmGlobalMacroContext_s; static struct MacroContext_s rpmGlobalMacroContext_s;
MacroContext rpmGlobalMacroContext = &rpmGlobalMacroContext_s; MacroContext rpmGlobalMacroContext = &rpmGlobalMacroContext_s;
@ -90,11 +88,7 @@ int print_expand_trace = _PRINT_EXPAND_TRACE;
#define MACRO_CHUNK_SIZE 16 #define MACRO_CHUNK_SIZE 16
/* forward ref */ /* forward ref */
static int expandMacro(MacroBuf mb) static int expandMacro(MacroBuf mb);
/*@globals rpmGlobalMacroContext,
print_macro_trace, print_expand_trace, h_errno, fileSystem @*/
/*@modifies mb, rpmGlobalMacroContext,
print_macro_trace, print_expand_trace, fileSystem @*/;
/** /**
* Wrapper to free(3), hides const compilation noise, permit NULL, return NULL. * Wrapper to free(3), hides const compilation noise, permit NULL, return NULL.
@ -416,30 +410,25 @@ printExpansion(MacroBuf mb, const char * t, const char * te)
} }
#define SKIPBLANK(_s, _c) \ #define SKIPBLANK(_s, _c) \
/*@-globs@*/ /* FIX: __ctype_b */ \
while (((_c) = *(_s)) && isblank(_c)) \ while (((_c) = *(_s)) && isblank(_c)) \
(_s)++; \ (_s)++; \
#define SKIPNONBLANK(_s, _c) \ #define SKIPNONBLANK(_s, _c) \
/*@-globs@*/ /* FIX: __ctype_b */ \
while (((_c) = *(_s)) && !(isblank(_c) || iseol(_c))) \ while (((_c) = *(_s)) && !(isblank(_c) || iseol(_c))) \
(_s)++; \ (_s)++; \
#define COPYNAME(_ne, _s, _c) \ #define COPYNAME(_ne, _s, _c) \
{ SKIPBLANK(_s,_c); \ { SKIPBLANK(_s,_c); \
/*@-boundswrite@*/ \
while(((_c) = *(_s)) && (xisalnum(_c) || (_c) == '_')) \ while(((_c) = *(_s)) && (xisalnum(_c) || (_c) == '_')) \
*(_ne)++ = *(_s)++; \ *(_ne)++ = *(_s)++; \
*(_ne) = '\0'; \ *(_ne) = '\0'; \
/*@=boundswrite@*/ \
} }
#define COPYOPTS(_oe, _s, _c) \ #define COPYOPTS(_oe, _s, _c) \
{ /*@-boundswrite@*/ \ { \
while(((_c) = *(_s)) && (_c) != ')') \ while(((_c) = *(_s)) && (_c) != ')') \
*(_oe)++ = *(_s)++; \ *(_oe)++ = *(_s)++; \
*(_oe) = '\0'; \ *(_oe) = '\0'; \
/*@=boundswrite@*/ \
} }
/** /**
@ -1105,10 +1094,6 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn,
*/ */
static int static int
expandMacro(MacroBuf mb) expandMacro(MacroBuf mb)
/*@globals rpmGlobalMacroContext,
print_macro_trace, print_expand_trace, h_errno, fileSystem @*/
/*@modifies mb, rpmGlobalMacroContext,
print_macro_trace, print_expand_trace, fileSystem @*/
{ {
MacroEntry *mep; MacroEntry *mep;
MacroEntry me; MacroEntry me;

View File

@ -285,7 +285,6 @@ static int davInit(const char * url, urlinfo * uret)
urlinfo u = NULL; urlinfo u = NULL;
int rc = 0; int rc = 0;
/*@-globs@*/ /* FIX: h_errno annoyance. */
if (urlSplit(url, &u)) if (urlSplit(url, &u))
return -1; /* XXX error returns needed. */ return -1; /* XXX error returns needed. */
@ -438,7 +437,6 @@ static void *fetch_create_context(const char *uri)
struct fetch_context_s * ctx; struct fetch_context_s * ctx;
urlinfo u; urlinfo u;
/*@-globs@*/ /* FIX: h_errno annoyance. */
if (urlSplit(uri, &u)) if (urlSplit(uri, &u))
return NULL; return NULL;
@ -1034,7 +1032,6 @@ fprintf(stderr, "*** davSeek(%p,pos,%d)\n", cookie, whence);
return -1; return -1;
} }
/*@-mustmod@*/ /* HACK: fd->req is modified. */
int davClose(void * cookie) int davClose(void * cookie)
{ {
FD_t fd = cookie; FD_t fd = cookie;

View File

@ -71,8 +71,6 @@ static int inet_aton(const char *cp, struct in_addr *inp)
#include "debug.h" #include "debug.h"
/*@access FILE @*/ /* XXX to permit comparison/conversion with void *. */
#define FDNREFS(fd) (fd ? ((FD_t)fd)->nrefs : -9) #define FDNREFS(fd) (fd ? ((FD_t)fd)->nrefs : -9)
#define FDTO(fd) (fd ? ((FD_t)fd)->rd_timeoutsecs : -99) #define FDTO(fd) (fd ? ((FD_t)fd)->rd_timeoutsecs : -99)
#define FDCPIOPOS(fd) (fd ? ((FD_t)fd)->fd_cpioPos : -99) #define FDCPIOPOS(fd) (fd ? ((FD_t)fd)->fd_cpioPos : -99)
@ -726,7 +724,6 @@ static int mygethostbyname(const char * host,
} }
#endif #endif
/*@-compdef@*/ /* FIX: address->s_addr undefined. */
static int getHostAddress(const char * host, struct in_addr * address) static int getHostAddress(const char * host, struct in_addr * address)
{ {
#if 0 /* XXX workaround nss_foo module hand-off using valgrind. */ #if 0 /* XXX workaround nss_foo module hand-off using valgrind. */
@ -1866,7 +1863,6 @@ static inline int ufdSeek(void * cookie, _libio_pos_t pos, int whence)
return fdSeek(cookie, pos, whence); return fdSeek(cookie, pos, whence);
} }
/*@-usereleased@*/ /* LCL: fd handling is tricky here. */
int ufdClose( void * cookie) int ufdClose( void * cookie)
{ {
FD_t fd = c2f(cookie); FD_t fd = c2f(cookie);
@ -1970,7 +1966,6 @@ int ufdClose( void * cookie)
return fdClose(fd); return fdClose(fd);
} }
/*@-nullstate@*/ /* FIX: u->{ctrl,data}->url undef after XurlLink. */
FD_t ftpOpen(const char *url, int flags, FD_t ftpOpen(const char *url, int flags,
mode_t mode, urlinfo *uret) mode_t mode, urlinfo *uret)
{ {
@ -2423,7 +2418,6 @@ static int bzdFlush(FD_t fd)
} }
/* =============================================================== */ /* =============================================================== */
/*@-mustmod@*/ /* LCL: *buf is modified */
static ssize_t bzdRead(void * cookie, char * buf, size_t count) static ssize_t bzdRead(void * cookie, char * buf, size_t count)
{ {
FD_t fd = c2f(cookie); FD_t fd = c2f(cookie);

View File

@ -120,7 +120,6 @@ FILE * rpmlogSetFile(FILE * fp)
return ofp; return ofp;
} }
/*@-readonlytrans@*/ /* FIX: double indirection. */
static char *rpmlogMsgPrefix[] = { static char *rpmlogMsgPrefix[] = {
N_("fatal error: "),/*!< RPMLOG_EMERG */ N_("fatal error: "),/*!< RPMLOG_EMERG */
N_("fatal error: "),/*!< RPMLOG_ALERT */ N_("fatal error: "),/*!< RPMLOG_ALERT */

View File

@ -17,7 +17,7 @@ typedef struct MacroEntry_s {
/*! The structure used to store the set of macros in a context. */ /*! The structure used to store the set of macros in a context. */
typedef struct MacroContext_s { typedef struct MacroContext_s {
/*@owned@*/MacroEntry *macroTable; /*!< Macro entry table for context. */ MacroEntry *macroTable; /*!< Macro entry table for context. */
int macrosAllocated;/*!< No. of allocated macros. */ int macrosAllocated;/*!< No. of allocated macros. */
int firstFree; /*!< No. of macros. */ int firstFree; /*!< No. of macros. */
} * MacroContext; } * MacroContext;
@ -124,20 +124,14 @@ void rpmLoadMacros (MacroContext mc, int level);
* @param mc (unused) * @param mc (unused)
* @param fn macro file name * @param fn macro file name
*/ */
int rpmLoadMacroFile(MacroContext mc, const char * fn) int rpmLoadMacroFile(MacroContext mc, const char * fn);
/*@globals rpmGlobalMacroContext,
h_errno, fileSystem, internalState @*/
;
/** /**
* Initialize macro context from set of macrofile(s). * Initialize macro context from set of macrofile(s).
* @param mc macro context * @param mc macro context
* @param macrofiles colon separated list of macro files (NULL does nothing) * @param macrofiles colon separated list of macro files (NULL does nothing)
*/ */
void rpmInitMacros (MacroContext mc, const char * macrofiles) void rpmInitMacros (MacroContext mc, const char * macrofiles);
/*@globals rpmGlobalMacroContext, rpmCLIMacroContext,
h_errno, fileSystem, internalState @*/
;
/** /**
* Destroy macro context. * Destroy macro context.

View File

@ -820,10 +820,6 @@ static char * ftpBuf = NULL;
static int ftpNLST(const char * url, ftpSysCall_t ftpSysCall, static int ftpNLST(const char * url, ftpSysCall_t ftpSysCall,
struct stat * st, struct stat * st,
char * rlbuf, size_t rlbufsiz) char * rlbuf, size_t rlbufsiz)
/*@globals ftpBufAlloced, ftpBuf,
h_errno, fileSystem, internalState @*/
/*@modifies *st, *rlbuf, ftpBufAlloced, ftpBuf,
fileSystem, internalState @*/
{ {
FD_t fd; FD_t fd;
const char * path; const char * path;
@ -1344,7 +1340,7 @@ int Glob_pattern_p (const char * pattern, int quote)
return (0); return (0);
} }
int Glob_error(/*@unused@*/const char * epath, int eerrno) int Glob_error(const char * epath, int eerrno)
{ {
return 1; return 1;
} }

View File

@ -154,10 +154,6 @@ static rpmtime_t rpmswCalibrate(void)
#endif #endif
rpmtime_t rpmswInit(void) rpmtime_t rpmswInit(void)
/*@globals rpmsw_cycles, rpmsw_initialized, rpmsw_overhead,
rpmsw_type @*/
/*@modifies rpmsw_cycles, rpmsw_initialized, rpmsw_overhead,
rpmsw_type @*/
{ {
struct rpmsw_s begin, end; struct rpmsw_s begin, end;
#if defined(HP_TIMING_NOW) #if defined(HP_TIMING_NOW)

View File

@ -12,8 +12,6 @@
#include "debug.h" #include "debug.h"
/*@access FD_t@*/ /* XXX compared with NULL */
#ifndef IPPORT_FTP #ifndef IPPORT_FTP
#define IPPORT_FTP 21 #define IPPORT_FTP 21
#endif #endif