diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-11 19:07:39 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-09-11 19:07:39 +0200 |
commit | ebef4f211c1f3b4392530eb1a5889aa13345893e (patch) | |
tree | e530537d69a31e7ac7af5766b16c114aabd078ba /lib/rpmfi.h | |
parent | a5a65af57e0c21837c6c71b0979473c51c3a2202 (diff) | |
download | rpm-ebef4f211c1f3b4392530eb1a5889aa13345893e.tar.gz rpm-ebef4f211c1f3b4392530eb1a5889aa13345893e.tar.bz2 rpm-ebef4f211c1f3b4392530eb1a5889aa13345893e.zip |
Remove splint tags.
Diffstat (limited to 'lib/rpmfi.h')
-rw-r--r-- | lib/rpmfi.h | 231 |
1 files changed, 58 insertions, 173 deletions
diff --git a/lib/rpmfi.h b/lib/rpmfi.h index f6135d598..4251b84a3 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -6,10 +6,7 @@ * Structure(s) used for file info tag sets. */ -/*@-exportlocal@*/ -/*@unchecked@*/ extern int _rpmfi_debug; -/*@=exportlocal@*/ #if defined(_RPMFI_INTERNAL) /** @@ -32,76 +29,59 @@ struct rpmfi_s { int i; /*!< Current file index. */ int j; /*!< Current directory index. */ -/*@observer@*/ const char * Type; /*!< Tag name. */ rpmTag tagN; /*!< Header tag. */ -/*@refcounted@*/ /*@null@*/ Header h; /*!< Header for file info set (or NULL) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const char ** bnl; /*!< Base name(s) (from header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const char ** dnl; /*!< Directory name(s) (from header) */ -/*@only@*/ /*@relnull@*/ const char ** fmd5s; /*!< File MD5 sum(s) (from header) */ -/*@only@*/ /*@relnull@*/ const char ** flinks; /*!< File link(s) (from header) */ -/*@only@*/ /*@null@*/ const char ** flangs; /*!< File lang(s) (from header) */ -/*@only@*/ /*@relnull@*/ uint_32 * dil; /*!< Directory indice(s) (from header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const uint_32 * fflags; /*!< File flag(s) (from header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const uint_32 * fsizes; /*!< File size(s) (from header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const uint_32 * fmtimes; /*!< File modification time(s) (from header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ uint_16 * fmodes; /*!< File mode(s) (from header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const uint_16 * frdevs; /*!< File rdev(s) (from header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const uint_32 * finodes; /*!< File inodes(s) (from header) */ -/*@only@*/ /*@null@*/ const char ** fuser; /*!< File owner(s) (from header) */ -/*@only@*/ /*@null@*/ const char ** fgroup; /*!< File group(s) (from header) */ -/*@only@*/ /*@null@*/ char * fstates; /*!< File state(s) (from header) */ -/*@only@*/ /*@null@*/ const uint_32 * fcolors; /*!< File color bits (header) */ -/*@only@*/ /*@null@*/ const char ** fcontexts; /*! FIle security contexts. */ -/*@only@*/ /*@null@*/ const char ** cdict; /*!< File class dictionary (header) */ int_32 ncdict; /*!< No. of class entries. */ -/*@only@*/ /*@null@*/ const uint_32 * fcdictx; /*!< File class dictionary index (header) */ -/*@only@*/ /*@null@*/ const uint_32 * ddict; /*!< File depends dictionary (header) */ int_32 nddict; /*!< No. of depends entries. */ -/*@only@*/ /*@null@*/ const uint_32 * fddictx; /*!< File depends dictionary start (header) */ -/*@only@*/ /*@null@*/ const uint_32 * fddictn; /*!< File depends dictionary count (header) */ -/*@only@*/ /*?null?*/ +/*?null?*/ const uint_32 * vflags; /*!< File verify flag(s) (from header) */ int_32 dc; /*!< No. of directories. */ int_32 fc; /*!< No. of files. */ /*=============================*/ -/*@dependent@*/ /*@relnull@*/ rpmte te; HGE_t hge; /*!< Vector to headerGetEntry() */ @@ -114,30 +94,19 @@ struct rpmfi_s { gid_t gid; /*!< File gid (default). */ uint_32 flags; /*!< File flags (default). */ fileAction action; /*!< File disposition (default). */ -/*@owned@*/ /*@relnull@*/ fileAction * actions; /*!< File disposition(s). */ -/*@owned@*/ struct fingerPrint_s * fps; /*!< File fingerprint(s). */ -/*@owned@*/ const char ** obnl; /*!< Original basename(s) (from header) */ -/*@owned@*/ const char ** odnl; /*!< Original dirname(s) (from header) */ -/*@unused@*/ int_32 * odil; /*!< Original dirindex(s) (from header) */ -/*@only@*/ /*@relnull@*/ unsigned char * md5s; /*!< File md5 sums in binary. */ -/*@only@*/ /*@null@*/ const char * pretrans; -/*@only@*/ /*@null@*/ const char * pretransprog; -/*@only@*/ /*@null@*/ const char * posttrans; -/*@only@*/ /*@null@*/ const char * posttransprog; -/*@only@*/ /*@null@*/ char * fn; /*!< File name buffer. */ int fnlen; /*!< FIle name buffer length. */ @@ -147,25 +116,20 @@ struct rpmfi_s { unsigned int archiveSize; mode_t dperms; /*!< Directory perms (0755) if not mapped. */ mode_t fperms; /*!< File perms (0644) if not mapped. */ -/*@only@*/ /*@null@*/ const char ** apath; int mapflags; -/*@owned@*/ /*@null@*/ int * fmapflags; -/*@owned@*/ FSM_t fsm; /*!< File state machine data. */ int keep_header; /*!< Keep header? */ uint_32 color; /*!< Color bit(s) from file color union. */ -/*@owned@*/ sharedFileInfo replaced; /*!< (TR_ADDED) */ -/*@owned@*/ uint_32 * replacedSizes; /*!< (TR_ADDED) */ unsigned int record; /*!< (TR_REMOVED) */ int magic; #define RPMFIMAGIC 0x09697923 /*=============================*/ -/*@refs@*/ int nrefs; /*!< Reference count. */ +int nrefs; /*!< Reference count. */ }; #endif /* _RPMFI_INTERNAL */ @@ -180,10 +144,8 @@ extern "C" { * @param msg * @return NULL always */ -/*@unused@*/ /*@null@*/ -rpmfi rpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi, - /*@null@*/ const char * msg) - /*@modifies fi @*/; +rpmfi rpmfiUnlink (rpmfi fi, + const char * msg); /** @todo Remove debugging entry from the ABI. * @param fi file info set @@ -192,12 +154,8 @@ rpmfi rpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi, * @param ln * @return NULL always */ -/*@-exportlocal@*/ -/*@null@*/ -rpmfi XrpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi, - /*@null@*/ const char * msg, const char * fn, unsigned ln) - /*@modifies fi @*/; -/*@=exportlocal@*/ +rpmfi XrpmfiUnlink (rpmfi fi, + const char * msg, const char * fn, unsigned ln); #define rpmfiUnlink(_fi, _msg) XrpmfiUnlink(_fi, _msg, __FILE__, __LINE__) /** @@ -206,9 +164,7 @@ rpmfi XrpmfiUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi, * @param msg * @return new file info set reference */ -/*@unused@*/ /*@null@*/ -rpmfi rpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg) - /*@modifies fi @*/; +rpmfi rpmfiLink (rpmfi fi, const char * msg); /** @todo Remove debugging entry from the ABI. * @param fi file info set @@ -217,10 +173,8 @@ rpmfi rpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg) * @param ln * @return NULL always */ -/*@null@*/ -rpmfi XrpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg, - const char * fn, unsigned ln) - /*@modifies fi @*/; +rpmfi XrpmfiLink (rpmfi fi, const char * msg, + const char * fn, unsigned ln); #define rpmfiLink(_fi, _msg) XrpmfiLink(_fi, _msg, __FILE__, __LINE__) /** @@ -228,17 +182,14 @@ rpmfi XrpmfiLink (/*@null@*/ rpmfi fi, /*@null@*/ const char * msg, * @param fi file info set * @return current file count */ -int rpmfiFC(/*@null@*/ rpmfi fi) - /*@*/; +int rpmfiFC(rpmfi fi); /** * Return current file index from file info set. * @param fi file info set * @return current file index */ -/*@unused@*/ -int rpmfiFX(/*@null@*/ rpmfi fi) - /*@*/; +int rpmfiFX(rpmfi fi); /** * Set current file index in file info set. @@ -246,25 +197,21 @@ int rpmfiFX(/*@null@*/ rpmfi fi) * @param fx new file index * @return current file index */ -/*@unused@*/ -int rpmfiSetFX(/*@null@*/ rpmfi fi, int fx) - /*@modifies fi @*/; +int rpmfiSetFX(rpmfi fi, int fx); /** * Return directory count from file info set. * @param fi file info set * @return current directory count */ -int rpmfiDC(/*@null@*/ rpmfi fi) - /*@*/; +int rpmfiDC(rpmfi fi); /** * Return current directory index from file info set. * @param fi file info set * @return current directory index */ -int rpmfiDX(/*@null@*/ rpmfi fi) - /*@*/; +int rpmfiDX(rpmfi fi); /** * Set current directory index in file info set. @@ -272,147 +219,119 @@ int rpmfiDX(/*@null@*/ rpmfi fi) * @param dx new directory index * @return current directory index */ -int rpmfiSetDX(/*@null@*/ rpmfi fi, int dx) - /*@modifies fi @*/; +int rpmfiSetDX(rpmfi fi, int dx); /** * Return current base name from file info set. * @param fi file info set * @return current base name, NULL on invalid */ -/*@observer@*/ /*@null@*/ -extern const char * rpmfiBN(/*@null@*/ rpmfi fi) - /*@*/; +extern const char * rpmfiBN(rpmfi fi); /** * Return current directory name from file info set. * @param fi file info set * @return current directory, NULL on invalid */ -/*@observer@*/ /*@null@*/ -extern const char * rpmfiDN(/*@null@*/ rpmfi fi) - /*@*/; +extern const char * rpmfiDN(rpmfi fi); /** * Return current file name from file info set. * @param fi file info set * @return current file name */ -/*@observer@*/ -extern const char * rpmfiFN(/*@null@*/ rpmfi fi) - /*@modifies fi @*/; +extern const char * rpmfiFN(rpmfi fi); /** * Return current file flags from file info set. * @param fi file info set * @return current file flags, 0 on invalid */ -uint_32 rpmfiFFlags(/*@null@*/ rpmfi fi) - /*@*/; +uint_32 rpmfiFFlags(rpmfi fi); /** * Return current file verify flags from file info set. * @param fi file info set * @return current file verify flags, 0 on invalid */ -uint_32 rpmfiVFlags(/*@null@*/ rpmfi fi) - /*@*/; +uint_32 rpmfiVFlags(rpmfi fi); /** * Return current file mode from file info set. * @param fi file info set * @return current file mode, 0 on invalid */ -int_16 rpmfiFMode(/*@null@*/ rpmfi fi) - /*@*/; +int_16 rpmfiFMode(rpmfi fi); /** * Return current file state from file info set. * @param fi file info set * @return current file state, 0 on invalid */ -rpmfileState rpmfiFState(/*@null@*/ rpmfi fi) - /*@*/; +rpmfileState rpmfiFState(rpmfi fi); /** * Return current file (binary) md5 digest from file info set. * @param fi file info set * @return current file md5 digest, NULL on invalid */ -/*@observer@*/ /*@null@*/ -extern const unsigned char * rpmfiMD5(/*@null@*/ rpmfi fi) - /*@*/; +extern const unsigned char * rpmfiMD5(rpmfi fi); /** * Return current file linkto (i.e. symlink(2) target) from file info set. * @param fi file info set * @return current file linkto, NULL on invalid */ -/*@observer@*/ /*@null@*/ -extern const char * rpmfiFLink(/*@null@*/ rpmfi fi) - /*@*/; +extern const char * rpmfiFLink(rpmfi fi); /** * Return current file size from file info set. * @param fi file info set * @return current file size, 0 on invalid */ -int_32 rpmfiFSize(/*@null@*/ rpmfi fi) - /*@*/; +int_32 rpmfiFSize(rpmfi fi); /** * Return current file rdev from file info set. * @param fi file info set * @return current file rdev, 0 on invalid */ -int_16 rpmfiFRdev(/*@null@*/ rpmfi fi) - /*@*/; +int_16 rpmfiFRdev(rpmfi fi); /** * Return current file inode from file info set. * @param fi file info set * @return current file inode, 0 on invalid */ -int_32 rpmfiFInode(/*@null@*/ rpmfi fi) - /*@*/; +int_32 rpmfiFInode(rpmfi fi); /** * Return union of all file color bits from file info set. * @param fi file info set * @return current color */ -uint_32 rpmfiColor(/*@null@*/ rpmfi fi) - /*@*/; +uint_32 rpmfiColor(rpmfi fi); /** * Return current file color bits from file info set. * @param fi file info set * @return current file color */ -uint_32 rpmfiFColor(/*@null@*/ rpmfi fi) - /*@*/; +uint_32 rpmfiFColor(rpmfi fi); /** * Return current file class from file info set. * @param fi file info set * @return current file class, 0 on invalid */ -/*@-exportlocal@*/ -/*@observer@*/ /*@null@*/ -extern const char * rpmfiFClass(/*@null@*/ rpmfi fi) - /*@*/; -/*@=exportlocal@*/ +extern const char * rpmfiFClass(rpmfi fi); /** * Return current file security context from file info set. * @param fi file info set * @return current file context, 0 on invalid */ -/*@-exportlocal@*/ -/*@observer@*/ /*@null@*/ -extern const char * rpmfiFContext(/*@null@*/ rpmfi fi) - /*@*/; -/*@=exportlocal@*/ +extern const char * rpmfiFContext(rpmfi fi); /** * Return current file depends dictionary from file info set. @@ -420,51 +339,43 @@ extern const char * rpmfiFContext(/*@null@*/ rpmfi fi) * @retval *fddictp file depends dictionary array (or NULL) * @return no. of file depends entries, 0 on invalid */ -int_32 rpmfiFDepends(/*@null@*/ rpmfi fi, - /*@out@*/ /*@null@*/ const uint_32 ** fddictp) - /*@modifies *fddictp @*/; +int_32 rpmfiFDepends(rpmfi fi, + const uint_32 ** fddictp); /** * Return (calculated) current file nlink count from file info set. * @param fi file info set * @return current file nlink count, 0 on invalid */ -int_32 rpmfiFNlink(/*@null@*/ rpmfi fi) - /*@*/; +int_32 rpmfiFNlink(rpmfi fi); /** * Return current file modify time from file info set. * @param fi file info set * @return current file modify time, 0 on invalid */ -int_32 rpmfiFMtime(/*@null@*/ rpmfi fi) - /*@*/; +int_32 rpmfiFMtime(rpmfi fi); /** * Return current file owner from file info set. * @param fi file info set * @return current file owner, NULL on invalid */ -/*@observer@*/ /*@null@*/ -extern const char * rpmfiFUser(/*@null@*/ rpmfi fi) - /*@*/; +extern const char * rpmfiFUser(rpmfi fi); /** * Return current file group from file info set. * @param fi file info set * @return current file group, NULL on invalid */ -/*@observer@*/ /*@null@*/ -extern const char * rpmfiFGroup(/*@null@*/ rpmfi fi) - /*@*/; +extern const char * rpmfiFGroup(rpmfi fi); /** * Return next file iterator index. * @param fi file info set * @return file iterator index, -1 on termination */ -int rpmfiNext(/*@null@*/ rpmfi fi) - /*@modifies fi @*/; +int rpmfiNext(rpmfi fi); /** * Initialize file iterator index. @@ -472,18 +383,14 @@ int rpmfiNext(/*@null@*/ rpmfi fi) * @param fx file iterator index * @return file info set */ -/*@null@*/ -rpmfi rpmfiInit(/*@null@*/ rpmfi fi, int fx) - /*@modifies fi @*/; +rpmfi rpmfiInit(rpmfi fi, int fx); /** * Return next directory iterator index. * @param fi file info set * @return directory iterator index, -1 on termination */ -/*@unused@*/ -int rpmfiNextD(/*@null@*/ rpmfi fi) - /*@modifies fi @*/; +int rpmfiNextD(rpmfi fi); /** * Initialize directory iterator index. @@ -491,19 +398,14 @@ int rpmfiNextD(/*@null@*/ rpmfi fi) * @param dx directory iterator index * @return file info set, NULL if dx is out of range */ -/*@unused@*/ /*@null@*/ -rpmfi rpmfiInitD(/*@null@*/ rpmfi fi, int dx) - /*@modifies fi @*/; +rpmfi rpmfiInitD(rpmfi fi, int dx); /** * Destroy a file info set. * @param fi file info set * @return NULL always */ -/*@null@*/ -rpmfi rpmfiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi) - /*@globals fileSystem @*/ - /*@modifies fi, fileSystem @*/; +rpmfi rpmfiFree(rpmfi fi); /** * Create and load a file info set. @@ -514,10 +416,7 @@ rpmfi rpmfiFree(/*@killref@*/ /*@only@*/ /*@null@*/ rpmfi fi) * @param scareMem Use pointers to refcounted header memory? * @return new file info set */ -/*@null@*/ -rpmfi rpmfiNew(/*@null@*/ const rpmts ts, Header h, rpmTag tagN, int scareMem) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/ - /*@modifies ts, h, rpmGlobalMacroContext, fileSystem @*/; +rpmfi rpmfiNew(const rpmts ts, Header h, rpmTag tagN, int scareMem); /** * Retrieve file classes from header. @@ -529,9 +428,7 @@ rpmfi rpmfiNew(/*@null@*/ const rpmts ts, Header h, rpmTag tagN, int scareMem) * @retval *fcp number of files */ void rpmfiBuildFClasses(Header h, - /*@out@*/ const char *** fclassp, /*@out@*/ int * fcp) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem @*/ - /*@modifies h, *fclassp, *fcp, rpmGlobalMacroContext, fileSystem @*/; + const char *** fclassp, int * fcp); /** @@ -545,18 +442,14 @@ void rpmfiBuildFClasses(Header h, * @retval *fcp number of files */ void rpmfiBuildFDeps(Header h, rpmTag tagN, - /*@out@*/ const char *** fdepsp, /*@out@*/ int * fcp) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies h, *fdepsp, *fcp, - rpmGlobalMacroContext, fileSystem, internalState @*/; + const char *** fdepsp, int * fcp); /** * Return file type from mode_t. * @param mode file mode bits (from header) * @return file type */ -fileTypes whatis(uint_16 mode) - /*@*/; +fileTypes whatis(uint_16 mode); /** * Return file info comparison. @@ -564,8 +457,7 @@ fileTypes whatis(uint_16 mode) * @param bfi 2nd file info * @return 0 if identical */ -int rpmfiCompare(const rpmfi afi, const rpmfi bfi) - /*@*/; +int rpmfiCompare(const rpmfi afi, const rpmfi bfi); /** * Return file disposition. @@ -574,28 +466,21 @@ int rpmfiCompare(const rpmfi afi, const rpmfi bfi) * @param skipMissing OK to skip missing files? * @return file dispostion */ -fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing) - /*@globals h_errno, fileSystem, internalState @*/ - /*@modifies nfi, fileSystem, internalState @*/; +fileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing); /** * Return whether file is conflicting config * @param fi file info * @return 1 if config file and file on disk conflicts */ -int rpmfiConfigConflict(const rpmfi fi) - /*@*/; +int rpmfiConfigConflict(const rpmfi fi); /** * Return formatted string representation of package disposition. * @param fi file info set * @return formatted string */ -/*@-redef@*/ -/*@observer@*/ -const char * rpmfiTypeString(rpmfi fi) - /*@*/; -/*@=redef@*/ +const char * rpmfiTypeString(rpmfi fi); #ifdef __cplusplus } |