RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: rpm Date: 25-Jun-2016 10:32:01 Branch: rpm-5_4 Handle: 2016062508320000 Modified files: (Branch: rpm-5_4) rpm CHANGES rpm/rpmdb Makefile.am grammar.y legacy.c pkgio.h rpmdb.h rpmevr.h rpmns.h rpmtag.h rpmtypes.h scanner.l signature.c Log: - rpmdb: sanitize public includes (with iwyu). Summary: Revision Changes Path 1.3501.2.500+1 -0 rpm/CHANGES 1.134.2.35 +10 -2 rpm/rpmdb/Makefile.am 1.1.2.3 +1 -1 rpm/rpmdb/grammar.y 1.44.4.5 +2 -0 rpm/rpmdb/legacy.c 1.19.4.3 +13 -21 rpm/rpmdb/pkgio.h 1.141.2.15 +140 -356 rpm/rpmdb/rpmdb.h 1.11.4.6 +14 -29 rpm/rpmdb/rpmevr.h 1.4.6.6 +14 -27 rpm/rpmdb/rpmns.h 1.70.4.22 +101 -246 rpm/rpmdb/rpmtag.h 1.6.2.2 +8 -8 rpm/rpmdb/rpmtypes.h 1.1.2.4 +1 -1 rpm/rpmdb/scanner.l 1.68.2.17 +1 -0 rpm/rpmdb/signature.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: rpm/CHANGES ============================================================================ $ cvs diff -u -r1.3501.2.499 -r1.3501.2.500 CHANGES --- rpm/CHANGES 25 Jun 2016 07:31:07 -0000 1.3501.2.499 +++ rpm/CHANGES 25 Jun 2016 08:32:00 -0000 1.3501.2.500 @@ -1,4 +1,5 @@ 5.4.17 -> 5.4.18: + - jbj: rpmdb: sanitize public includes (with iwyu). - jbj: rpmio: sanitize public includes (with iwyu). - jbj: rpmio: rename rpmutil.h -> rpmdefs.h. - jbj: mongoc: disable ctor/dtor automation. @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/Makefile.am ============================================================================ $ cvs diff -u -r1.134.2.34 -r1.134.2.35 Makefile.am --- rpm/rpmdb/Makefile.am 19 Jun 2016 08:53:46 -0000 1.134.2.34 +++ rpm/rpmdb/Makefile.am 25 Jun 2016 08:32:00 -0000 1.134.2.35 @@ -37,8 +37,8 @@ logio_rec.c logio_auto.c logio_autop.c logio_auto.h \ _rpmhash.C _rpmhash.H -EXTRA_PROGRAMS = qfcalc qfgraph logio tjfn tqf tprintf # tbdb -noinst_PROGRAMS = json +EXTRA_PROGRAMS = json qfcalc qfgraph logio tjfn tqf tprintf # tbdb +noinst_PROGRAMS = RPMMISC_LDADD_COMMON = \ $(top_builddir)/misc/librpmmisc.la \ @@ -262,6 +262,14 @@ cppcheck: $(CPPCHECK) $(AM_CPPFLAGS) $(librpmdb_la_SOURCES) +.PHONY: iwyu +iwyu: + @for INC in $(pkginc_HEADERS); do \ + echo "----- $${INC}"; \ + iwyu $(AM_CPPFLAGS) $${INC}; \ + cvs diff $${INC}; \ + done || : + .PHONY: sources sources: @echo $(splint_SRCS:%=rpmdb/%) @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/grammar.y ============================================================================ $ cvs diff -u -r1.1.2.2 -r1.1.2.3 grammar.y --- rpm/rpmdb/grammar.y 11 Jun 2015 02:22:55 -0000 1.1.2.2 +++ rpm/rpmdb/grammar.y 25 Jun 2016 08:32:00 -0000 1.1.2.3 @@ -4,7 +4,7 @@ %{ #include <stdio.h> - #include <rpmutil.h> + #include <rpmdefs.h> #include "json.h" #define yylex Jyylex @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/legacy.c ============================================================================ $ cvs diff -u -r1.44.4.4 -r1.44.4.5 legacy.c --- rpm/rpmdb/legacy.c 24 Jun 2016 19:04:20 -0000 1.44.4.4 +++ rpm/rpmdb/legacy.c 25 Jun 2016 08:32:00 -0000 1.44.4.5 @@ -32,6 +32,8 @@ #include "rpmio_internal.h" #include <rpmmacro.h> +#include <yarn.h> +#include <popt.h> #include "misc.h" #include "legacy.h" #include "debug.h" @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/pkgio.h ============================================================================ $ cvs diff -u -r1.19.4.2 -r1.19.4.3 pkgio.h --- rpm/rpmdb/pkgio.h 27 Sep 2014 15:52:34 -0000 1.19.4.2 +++ rpm/rpmdb/pkgio.h 25 Jun 2016 08:32:00 -0000 1.19.4.3 @@ -6,10 +6,15 @@ * Methods to handle package elements. */ +#include <stddef.h> +#include <rpmdefs.h> +#include <rpmiotypes.h> #include <rpmio.h> /* XXX FD_t typedef */ -#include <rpmpgp.h> /* XXX pgpDig typedef */ +#include <rpmtypes.h> /* XXX rpmts typedef */ #include <rpmtag.h> /* XXX Header typedef */ +#include <rpmpgp.h> /* XXX pgpDig typedef */ + #ifdef __cplusplus extern "C" { #endif @@ -27,10 +32,7 @@ * @retval msg *msg verification error message (or NULL) * @return RPMRC_OK on success */ -rpmRC headerCheck(pgpDig dig, const void * uh, size_t uc, - /*@out@*/ /*@null@*/ const char ** msg) - /*@globals fileSystem, internalState @*/ - /*@modifies dig, *msg, fileSystem, internalState @*/; +rpmRC headerCheck(pgpDig dig, const void * uh, size_t uc, const char ** msg); /** * Return package header from file handle, verifying digests/signatures. @@ -42,9 +44,7 @@ * @return RPMRC_OK on success */ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, - const char * fn, /*@null@*/ /*@out@*/ Header * hdrp) - /*@globals fileSystem, internalState @*/ - /*@modifies ts, fd, *hdrp, fileSystem, internalState @*/; + const char * fn, Header * hdrp); /** * Return size of item in bytes. @@ -52,9 +52,8 @@ * @param ptr item buffer * @return size of item in bytes. */ -size_t rpmpkgSizeof(const char * fn, /*@null@*/ const void * ptr) - RPM_GNUC_PURE - /*@*/; +size_t rpmpkgSizeof(const char * fn, const void * ptr) + RPM_GNUC_PURE; /** * Write item onto file descriptor. @@ -64,9 +63,7 @@ * @retval msg *msg item check failure message * @return RPMRC_OK on success */ -rpmRC rpmpkgWrite(const char * fn, FD_t fd, void * ptr, const char ** msg) - /*@globals fileSystem, internalState @*/ - /*@modifies fd, ptr, *msg, fileSystem, internalState @*/; +rpmRC rpmpkgWrite(const char * fn, FD_t fd, void * ptr, const char ** msg); /** * Read item from file descriptor. @@ -76,10 +73,7 @@ * @retval msg *msg item check failure message * @return RPMRC_OK on success */ -rpmRC rpmpkgRead(const char * fn, FD_t fd, /*@null@*/ /*@out@*/ void * ptr, - const char ** msg) - /*@globals fileSystem, internalState @*/ - /*@modifies fd, *ptr, *msg, fileSystem, internalState @*/; +rpmRC rpmpkgRead(const char * fn, FD_t fd, void * ptr, const char ** msg); /** * Verify item integrity. @@ -89,9 +83,7 @@ * @retval msg *msg item check failure message * @return RPMRC_OK on success */ -rpmRC rpmpkgCheck(const char * fn, FD_t fd, const void * ptr, const char ** msg) - /*@globals fileSystem, internalState @*/ - /*@modifies ptr, *msg, fileSystem, internalState @*/; +rpmRC rpmpkgCheck(const char * fn, FD_t fd, const void * ptr, const char ** msg); #ifdef __cplusplus } @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/rpmdb.h ============================================================================ $ cvs diff -u -r1.141.2.14 -r1.141.2.15 rpmdb.h --- rpm/rpmdb/rpmdb.h 5 Mar 2016 21:39:56 -0000 1.141.2.14 +++ rpm/rpmdb/rpmdb.h 25 Jun 2016 08:32:00 -0000 1.141.2.15 @@ -1,15 +1,17 @@ #ifndef H_RPMDB #define H_RPMDB -/*@-bounds@*/ /** \ingroup rpmdb dbi db1 db3 * \file rpmdb/rpmdb.h * Access RPM indices using Berkeley DB interface(s). */ -#include <assert.h> +#include <assert.h> /* XXX assert() within wrapper */ + #include <mire.h> -#include <errno.h> +#include <stddef.h> +#include <stdint.h> +#include <sys/types.h> #include <rpmtypes.h> #include <rpmtag.h> /* XXX Header typedef */ @@ -23,40 +25,37 @@ #endif #if defined(_RPMDB_INTERNAL) -#define DBT_INIT /*@-fullinitblock@*/ {0} /*@-fullinitblock@*/ /* -Wno-missing-field-initializers */ +#define DBT_INIT {0} /* -Wno-missing-field-initializers */ #endif -/*@-exportlocal@*/ -/*@unchecked@*/ extern int _rpmdb_debug; -/*@unchecked@*/ + extern int _rpmmi_debug; -/*@=exportlocal@*/ #ifdef NOTYET /** \ingroup rpmdb * Database of headers and tag value indices. */ -typedef /*@abstract@*/ /*@refcounted@*/ struct rpmdb_s * rpmdb; +typedef struct rpmdb_s * rpmdb; /** \ingroup rpmdb * Database iterator. */ -typedef /*@abstract@*/ /*@refcounted@*/ struct rpmmi_s * rpmmi; +typedef struct rpmmi_s * rpmmi; #endif /** */ -typedef /*@abstract@*/ struct _dbiIndexItem * dbiIndexItem; +typedef struct _dbiIndexItem * dbiIndexItem; /** \ingroup rpmdb * A single element (i.e. inverted list from tag values) of a database. */ -typedef /*@abstract@*/ struct _dbiIndexSet * dbiIndexSet; +typedef struct _dbiIndexSet * dbiIndexSet; /** */ -typedef /*@abstract@*/ struct _dbiIndex * dbiIndex; +typedef struct _dbiIndex * dbiIndex; #if defined(_RPMDB_INTERNAL) #include <rpmio.h> @@ -76,7 +75,6 @@ * Items retrieved from the index database. */ struct _dbiIndexSet { -/*@owned@*/ struct _dbiIndexItem * recs; /*!< array of records */ unsigned int count; /*!< number of records */ }; @@ -96,9 +94,7 @@ * @param tag rpm tag * @return 0 on success */ - int (*open) (rpmdb rpmdb, rpmTag tag, /*@out@*/ dbiIndex * dbip) - /*@globals fileSystem @*/ - /*@modifies *dbip, fileSystem @*/; + int (*open) (rpmdb rpmdb, rpmTag tag, dbiIndex * dbip); /** \ingroup dbi * Close index database, and destroy database handle. @@ -106,9 +102,7 @@ * @param flags (unused) * @return 0 on success */ - int (*close) (/*@only@*/ dbiIndex dbi, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/; + int (*close) (dbiIndex dbi, unsigned int flags); /** \ingroup dbi * Flush pending operations to disk. @@ -116,9 +110,7 @@ * @param flags (unused) * @return 0 on success */ - int (*sync) (dbiIndex dbi, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/; + int (*sync) (dbiIndex dbi, unsigned int flags); /** \ingroup dbi * Associate secondary database with primary. @@ -130,9 +122,7 @@ */ int (*associate) (dbiIndex dbi, dbiIndex dbisecondary, int (*callback) (DB *, const DBT *, const DBT *, DBT *), - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/; + unsigned int flags); /** \ingroup dbi * Associate foreign secondary database with primary. @@ -144,9 +134,7 @@ */ int (*associate_foreign) (dbiIndex dbi, dbiIndex dbisecondary, int (*callback) (DB *, const DBT *, DBT *, const DBT *, int *), - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/; + unsigned int flags); /** \ingroup dbi * Return join cursor for list of cursors. @@ -156,10 +144,8 @@ * @param flags DB_JOIN_NOSORT or 0 * @return 0 on success */ - int (*join) (dbiIndex dbi, DBC ** curslist, /*@out@*/ DBC ** dbcp, - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *dbcp, fileSystem @*/; + int (*join) (dbiIndex dbi, DBC ** curslist, DBC ** dbcp, + unsigned int flags); /** \ingroup dbi * Return whether key exists in a database. @@ -168,9 +154,7 @@ * @param flags usually 0 * @return 0 if key exists, DB_NOTFOUND if not, else error */ - int (*exists) (dbiIndex dbi, DBT * key, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/; + int (*exists) (dbiIndex dbi, DBT * key, unsigned int flags); /** \ingroup dbi * Return next sequence number. @@ -179,9 +163,7 @@ * @param flags usually 0 * @return 0 on success */ - int (*seqno) (dbiIndex dbi, /*@null@*/ int64_t * seqnop, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *seqnop, fileSystem @*/; + int (*seqno) (dbiIndex dbi, int64_t * seqnop, unsigned int flags); /** \ingroup dbi * Open database cursor. @@ -191,10 +173,8 @@ * @param dbiflags DB_WRITECURSOR or 0 * @return 0 on success */ - int (*copen) (dbiIndex dbi, /*@null@*/ DB_TXN * txnid, - /*@out@*/ DBC ** dbcp, unsigned int dbiflags) - /*@globals fileSystem @*/ - /*@modifies dbi, *txnid, *dbcp, fileSystem @*/; + int (*copen) (dbiIndex dbi, DB_TXN * txnid, + DBC ** dbcp, unsigned int dbiflags); /** \ingroup dbi * Close database cursor. @@ -203,9 +183,7 @@ * @param flags (unused) * @return 0 on success */ - int (*cclose) (dbiIndex dbi, /*@only@*/ DBC * dbcursor, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *dbcursor, fileSystem @*/; + int (*cclose) (dbiIndex dbi, DBC * dbcursor, unsigned int flags); /** \ingroup dbi * Duplicate a database cursor. @@ -215,10 +193,7 @@ * @param flags DB_POSITION for same position, 0 for uninitialized * @return 0 on success */ - int (*cdup) (dbiIndex dbi, DBC * dbcursor, /*@out@*/ DBC ** dbcp, - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *dbcp, fileSystem @*/; + int (*cdup) (dbiIndex dbi, DBC * dbcursor, DBC ** dbcp, unsigned int flags); /** \ingroup dbi * Delete (key,data) pair(s) using db->del or dbcursor->c_del. @@ -229,10 +204,8 @@ * @param flags (unused) * @return 0 on success */ - int (*cdel) (dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data, - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies *dbcursor, fileSystem @*/; + int (*cdel) (dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, + unsigned int flags); /** \ingroup dbi * Retrieve (key,data) pair using db->get or dbcursor->c_get. @@ -243,10 +216,8 @@ * @param flags (unused) * @return 0 on success */ - int (*cget) (dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data, - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies *dbcursor, *key, *data, fileSystem @*/; + int (*cget) (dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, + unsigned int flags); /** \ingroup dbi * Retrieve (key,data) pair using dbcursor->c_pget. @@ -258,10 +229,8 @@ * @param flags DB_NEXT, DB_SET, or 0 * @return 0 on success */ - int (*cpget) (dbiIndex dbi, /*@null@*/ DBC * dbcursor, - DBT * key, DBT * pkey, DBT * data, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies *dbcursor, *key, *pkey, *data, fileSystem @*/; + int (*cpget) (dbiIndex dbi, DBC * dbcursor, + DBT * key, DBT * pkey, DBT * data, unsigned int flags); /** \ingroup dbi * Store (key,data) pair using db->put or dbcursor->c_put. @@ -272,10 +241,8 @@ * @param flags (unused) * @return 0 on success */ - int (*cput) (dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data, - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies *dbcursor, fileSystem @*/; + int (*cput) (dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, + unsigned int flags); /** \ingroup dbi * Retrieve count of (possible) duplicate items using dbcursor->c_count. @@ -285,20 +252,15 @@ * @param flags (unused) * @return 0 on success */ - int (*ccount) (dbiIndex dbi, DBC * dbcursor, - /*@out@*/ unsigned int * countp, - unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies *dbcursor, fileSystem @*/; + int (*ccount) (dbiIndex dbi, DBC * dbcursor, unsigned int * countp, + unsigned int flags); /** \ingroup dbi * Is database byte swapped? * @param dbi index database handle * @return 0 no */ - int (*byteswapped) (dbiIndex dbi) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/; + int (*byteswapped) (dbiIndex dbi); /** \ingroup dbi * Save statistics in database handle. @@ -306,9 +268,7 @@ * @param flags retrieve statistics that don't require traversal? * @return 0 on success */ - int (*stat) (dbiIndex dbi, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/; + int (*stat) (dbiIndex dbi, unsigned int flags); }; /** \ingroup dbi @@ -316,15 +276,10 @@ */ struct _dbiIndex { struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */ -/*@relnull@*/ const char * dbi_root; /*!< chroot(2) component of path */ -/*@null@*/ const char * dbi_home; /*!< directory component of path */ -/*@relnull@*/ const char * dbi_file; /*!< file component of path */ -/*@relnull@*/ const char * dbi_subfile; -/*@null@*/ const char * dbi_tmpdir; /*!< temporary directory */ int dbi_ecflags; /*!< db_env_create flags */ @@ -349,19 +304,13 @@ rpmbf dbi_bf; -/*@null@*/ char * dbi_host; unsigned long dbi_cl_timeout; unsigned long dbi_sv_timeout; /* dbenv parameters */ int dbi_lorder; -/*@unused@*/ - /* XXX db-4.3.14 adds dbenv as 1st arg. */ - void (*db_errcall) (void * dbenv, const char *db_errpfx, char *buffer) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/; -/*@unused@*/ /*@shared@*/ + void (*db_errcall) (void * dbenv, const char *db_errpfx, char *buffer); FILE * dbi_errfile; const char * dbi_errpfx; int dbi_region_init; @@ -385,35 +334,26 @@ /* transaction sub-system parameters */ #if 0 int (*dbi_tx_recover) (DB_ENV *dbenv, DBT *log_rec, - DB_LSN *lsnp, int redo, void *info) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/; + DB_LSN *lsnp, int redo, void *info); #endif /* dbinfo parameters */ int dbi_pagesize; /*!< (fs blksize) */ int dbi_heapsize; /*!< DB_HEAP */ int dbi_heap_regionsize; /*!< DB_HEAP */ -/*@unused@*/ /*@null@*/ - void * (*dbi_malloc) (size_t nbytes) - /*@*/; + void * (*dbi_malloc) (size_t nbytes); /* hash access parameters */ unsigned int dbi_h_ffactor; /*!< */ unsigned int (*dbi_h_hash_fcn) (DB *, const void *bytes, - unsigned int length) - /*@*/; + unsigned int length); unsigned int dbi_h_nelem; /*!< */ unsigned int dbi_h_flags; /*!< DB_DUP, DB_DUPSORT */ - int (*dbi_h_dup_compare_fcn) (DB *, const DBT *, const DBT *, size_t *) - /*@*/; + int (*dbi_h_dup_compare_fcn) (DB *, const DBT *, const DBT *, size_t *); /* btree access parameters */ int dbi_bt_flags; int dbi_bt_minkey; - int (*dbi_bt_compare_fcn) (DB *, const DBT *, const DBT *, size_t *) - /*@*/; - int (*dbi_bt_dup_compare_fcn) (DB *, const DBT *, const DBT *, size_t *) - /*@*/; - size_t (*dbi_bt_prefix_fcn) (DB *, const DBT *, const DBT *) - /*@*/; + int (*dbi_bt_compare_fcn) (DB *, const DBT *, const DBT *, size_t *); + int (*dbi_bt_dup_compare_fcn) (DB *, const DBT *, const DBT *, size_t *); + size_t (*dbi_bt_prefix_fcn) (DB *, const DBT *, const DBT *); /* recno access parameters */ int dbi_re_flags; int dbi_re_delim; @@ -423,12 +363,9 @@ /* queue access parameters */ unsigned int dbi_q_extentsize; -/*@null@*/ const char * dbi_primary; /*!< Primary table for secondary index. */ -/*@null@*/ const char * dbi_foreign; -/*@refcounted@*/ rpmdb dbi_rpmdb; /*!< the parent rpm database */ rpmTag dbi_rpmtag; /*!< rpm tag used for index */ uint32_t dbi_hdrnum; /*!< current hdrnum (rebuilddb) */ @@ -437,16 +374,11 @@ int dbi_table_nkeys; /*!< Sqlite3: COUNT(key) */ int dbi_table_exists; /*!< Sqlite3: table exists? */ -/*@only@*/ /*@relnull@*/ void * dbi_seq; /*!< Berkeley DB_SEQUENCE handle */ -/*@only@*/ /*@relnull@*/ void * dbi_db; /*!< Berkeley DB handle */ -/*@only@*/ /*@null@*/ void * dbi_txnid; /*!< Berkeley DB_TXN handle */ -/*@only@*/ /*@null@*/ void * dbi_stats; /*!< Berkeley DB statistics */ -/*@observer@*/ const struct _dbiVec * dbi_vec; /*!< private methods */ }; @@ -457,37 +389,26 @@ */ struct rpmdb_s { struct rpmioItem_s _item; /*!< usage mutex and pool identifier. */ -/*@owned@*/ /*@relnull@*/ const char * db_root; /*!< rpmdb path prefix */ -/*@owned@*/ const char * db_home; /*!< rpmdb directory path */ int db_flags; int db_mode; /*!< rpmdb open mode */ int db_perms; /*!< rpmdb open permissions */ int db_api; /*!< Berkeley API type */ -/*@owned@*/ const char * db_errpfx; /*!< Berkeley DB error msg prefix. */ int db_remove_env; /*!< Discard dbenv on close? */ uint32_t db_maxkey; /*!< Max. primary key. */ int db_chrootDone; /*!< If chroot(2) done, ignore db_root. */ - void (*db_errcall) (const char * db_errpfx, char * buffer) - /*@*/; -/*@shared@*/ + void (*db_errcall) (const char * db_errpfx, char * buffer); FILE * db_errfile; /*!< Berkeley DB stderr clone. */ -/*@only@*/ - void * (*db_malloc) (size_t nbytes) - /*@*/; -/*@only@*/ - void * (*db_realloc) (/*@only@*//*@null@*/ void * ptr, size_t nbytes) - /*@*/; - void (*db_free) (/*@only@*/ void * ptr) - /*@modifies *ptr @*/; + void * (*db_malloc) (size_t nbytes); + void * (*db_realloc) (void * ptr, size_t nbytes); + void (*db_free) (void * ptr); int (*db_export) (rpmdb db, Header h, int adding); -/*@refcounted@*/ Header db_h; /*!< Currently active header */ rpmdb db_next; /*!< Chain of rpmdbOpen'ed rpmdb's. */ @@ -500,17 +421,12 @@ tagStore_t db_tags; /*!< Tag name/value mappings. */ size_t db_ndbi; /*!< No. of tag indices. */ -/*@only@*/ /*@null@*/ dbiIndex * _dbi; /*!< Tag indices. */ struct rpmop_s db_getops; /*!< dbiGet statistics. */ struct rpmop_s db_putops; /*!< dbiPut statistics. */ struct rpmop_s db_delops; /*!< dbiDel statistics. */ -#if defined(__LCLINT__) -/*@refs@*/ - int nrefs; /*!< (unused) keep splint happy */ -#endif }; #endif /* defined(_RPMDB_INTERNAL) */ @@ -519,7 +435,6 @@ #endif #if defined(_RPMDB_INTERNAL) -/*@-exportlocal@*/ #if defined(WITH_DB) || defined(WITH_SQLITE) /** \ingroup db3 * Return new configured index database handle instance. @@ -527,20 +442,14 @@ * @param tag rpm tag * @return index database handle */ -/*@unused@*/ /*@only@*/ /*@null@*/ -dbiIndex db3New(rpmdb rpmdb, rpmTag tag) - /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ - /*@modifies rpmGlobalMacroContext, internalState @*/; +dbiIndex db3New(rpmdb rpmdb, rpmTag tag); /** \ingroup db3 * Destroy index database handle instance. * @param dbi index database handle * @return NULL always */ -/*@null@*/ -dbiIndex db3Free(/*@only@*/ /*@null@*/ dbiIndex dbi) - /*@globals fileSystem, internalState @*/ - /*@modifies dbi, fileSystem, internalState @*/; +dbiIndex db3Free(dbiIndex dbi); #define db3Free(_dbi) \ ((dbiIndex)rpmioFreePoolItem((rpmioItem)(_dbi), __FUNCTION__, __FILE__, __LINE__)) @@ -550,11 +459,7 @@ * @param print_dbenv_flags format db env flags instead? * @return formatted flags (static buffer) */ -/*@-redecl@*/ -/*@exposed@*/ -extern const char * prDbiOpenFlags(int dbflags, int print_dbenv_flags) - /*@*/; -/*@=redecl@*/ +extern const char * prDbiOpenFlags(int dbflags, int print_dbenv_flags); #endif /** \ingroup dbi @@ -564,10 +469,7 @@ * @param flags (unused) * @return index database handle */ -/*@only@*/ /*@null@*/ dbiIndex dbiOpen(/*@null@*/ rpmdb db, rpmTag tag, - unsigned int flags) - /*@globals rpmGlobalMacroContext, errno, h_errno, internalState @*/ - /*@modifies db, rpmGlobalMacroContext, errno, internalState @*/; +dbiIndex dbiOpen(rpmdb db, rpmTag tag, unsigned int flags); /** * Return dbiStats accumulator structure. @@ -576,11 +478,9 @@ * @return per-rpmdb accumulator pointer */ void * dbiStatsAccumulator(dbiIndex dbi, int opx) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; #if !defined(SWIG) -/*@-globuse -mustmod @*/ /* FIX: vector annotations */ /** \ingroup dbi * Open a database cursor. * @param dbi index database handle @@ -589,11 +489,8 @@ * @param flags DB_WRITECURSOR if writing, or 0 * @return 0 on success */ -/*@unused@*/ static inline -int dbiCopen(dbiIndex dbi, /*@null@*/ DB_TXN * txnid, - /*@out@*/ DBC ** dbcp, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *dbcp, fileSystem @*/ +static inline +int dbiCopen(dbiIndex dbi, DB_TXN * txnid, DBC ** dbcp, unsigned int flags) { return (*dbi->dbi_vec->copen) (dbi, txnid, dbcp, flags); } @@ -605,10 +502,8 @@ * @param flags (unused) * @return 0 on success */ -/*@unused@*/ static inline -int dbiCclose(dbiIndex dbi, /*@only@*/ DBC * dbcursor, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *dbcursor, fileSystem @*/ +static inline +int dbiCclose(dbiIndex dbi, DBC * dbcursor, unsigned int flags) { return (*dbi->dbi_vec->cclose) (dbi, dbcursor, flags); } @@ -621,10 +516,8 @@ * @param flags DB_POSITION for same position, 0 for uninitialized * @return 0 on success */ -/*@unused@*/ static inline -int dbiCdup(dbiIndex dbi, DBC * dbcursor, /*@out@*/ DBC ** dbcp, - unsigned int flags) - /*@modifies dbi, *dbcp @*/ +static inline +int dbiCdup(dbiIndex dbi, DBC * dbcursor, DBC ** dbcp, unsigned int flags) { return (*dbi->dbi_vec->cdup) (dbi, dbcursor, dbcp, flags); } @@ -638,11 +531,9 @@ * @param flags (unused) * @return 0 on success */ -/*@unused@*/ static inline -int dbiDel(dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data, +static inline +int dbiDel(dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, unsigned int flags) - /*@globals fileSystem, internalState @*/ - /*@modifies dbi, *dbcursor, fileSystem, internalState @*/ { rpmop sw = (rpmop)dbiStatsAccumulator(dbi, 16); /* RPMTS_OP_DBDEL */ int rc; @@ -662,11 +553,9 @@ * @param flags (unused) * @return 0 on success */ -/*@unused@*/ static inline -int dbiGet(dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data, +static inline +int dbiGet(dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, unsigned int flags) - /*@globals fileSystem, internalState @*/ - /*@modifies dbi, *dbcursor, *key, *data, fileSystem, internalState @*/ { rpmop sw = (rpmop)dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */ int rc; @@ -686,11 +575,9 @@ * @param flags DB_NEXT, DB_SET, or 0 * @return 0 on success */ -/*@unused@*/ static inline -int dbiPget(dbiIndex dbi, /*@null@*/ DBC * dbcursor, +static inline +int dbiPget(dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * pkey, DBT * data, unsigned int flags) - /*@globals fileSystem, internalState @*/ - /*@modifies dbi, *dbcursor, *key, *pkey, *data, fileSystem, internalState @*/ { rpmop sw = (rpmop)dbiStatsAccumulator(dbi, 14); /* RPMTS_OP_DBGET */ int rc; @@ -709,11 +596,9 @@ * @param flags (unused) * @return 0 on success */ -/*@unused@*/ static inline -int dbiPut(dbiIndex dbi, /*@null@*/ DBC * dbcursor, DBT * key, DBT * data, +static inline +int dbiPut(dbiIndex dbi, DBC * dbcursor, DBT * key, DBT * data, unsigned int flags) - /*@globals fileSystem, internalState @*/ - /*@modifies dbi, *dbcursor, *key, fileSystem, internalState @*/ { rpmop sw = (rpmop)dbiStatsAccumulator(dbi, 15); /* RPMTS_OP_DBPUT */ int rc; @@ -732,11 +617,9 @@ * @param flags (unused) * @return 0 on success */ -/*@unused@*/ static inline -int dbiCount(dbiIndex dbi, DBC * dbcursor, /*@out@*/ unsigned int * countp, +static inline +int dbiCount(dbiIndex dbi, DBC * dbcursor, unsigned int * countp, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies *dbcursor, fileSystem @*/ { return (*dbi->dbi_vec->ccount) (dbi, dbcursor, countp, flags); } @@ -747,10 +630,8 @@ * @param flags (unused) * @return 0 on success */ -/*@unused@*/ static inline -int dbiClose(/*@only@*/ dbiIndex dbi, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/ +static inline +int dbiClose(dbiIndex dbi, unsigned int flags) { return (*dbi->dbi_vec->close) (dbi, flags); } @@ -761,10 +642,8 @@ * @param flags (unused) * @return 0 on success */ -/*@unused@*/ static inline +static inline int dbiSync (dbiIndex dbi, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/ { return (*dbi->dbi_vec->sync) (dbi, flags); } @@ -776,10 +655,8 @@ * @param flags usually 0 * @return 0 if key exists, DB_NOTFOUND if not, else error */ -/*@unused@*/ static inline -int dbiExists(dbiIndex dbi, /*@out@*/ DBT * key, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/ +static inline +int dbiExists(dbiIndex dbi, DBT * key, unsigned int flags) { return (*dbi->dbi_vec->exists) (dbi, key, flags); } @@ -791,10 +668,8 @@ * @param flags usually 0 * @return 0 on success */ -/*@unused@*/ static inline -int dbiSeqno(dbiIndex dbi, /*@null@*/ int64_t * seqnop, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *seqnop, fileSystem @*/ +static inline +int dbiSeqno(dbiIndex dbi, int64_t * seqnop, unsigned int flags) { return (*dbi->dbi_vec->seqno) (dbi, seqnop, flags); } @@ -807,12 +682,10 @@ * @param flags DB_CREATE or 0 * @return 0 on success */ -/*@unused@*/ static inline +static inline int dbiAssociate(dbiIndex dbi, dbiIndex dbisecondary, int (*callback) (DB *, const DBT *, const DBT *, DBT *), unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, fileSystem @*/ { return (*dbi->dbi_vec->associate) (dbi, dbisecondary, callback, flags); } @@ -825,11 +698,9 @@ * @param flags DB_JOIN_NOSORT or 0 * @return 0 on success */ -/*@unused@*/ static inline -int dbiJoin(dbiIndex dbi, DBC ** curslist, /*@out@*/ DBC ** dbcp, +static inline +int dbiJoin(dbiIndex dbi, DBC ** curslist, DBC ** dbcp, unsigned int flags) - /*@globals fileSystem @*/ - /*@modifies dbi, *dbcp, fileSystem @*/ { return (*dbi->dbi_vec->join) (dbi, curslist, dbcp, flags); } @@ -839,9 +710,8 @@ * @param dbi index database handle * @return 0 same order, 1 swapped order */ -/*@unused@*/ static inline +static inline int dbiByteSwapped(dbiIndex dbi) - /*@modifies dbi @*/ { return (*dbi->dbi_vec->byteswapped) (dbi); } @@ -852,9 +722,8 @@ * @param flags DB_FAST_STAT or 0 * @return 0 on success */ -/*@unused@*/ static inline +static inline int dbiStat(dbiIndex dbi, unsigned int flags) - /*@modifies dbi @*/ { return (*dbi->dbi_vec->stat) (dbi, flags); } @@ -864,9 +733,8 @@ * @param dbi index database handle * @return transaction id */ -/*@unused@*/ static inline /*@null@*/ +static inline DB_TXN * dbiTxnid(dbiIndex dbi) - /*@*/ { rpmdb rpmdb = (dbi ? dbi->dbi_rpmdb : NULL); DB_TXN * _txn = (DB_TXN*)(rpmdb ? rpmdb->db_txn : NULL); @@ -875,8 +743,7 @@ #if defined(_RPMDB_INTERNAL) #if defined(WITH_DB) -#if !defined(__LCLINT__) -/*@unused@*/ static inline +static inline int rpmlkId(rpmdb rpmdb, uint32_t *_idp) { DB_ENV * dbenv = (DB_ENV *) rpmdb->db_dbenv; @@ -887,7 +754,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlkIdFree(rpmdb rpmdb, uint32_t _id) { DB_ENV * dbenv = (DB_ENV *)rpmdb->db_dbenv; @@ -898,7 +765,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlkGet(rpmdb rpmdb, DBT * _object, uint32_t _lockmode, void * _lock) { DB_ENV * dbenv = (DB_ENV *)rpmdb->db_dbenv; @@ -912,7 +779,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlkPut(rpmdb rpmdb, void * _lock) { DB_ENV * dbenv = (DB_ENV *)rpmdb->db_dbenv; @@ -924,7 +791,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlkDetect(rpmdb rpmdb, uint32_t _flags, uint32_t _atype, int *_rejected) { DB_ENV * dbenv = (DB_ENV *)rpmdb->db_dbenv; @@ -939,7 +806,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlgcOpen(rpmdb rpmdb) { DB_ENV * dbenv = (DB_ENV *)rpmdb->db_dbenv; @@ -953,7 +820,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlgcGet(rpmdb rpmdb, DB_LSN * _lsn, DBT * data, uint32_t flags) { DB_LOGC * _logc = rpmdb->db_logc; @@ -963,7 +830,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlgcClose(rpmdb rpmdb) { DB_LOGC * _logc = rpmdb->db_logc; @@ -975,7 +842,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlgcFile(rpmdb rpmdb, const DB_LSN * _lsn, char * name, size_t len) { DB_ENV * dbenv = (DB_ENV*)rpmdb->db_dbenv; @@ -985,7 +852,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlgcFlush(rpmdb rpmdb, const DB_LSN * _lsn) { DB_ENV * dbenv = (DB_ENV*)rpmdb->db_dbenv; @@ -995,7 +862,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlgcPrintf(rpmdb rpmdb, const char * fmt, void *_A1, void *_A2, void *_A3, void *_A4, void *_A5) { DB_ENV * dbenv = (DB_ENV*)rpmdb->db_dbenv; @@ -1006,7 +873,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmlgcPut(rpmdb rpmdb, DB_LSN * _lsn, const DBT * data, uint32_t flags) { DB_ENV * dbenv = (DB_ENV*)rpmdb->db_dbenv; @@ -1016,7 +883,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmmpfSyncAll(rpmdb rpmdb) { DB_ENV * dbenv = (DB_ENV*)rpmdb->db_dbenv; @@ -1028,7 +895,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmmpfTrickle(rpmdb rpmdb) { DB_ENV * dbenv = (DB_ENV*)rpmdb->db_dbenv; @@ -1041,7 +908,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmmpfClose(rpmdb rpmdb) { DB_MPOOLFILE * mpf = rpmdb->db_mpf; @@ -1053,7 +920,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmmpfGet(rpmdb rpmdb, uint32_t * _pgnop, uint32_t _flags, void ** _pagep) { DB_MPOOLFILE * mpf = rpmdb->db_mpf; @@ -1064,8 +931,8 @@ return rc; } -/*@unused@*/ static inline -int rpmmpfOpen(rpmdb rpmdb, /*@null@*/ const char * fn, uint32_t flags) +static inline +int rpmmpfOpen(rpmdb rpmdb, const char * fn, uint32_t flags) { DB_ENV * dbenv = (DB_ENV*)rpmdb->db_dbenv; DB_MPOOLFILE * mpf = NULL; @@ -1087,7 +954,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmmpfPut(rpmdb rpmdb, void * _page, uint32_t flags) { DB_MPOOLFILE * mpf = rpmdb->db_mpf; @@ -1098,7 +965,7 @@ return rc; } -/*@unused@*/ static inline +static inline int rpmmpfSync(rpmdb rpmdb) { DB_MPOOLFILE * mpf = rpmdb->db_mpf; @@ -1107,22 +974,16 @@ fprintf(stderr, "<-- %s(%p) rc %d\n", "mpf->close", mpf, rc); return rc; } -#endif /* __LCLINT__ */ #endif /* defined(WITH_DB) */ #endif /* _RPMDB_INTERNAL */ -/*@=globuse =mustmod @*/ #endif /* !defined(SWIG) */ -/*@=exportlocal@*/ - /** \ingroup dbi * Destroy set of index database items. * @param set set of index database items * @return NULL always */ -/*@null@*/ -dbiIndexSet dbiFreeIndexSet(/*@only@*/ /*@null@*/ dbiIndexSet set) - /*@modifies set @*/; +dbiIndexSet dbiFreeIndexSet(dbiIndexSet set); /** \ingroup dbi * Count items in index database set. @@ -1130,8 +991,7 @@ * @return number of items */ unsigned int dbiIndexSetCount(dbiIndexSet set) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; /** \ingroup dbi * Return record offset of header from element in index database set. @@ -1140,8 +1000,7 @@ * @return record offset of header */ uint32_t dbiIndexRecordOffset(dbiIndexSet set, unsigned int recno) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; /** \ingroup dbi * Return file index from element in index database set. @@ -1150,8 +1009,7 @@ * @return file index */ uint32_t dbiIndexRecordFileNumber(dbiIndexSet set, unsigned int recno) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; #endif /* defined(_RPMDB_INTERNAL) */ /** \ingroup rpmdb @@ -1160,9 +1018,7 @@ * @param msg * @return NULL always */ -/*@unused@*/ /*@null@*/ -rpmdb rpmdbUnlink (/*@killref@*/ /*@only@*/ rpmdb db, const char * msg) - /*@modifies db @*/; +rpmdb rpmdbUnlink (rpmdb db, const char * msg); #define rpmdbUnlink(_db, _msg) \ ((rpmdb)rpmioUnlinkPoolItem((rpmioItem)(_db), _msg, __FILE__, __LINE__)) @@ -1172,20 +1028,14 @@ * @param msg * @return new rpm database reference */ -/*@unused@*/ /*@newref@*/ -rpmdb rpmdbLink (rpmdb db, const char * msg) - /*@modifies db @*/; +rpmdb rpmdbLink (rpmdb db, const char * msg); #define rpmdbLink(_db, _msg) \ ((void *)rpmioLinkPoolItem((rpmioItem)(_db), _msg, __FILE__, __LINE__)) /** @todo document rpmdbNew */ -/*@only@*/ /*@null@*/ -rpmdb rpmdbNew(/*@kept@*/ /*@null@*/ const char * root, - /*@kept@*/ /*@null@*/ const char * home, - int mode, mode_t perms, int flags) - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; +rpmdb rpmdbNew(const char * root, const char * home, + int mode, mode_t perms, int flags); /** \ingroup rpmdb * Open rpm database. @@ -1195,10 +1045,7 @@ * @param perms database permissions * @return 0 on success */ -int rpmdbOpen(/*@null@*/ const char * prefix, /*@null@*/ /*@out@*/ rpmdb * dbp, - int mode, mode_t perms) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies *dbp, rpmGlobalMacroContext, fileSystem, internalState @*/; +int rpmdbOpen(const char * prefix, rpmdb * dbp, int mode, mode_t perms); /** * Block access to a single database index. @@ -1206,8 +1053,7 @@ * @param tag rpm tag (negative to block) * @return 0 on success */ -int rpmdbBlockDBI(/*@null@*/ rpmdb db, int tag) - /*@modifies db @*/; +int rpmdbBlockDBI(rpmdb db, int tag); /** * Close a single database index. @@ -1215,29 +1061,21 @@ * @param tag rpm tag * @return 0 on success */ -int rpmdbCloseDBI(/*@null@*/ rpmdb db, int tag) - /*@globals fileSystem @*/ - /*@modifies db, fileSystem @*/; +int rpmdbCloseDBI(rpmdb db, int tag); /** \ingroup rpmdb * Close all database indices and free rpmdb. * @param db rpm database * @return 0 on success */ -int rpmdbClose (/*@killref@*/ /*@only@*/ /*@null@*/ rpmdb db) - /*@globals fileSystem @*/ - /*@modifies db, fileSystem @*/; +int rpmdbClose (rpmdb db); /** \ingroup rpmdb * Open all database indices. * @param db rpm database * @return 0 on success */ -/*@-exportlocal@*/ -int rpmdbOpenAll (/*@null@*/ rpmdb db) - /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ - /*@modifies db, rpmGlobalMacroContext, internalState @*/; -/*@=exportlocal@*/ +int rpmdbOpenAll (rpmdb db); /** \ingroup rpmdb * Return number of instances of key in a tag index. @@ -1247,10 +1085,7 @@ * @param keylen key data length (0 will use strlen(keyp)) * @return number of instances */ -int rpmdbCount(/*@null@*/ rpmdb db, rpmTag tag, - const void * keyp, size_t keylen) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies db, rpmGlobalMacroContext, fileSystem, internalState @*/; +int rpmdbCount(rpmdb db, rpmTag tag, const void * keyp, size_t keylen); /** \ingroup rpmdb * Return number of instances of package in Name index. @@ -1258,33 +1093,28 @@ * @param N rpm package name * @return number of instances */ -int rpmdbCountPackages(/*@null@*/ rpmdb db, const char * N) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies db, rpmGlobalMacroContext, fileSystem, internalState @*/; +int rpmdbCountPackages(rpmdb db, const char * N); /** \ingroup rpmdb * Return header instance for current position of rpmdb iterator. * @param mi rpm database iterator * @return current header instance */ -uint32_t rpmmiInstance(/*@null@*/ rpmmi mi) - /*@*/; +uint32_t rpmmiInstance(rpmmi mi); /** \ingroup rpmdb * Return basename tag for current position of rpmdb iterator. * @param mi rpm database iterator * @return current basename tag */ -uint32_t rpmmiBNTag(/*@null@*/ rpmmi mi) - /*@*/; +uint32_t rpmmiBNTag(rpmmi mi); /** \ingroup rpmdb * Return number of elements in rpm database iterator. * @param mi rpm database iterator * @return number of elements */ -unsigned int rpmmiCount(/*@null@*/ rpmmi mi) - /*@*/; +unsigned int rpmmiCount(rpmmi mi); /** \ingroup rpmdb * Append items to set of package instances to iterate. @@ -1293,9 +1123,7 @@ * @param nHdrNums number of elements in array * @return 0 on success, 1 on failure (bad args) */ -int rpmmiGrow(/*@null@*/ rpmmi mi, - /*@null@*/ const uint32_t * hdrNums, int nHdrNums) - /*@modifies mi @*/; +int rpmmiGrow(rpmmi mi, const uint32_t * hdrNums, int nHdrNums); /** \ingroup rpmdb * Append packages containing common basename to iterator. @@ -1303,16 +1131,14 @@ * @param bn basename key * @return 0 on success, 1 on failure (bad args) */ -int rpmmiGrowBasename(rpmmi mi, const char * bn) - /*@modifies mi @*/; +int rpmmiGrowBasename(rpmmi mi, const char * bn); /** \ingroup rpmdb * Sort iterator instances. * @param mi rpm database iterator * @return 0 on success */ -int rpmmiSort(/*@null@*/ rpmmi mi) - /*@modifies mi @*/; +int rpmmiSort(rpmmi mi); /** \ingroup rpmdb * Remove items from set of package instances to iterate. @@ -1323,9 +1149,7 @@ * @param sorted is the array sorted? (array will be sorted on return) * @return 0 on success, 1 on failure (bad args) */ -int rpmmiPrune(/*@null@*/ rpmmi mi, - /*@null@*/ uint32_t * hdrNums, int nHdrNums, int sorted) - /*@modifies mi, hdrNums @*/; +int rpmmiPrune(rpmmi mi, uint32_t * hdrNums, int nHdrNums, int sorted); /** \ingroup rpmdb * Add pattern to iterator selector. @@ -1335,10 +1159,8 @@ * @param pattern pattern to match * @return 0 on success */ -int rpmmiAddPattern(/*@null@*/ rpmmi mi, rpmTag tag, - rpmMireMode mode, /*@null@*/ const char * pattern) - /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ - /*@modifies mi, mode, rpmGlobalMacroContext, internalState @*/; +int rpmmiAddPattern(rpmmi mi, rpmTag tag, + rpmMireMode mode, const char * pattern); /** \ingroup rpmdb * Prepare iterator for lazy writes. @@ -1347,8 +1169,7 @@ * @param rewrite new value of rewrite * @return previous value */ -int rpmmiSetRewrite(/*@null@*/ rpmmi mi, int rewrite) - /*@modifies mi @*/; +int rpmmiSetRewrite(rpmmi mi, int rewrite); /** \ingroup rpmdb * Modify iterator to mark header for lazy write on release. @@ -1356,8 +1177,7 @@ * @param modified new value of modified * @return previous value */ -int rpmmiSetModified(/*@null@*/ rpmmi mi, int modified) - /*@modifies mi @*/; +int rpmmiSetModified(rpmmi mi, int modified); /** \ingroup rpmdb * Return database iterator. @@ -1367,21 +1187,14 @@ * @param keylen key data length (0 will use strlen(keyp)) * @return NULL on failure */ -/*@only@*/ /*@null@*/ -rpmmi rpmmiInit(/*@null@*/ rpmdb db, rpmTag tag, - /*@null@*/ const void * keyp, size_t keylen) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies db, rpmGlobalMacroContext, fileSystem, internalState @*/; +rpmmi rpmmiInit(rpmdb db, rpmTag tag, const void * keyp, size_t keylen); /** \ingroup rpmdb * Return next package header from iteration. * @param mi rpm database iterator * @return NULL on end of iteration. */ -/*@null@*/ -Header rpmmiNext(/*@null@*/ rpmmi mi) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/; +Header rpmmiNext(rpmmi mi); /** \ingroup rpmdb * Check rpmdb signal handler for trapped signal and/or requested exit. @@ -1392,28 +1205,19 @@ * @param terminate 0 to only check for signals, 1 to terminate anyway * @return 0 to continue, 1 if termination cleanup was done. */ -/*@mayexit@*/ -int rpmdbCheckTerminate(int terminate) - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; +int rpmdbCheckTerminate(int terminate); /** \ingroup rpmdb * Check for and exit on termination signals. */ -/*@mayexit@*/ -int rpmdbCheckSignals(void) - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; +int rpmdbCheckSignals(void); /** \ingroup rpmdb * Unreference a rpm database iterator. * @param mi rpm database iterator * @return NULL on last dereference */ -/*@null@*/ -rpmmi rpmmiUnlink(/*@only@*/ /*@null@*/rpmmi mi) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/; +rpmmi rpmmiUnlink(rpmmi mi); #define rpmmiUnlink(_mi) \ ((rpmmi)rpmioUnlinkPoolItem((rpmioItem)(_mi), __FUNCTION__, __FILE__, __LINE__)) @@ -1422,10 +1226,7 @@ * @param mi rpm database iterator * @return NULL on last dereference */ -/*@null@*/ -rpmmi rpmmiLink(/*@only@*/ /*@null@*/rpmmi mi) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/; +rpmmi rpmmiLink(rpmmi mi); #define rpmmiLink(_mi) \ ((rpmmi)rpmioLinkPoolItem((rpmioItem)(_mi), __FUNCTION__, __FILE__, __LINE__)) @@ -1434,10 +1235,7 @@ * @param mi rpm database iterator * @return NULL always */ -/*@null@*/ -rpmmi rpmmiFree(/*@only@*/ /*@null@*/rpmmi mi) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies mi, rpmGlobalMacroContext, fileSystem, internalState @*/; +rpmmi rpmmiFree(rpmmi mi); #define rpmmiFree(_mi) \ ((rpmmi)rpmioFreePoolItem((rpmioItem)(_mi), __FUNCTION__, __FILE__, __LINE__)) @@ -1451,10 +1249,7 @@ * @return 0 on success */ int rpmdbMireApply(rpmdb db, rpmTag tag, rpmMireMode mode, const char * pat, - const char *** argvp) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies db, *argvp, - rpmGlobalMacroContext, fileSystem, internalState @*/; + const char *** argvp); /** \ingroup rpmdb * Add package header to rpm database and indices. @@ -1464,10 +1259,7 @@ * @param ts (unused) transaction set (or NULL) * @return 0 on success */ -int rpmdbAdd(/*@null@*/ rpmdb db, int iid, Header h, /*@null@*/ rpmts ts) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies db, h, ts, - rpmGlobalMacroContext, fileSystem, internalState @*/; +int rpmdbAdd(rpmdb db, int iid, Header h, rpmts ts); /** \ingroup rpmdb * Remove package header from rpm database and indices. @@ -1477,24 +1269,16 @@ * @param ts (unused) transaction set (or NULL) * @return 0 on success */ -int rpmdbRemove(/*@null@*/ rpmdb db, /*@unused@*/ int rid, uint32_t hdrNum, - /*@null@*/ rpmts ts) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies db, ts, - rpmGlobalMacroContext, fileSystem, internalState @*/; +int rpmdbRemove(rpmdb db, int rid, uint32_t hdrNum, rpmts ts); /** * Mergesort, same arguments as qsort(2). */ -/*@unused@*/ int rpm_mergesort(void *base, size_t nmemb, size_t size, - int (*cmp) (const void *, const void *)) - /*@globals errno @*/ - /*@modifies base, errno @*/; + int (*cmp) (const void *, const void *)); #ifdef __cplusplus } #endif -/*@=bounds@*/ #endif /* H_RPMDB */ @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/rpmevr.h ============================================================================ $ cvs diff -u -r1.11.4.5 -r1.11.4.6 rpmevr.h --- rpm/rpmdb/rpmevr.h 29 Sep 2014 18:34:24 -0000 1.11.4.5 +++ rpm/rpmdb/rpmevr.h 25 Jun 2016 08:32:00 -0000 1.11.4.6 @@ -6,29 +6,26 @@ * Structure(s) and routine(s) used for EVR parsing and comparison. */ +#include <stdint.h> +#include <rpmdefs.h> + #ifdef __cplusplus extern "C" { #endif /** */ -/*@-exportlocal@*/ -/*@unchecked@*/ extern int _rpmevr_debug; -/*@=exportlocal@*/ -typedef /*@abstract@*/ struct EVR_s * EVR_t; +typedef struct EVR_s * EVR_t; /** * Dependency Attributes. */ -/*@-matchfields@*/ typedef enum evrFlags_e { #if defined(_RPMEVR_INTERNAL) RPMSENSE_ANY = 0, -/*@-enummemuse@*/ RPMSENSE_SERIAL = (1 << 0), /*!< (obsolete). */ -/*@=enummemuse@*/ #endif RPMSENSE_LESS = (1 << 1), RPMSENSE_GREATER = (1 << 2), @@ -67,7 +64,6 @@ RPMSENSE_SCRIPT_SANITYCHECK = (1 << 31) /*!< %sanitycheck dependency. */ #endif } evrFlags; -/*@=matchfields@*/ typedef enum evrFlags_e rpmsenseFlags; @@ -81,7 +77,6 @@ * An EVR parsing container. */ struct EVR_s { -/*@owned@*/ const char * str; /*!< EVR storage */ #ifndef DYING unsigned long Elong; /*!< E converted to integer. */ @@ -131,20 +126,17 @@ * @param initialize Should empty defaults be initialized? * @return initialized EVR container */ -EVR_t rpmEVRnew(uint32_t Flags, int initialize) - /*@*/; +EVR_t rpmEVRnew(uint32_t Flags, int initialize); /** \ingroup rpmds * Destroy an EVR container. * @param evr EVR container * @return NULL always */ -/*@null@*/ -EVR_t rpmEVRfree(/*@only@*/ EVR_t evr) - /*@modifies evr @*/; +EVR_t rpmEVRfree(EVR_t evr); + +extern int (*rpmvercmp)(const char *a, const char *b); -extern int (*rpmvercmp)(const char *a, const char *b) - /*@*/; /** \ingroup rpmds * Segmented string compare. * @param a 1st string @@ -152,8 +144,7 @@ * @return +1 if a is "newer", 0 if equal, -1 if b is "newer" */ int rpmEVRcmp(const char *a, const char *b) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; /** \ingroup rpmds * Split EVR string into epoch, version, and release components. @@ -161,8 +152,7 @@ * @retval evr *evr parse results * @return 0 always */ -int rpmEVRparse(const char * evrstr, EVR_t evr) - /*@modifies evrstr, evr @*/; +int rpmEVRparse(const char * evrstr, EVR_t evr); /** \ingroup rpmds * Compare EVR containers for equality. @@ -170,8 +160,7 @@ * @param b 2nd EVR container * @return +1 if a is "newer", 0 if equal, -1 if b is "newer" */ -int rpmEVRcompare(const EVR_t a, const EVR_t b) - /*@*/; +int rpmEVRcompare(const EVR_t a, const EVR_t b); /** \ingroup rpmds * Compare EVR containers for overlap. @@ -179,8 +168,7 @@ * @param b 2nd EVR container * @return 1 if EVR inequalities overlap, 0 otherwise */ -int rpmEVRoverlap(EVR_t a, EVR_t b) - /*@*/; +int rpmEVRoverlap(EVR_t a, EVR_t b); /** * Return comparison operator sense flags. @@ -188,8 +176,7 @@ * @param end *end pointer to 1st character after operator (or NULL) * @return sense flags */ -rpmsenseFlags rpmEVRflags(/*@null@*/const char *op, /*@null@*/const char **end) - /*@modifies *end @*/; +rpmsenseFlags rpmEVRflags(const char *op, const char **end); #if defined(_RPMEVR_INTERNAL) /** @@ -200,9 +187,7 @@ * @param B 2nd header * @return result of comparison */ -int rpmVersionCompare(Header A, Header B) - /*@globals internalState @*/ - /*@modifies internalState @*/; +int rpmVersionCompare(Header A, Header B); #endif #ifdef __cplusplus @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/rpmns.h ============================================================================ $ cvs diff -u -r1.4.6.5 -r1.4.6.6 rpmns.h --- rpm/rpmdb/rpmns.h 24 Sep 2014 13:27:54 -0000 1.4.6.5 +++ rpm/rpmdb/rpmns.h 25 Jun 2016 08:32:00 -0000 1.4.6.6 @@ -6,17 +6,17 @@ * Structure(s) and routine(s) used for classifying and parsing names. */ +#include <stddef.h> +#include <rpmiotypes.h> +#include <rpmdefs.h> + /** */ -/*@-exportlocal@*/ -/*@unchecked@*/ extern int _rpmns_debug; -/*@=exportlocal@*/ -/*@unchecked@*/ /*@observer@*/ /*@relnull@*/ extern const char *_rpmns_N_at_A; -typedef /*@abstract@*/ struct rpmns_s * rpmns; +typedef struct rpmns_s * rpmns; /** * Dependency types @@ -62,14 +62,10 @@ * An NS parsing container. */ struct rpmns_s { -/*@owned@*/ const char * str; /*!< string storage */ nsType Type; /*!< Type */ -/*@dependent@*/ /*@null@*/ const char * NS; /*!< Namespace */ -/*@dependent@*/ /*@relnull@*/ const char * N; /*!< Name */ -/*@dependent@*/ /*@null@*/ const char * A; /*!< Arch */ evrFlags Flags; /*!< EVR comparison flags. */ }; @@ -85,8 +81,7 @@ * @return RPMNS_TYPE_ARCH if known arch, else RPMNS_TYPE_UNKNOWN */ nsType rpmnsArch(const char * str) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; /** \ingroup rpmds * Is string a known probe namespace? @@ -95,8 +90,7 @@ * @return nsType if known probe, else RPMNS_TYPE_UNKNOWN */ nsType rpmnsProbe(const char * s, size_t slen) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; /** \ingroup rpmds * Classify a string as a dependency type. @@ -105,8 +99,7 @@ * @return dependency type */ nsType rpmnsClassify(const char * s, size_t slen) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; /** \ingroup rpmds * Expand and split NS(N).A string into namespace, name and arch components. @@ -114,16 +107,12 @@ * @retval *ns parse results * @return 0 always */ -int rpmnsParse(const char * str, rpmns ns) - /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ - /*@modifies ns, rpmGlobalMacroContext, internalState @*/; +int rpmnsParse(const char * str, rpmns ns); /** \ingroup rpmns * Clean global name space dependency sets. */ -void rpmnsClean(void) - /*@globals internalState @*/ - /*@modifies internalState @*/; +void rpmnsClean(void); /** \ingroup rpmns * Verify OpenPGP signature on a file. @@ -136,12 +125,10 @@ * @return RPMRC_OK if verified, RPMRC_FAIL if not verified */ rpmRC rpmnsProbeSignature(void * _ts, const char * fn, - /*@null@*/ const char * sigfn, - /*@null@*/ const char * pubfn, - /*@null@*/ const char * pubid, - int flags) - /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ - /*@modifies _ts, rpmGlobalMacroContext, fileSystem, internalState @*/; + const char * sigfn, + const char * pubfn, + const char * pubid, + int flags); #ifdef __cplusplus } @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/rpmtag.h ============================================================================ $ cvs diff -u -r1.70.4.21 -r1.70.4.22 rpmtag.h --- rpm/rpmdb/rpmtag.h 3 Apr 2016 20:49:05 -0000 1.70.4.21 +++ rpm/rpmdb/rpmtag.h 25 Jun 2016 08:32:00 -0000 1.70.4.22 @@ -5,9 +5,12 @@ * \file rpmdb/rpmtag.h */ +#include <stdint.h> +#include <stdio.h> #include <rpmiotypes.h> +#include <rpmdefs.h> + #include <rpmsw.h> -#include <stdint.h> #ifdef __cplusplus extern "C" { @@ -19,7 +22,7 @@ /** \ingroup header */ -typedef /*@abstract@*/ /*@refcounted@*/ struct headerToken_s * Header; +typedef struct headerToken_s * Header; /** \ingroup header * The basic types of data in tags from headers. @@ -60,39 +63,31 @@ /** \ingroup header */ -/*@-typeuse -fielduse@*/ #if !defined(SWIG) union rpmDataType_u { -/*@null@*/ void * ptr; /*!< must be first */ rpmuint8_t * ui8p; /*!< RPM_UINT8_TYPE | RPM_CHAR_TYPE */ rpmuint16_t * ui16p; /*!< RPM_UINT16_TYPE */ rpmuint32_t * ui32p; /*!< RPM_UINT32_TYPE */ rpmuint64_t * ui64p; /*!< RPM_UINT64_TYPE */ -/*@relnull@*/ const char * str; /*!< RPM_STRING_TYPE */ unsigned char * blob; /*!< RPM_BIN_TYPE */ const char ** argv; /*!< RPM_STRING_ARRAY_TYPE */ HE_t he; }; #endif -/*@=typeuse =fielduse@*/ -/*@=typeuse =fielduse@*/ /** \ingroup header */ -/*@-enummemuse -typeuse @*/ typedef enum rpmSubTagType_e { RPM_REGION_TYPE = -10, RPM_BIN_ARRAY_TYPE = -11, RPM_XREF_TYPE = -12 } rpmSubTagType; -/*@=enummemuse =typeuse @*/ /** \ingroup header * Identify how to return the header data type. */ -/*@-enummemuse -typeuse @*/ typedef enum rpmTagReturnType_e { RPM_ANY_RETURN_TYPE = 0, RPM_SCALAR_RETURN_TYPE = 0x00010000, @@ -107,7 +102,6 @@ RPM_OPAQUE_RETURN_TYPE = 0x10000000, RPM_MASK_RETURN_TYPE = 0xffff0000 } rpmTagReturnType; -/*@=enummemuse =typeuse @*/ /** * Header private tags. @@ -123,15 +117,15 @@ /** \ingroup header */ -typedef /*@abstract@*/ struct headerIterator_s * HeaderIterator; +typedef struct headerIterator_s * HeaderIterator; /** \ingroup header */ -typedef /*@abstract@*/ struct headerTagIndices_s * headerTagIndices; +typedef struct headerTagIndices_s * headerTagIndices; /** \ingroup header */ -typedef /*@abstract@*/ const struct headerSprintfExtension_s * headerSprintfExtension; +typedef const struct headerSprintfExtension_s * headerSprintfExtension; /** \ingroup header * Tags identify data in package headers. @@ -142,11 +136,9 @@ RPMTAG_HEADERIMAGE = HEADER_IMAGE, /*!< internal Current image. */ RPMTAG_HEADERSIGNATURES = HEADER_SIGNATURES, /*!< internal Signatures. */ RPMTAG_HEADERIMMUTABLE = HEADER_IMMUTABLE, /*!< x Original image. */ -/*@-enummemuse@*/ RPMTAG_HEADERREGIONS = HEADER_REGIONS, /*!< internal Regions. */ RPMTAG_HEADERI18NTABLE = HEADER_I18NTABLE, /*!< s[] I18N string locales. */ -/*@=enummemuse@*/ /* Retrofit (and uniqify) signature tags for use by tagName() and rpmQuery. */ /* the md5 sum was broken *twice* on big endian machines */ @@ -193,9 +185,7 @@ RPMTAG_LICENSE = 1014, /* s */ RPMTAG_PACKAGER = 1015, /* s */ RPMTAG_GROUP = 1016, /* s */ -/*@-enummemuse@*/ RPMTAG_CHANGELOG = 1017, /* s[] internal */ -/*@=enummemuse@*/ RPMTAG_SOURCE = 1018, /* s[] */ RPMTAG_PATCH = 1019, /* s[] */ RPMTAG_URL = 1020, /* s */ @@ -217,15 +207,11 @@ #define RPMTAG_FILEMD5S RPMTAG_FILEDIGESTS /* s[] */ RPMTAG_FILELINKTOS = 1036, /* s[] */ RPMTAG_FILEFLAGS = 1037, /* i[] */ -/*@-enummemuse@*/ RPMTAG_ROOT = 1038, /* internal - obsolete */ -/*@=enummemuse@*/ RPMTAG_FILEUSERNAME = 1039, /* s[] */ RPMTAG_FILEGROUPNAME = 1040, /* s[] */ -/*@-enummemuse@*/ RPMTAG_EXCLUDE = 1041, /* internal - obsolete */ RPMTAG_EXCLUSIVE = 1042, /* internal - obsolete */ -/*@=enummemuse@*/ RPMTAG_ICON = 1043, /* x */ RPMTAG_SOURCERPM = 1044, /* s */ RPMTAG_FILEVERIFYFLAGS = 1045, /* i[] */ @@ -262,9 +248,7 @@ RPMTAG_CHANGELOGTIME = 1080, /* i[] */ RPMTAG_CHANGELOGNAME = 1081, /* s[] */ RPMTAG_CHANGELOGTEXT = 1082, /* s[] */ -/*@-enummemuse@*/ RPMTAG_BROKENMD5 = 1083, /* internal - obsolete */ -/*@=enummemuse@*/ RPMTAG_PREREQ = 1084, /* internal */ RPMTAG_PREINPROG = 1085, /* s */ RPMTAG_POSTINPROG = 1086, /* s */ @@ -288,19 +272,13 @@ RPMTAG_TRIGGERPOSTUN = 1102, /* internal */ RPMTAG_AUTOREQ = 1103, /* internal */ RPMTAG_AUTOPROV = 1104, /* internal */ -/*@-enummemuse@*/ RPMTAG_CAPABILITY = 1105, /* i legacy - obsolete */ -/*@=enummemuse@*/ RPMTAG_SOURCEPACKAGE = 1106, /* i legacy - obsolete */ -/*@-enummemuse@*/ RPMTAG_OLDORIGFILENAMES = 1107, /* internal - obsolete */ -/*@=enummemuse@*/ RPMTAG_BUILDPREREQ = 1108, /* internal */ RPMTAG_BUILDREQUIRES = 1109, /* internal */ RPMTAG_BUILDCONFLICTS = 1110, /* internal */ -/*@-enummemuse@*/ RPMTAG_BUILDMACROS = 1111, /* s[] srpms only */ -/*@=enummemuse@*/ RPMTAG_PROVIDEFLAGS = 1112, /* i[] */ RPMTAG_PROVIDEVERSION = 1113, /* s[] */ RPMTAG_OBSOLETEFLAGS = 1114, /* i[] */ @@ -319,9 +297,7 @@ RPMTAG_INSTALLCOLOR = 1127, /* i transaction color when installed */ RPMTAG_INSTALLTID = 1128, /* i[] */ RPMTAG_REMOVETID = 1129, /* i[] */ -/*@-enummemuse@*/ RPMTAG_SHA1RHN = 1130, /* internal - obsolete */ -/*@=enummemuse@*/ RPMTAG_RHNPLATFORM = 1131, /* s deprecated */ RPMTAG_PLATFORM = 1132, /* s */ RPMTAG_PATCHESNAME = 1133, /* s[] deprecated placeholder (SuSE) */ @@ -518,9 +494,7 @@ RPMTAG_FILESIGNATURES = 5090, /* s[] */ RPMTAG_FILESIGNATURELENGTH = 5091, /* i */ -/*@-enummemuse@*/ RPMTAG_FIRSTFREE_TAG, /*!< internal */ -/*@=enummemuse@*/ RPMTAG_SIGPADDING = 0x3fffffff, /* x */ @@ -596,12 +570,10 @@ /** \ingroup header */ -/*@-typeuse -fielduse@*/ #if !defined(SWIG) struct _HE_s { rpmTag tag; rpmTagType t; -/*@owned@*/ /*@null@*/ rpmTagData p; rpmTagCount c; int ix; @@ -621,7 +593,7 @@ /** */ -typedef /*@abstract@*/ const struct headerTagTableEntry_s * headerTagTableEntry; +typedef const struct headerTagTableEntry_s * headerTagTableEntry; #if defined(_RPMTAG_INTERNAL) /** @@ -631,7 +603,6 @@ */ #if !defined(SWIG) struct headerTagTableEntry_s { -/*@observer@*/ /*@relnull@*/ const char * name; /*!< Tag name. */ rpmTag val; /*!< Tag numeric value. */ rpmTagType type; /*!< Tag type. */ @@ -641,7 +612,6 @@ /** */ struct tagStore_s { -/*@only@*/ const char * str; /*!< Tag string (might be arbitrary). */ rpmTag tag; /*!< Tag number. */ rpmiob iob; /*!< Tag contents. */ @@ -651,57 +621,44 @@ /** * Automatically generated table of tag name/value pairs. */ -/*@-redecl@*/ -/*@observer@*/ /*@unchecked@*/ extern headerTagTableEntry rpmTagTable; -/*@=redecl@*/ /** * Number of entries in rpmTagTable. */ -/*@-redecl@*/ -/*@unchecked@*/ extern int rpmTagTableSize; -/*@unchecked@*/ extern headerTagIndices rpmTags; -/*@=redecl@*/ #if defined(_RPMTAG_INTERNAL) /** */ #if !defined(SWIG) struct headerTagIndices_s { -/*@relnull@*/ int (*loadIndex) (headerTagTableEntry ** ipp, size_t * np, - int (*cmp) (const void * avp, const void * bvp)) - /*@ modifies *ipp, *np */; /*!< Load sorted tag index. */ -/*@relnull@*/ + int (*cmp) (const void * avp, const void * bvp)); + /*!< Load sorted tag index. */ headerTagTableEntry * byName; /*!< rpmTag's sorted by name. */ size_t byNameSize; /*!< No. of entries. */ - int (*byNameCmp) (const void * avp, const void * bvp) - /*@*/; /*!< Compare entries by name. */ - rpmTag (*tagValue) (const char * name) - /*@*/; /*!< Return value from name. */ -/*@relnull@*/ + int (*byNameCmp) (const void * avp, const void * bvp); + /*!< Compare entries by name. */ + rpmTag (*tagValue) (const char * name); + /*!< Return value from name. */ headerTagTableEntry * byValue; /*!< rpmTag's sorted by value. */ size_t byValueSize; /*!< No. of entries. */ - int (*byValueCmp) (const void * avp, const void * bvp) - /*@*/; /*!< Compare entries by value. */ - const char * (*tagName) (rpmTag value) - /*@*/; /*!< Return name from value. */ - rpmTag (*tagType) (rpmTag value) - /*@*/; /*!< Return type from value. */ + int (*byValueCmp) (const void * avp, const void * bvp); + /*!< Compare entries by value. */ + const char * (*tagName) (rpmTag value); + /*!< Return name from value. */ + rpmTag (*tagType) (rpmTag value); + /*!< Return type from value. */ size_t nameBufLen; /*!< No. bytes allocated for nameBuf. */ -/*@relnull@*/ const char ** aTags; /*!< Arbitrary tags array (ARGV_t) */ -/*@owned@*/ /*@null@*/ char * nameBuf; /* Name buffer. */ -/*@only@*/ - char * (*tagCanonicalize) (const char * s) - /*@*/; /*!< Canonicalize arbitrary string. */ - rpmTag (*tagGenerate) (const char * s) - /*@*/; /*!< Generate tag from string. */ + char * (*tagCanonicalize) (const char * s); + /*!< Canonicalize arbitrary string. */ + rpmTag (*tagGenerate) (const char * s); + /*!< Generate tag from string. */ }; #endif #endif /* _RPMTAG_INTERNAL */ @@ -711,9 +668,7 @@ * @param tag tag value * @return tag name, "(unknown)" on not found */ -/*@observer@*/ -const char * tagName(rpmTag tag) - /*@*/; +const char * tagName(rpmTag tag); /** * Return tag data type from value. @@ -721,41 +676,34 @@ * @param tag tag value * @return tag data type, 0 on not found. */ -unsigned int tagType(rpmTag tag) - /*@*/; +unsigned int tagType(rpmTag tag); /** * Return tag value from name. * @param tagstr name of tag * @return tag value, 0xffffffff on not found */ -rpmTag tagValue(const char * tagstr) - /*@*/; +rpmTag tagValue(const char * tagstr); /** * Canonicalize a rpmTag string. * @param s string * @return canonicalized string */ -/*@only@*/ -char * tagCanonicalize(const char * s) - /*@*/; +char * tagCanonicalize(const char * s); /** * Generate a tag from arbitrary string. * @param s string * @return generated tag value */ -rpmTag tagGenerate(const char * s) - /*@*/; +rpmTag tagGenerate(const char * s); /** * Free memory in header tag indices. * @param _rpmTags header tag indices (NULL uses rpmTags) */ -void tagClean(/*@null@*/ headerTagIndices _rpmTags) - /*@globals rpmTags @*/ - /*@modifies _rpmTags, rpmTags @*/; +void tagClean(headerTagIndices _rpmTags); /** * Destroy tagStore array. @@ -763,9 +711,7 @@ * @param dbiNTags no. of dbi tags * @return NULL always */ -/*@null@*/ -tagStore_t tagStoreFree(/*@only@*//*@null@*/tagStore_t dbiTags, size_t dbiNTags) - /*@modifies dbiTags @*/; +tagStore_t tagStoreFree(tagStore_t dbiTags, size_t dbiNTags); #if defined(_RPMTAG_INTERNAL) /** \ingroup header @@ -784,8 +730,7 @@ * @param av parameter array (or NULL) * @return formatted string */ -typedef /*only@*/ char * (*headerTagFormatFunction) (HE_t he, /*@null@*/ const char ** av) - /*@modifies he @*/; +typedef char * (*headerTagFormatFunction) (HE_t he, const char ** av); /** \ingroup header * HEADER_EXT_FORMAT format function prototype. @@ -795,8 +740,7 @@ * @retval he tag container * @return 0 on success */ -typedef int (*headerTagTagFunction) (Header h, HE_t he) - /*@modifies he @*/; +typedef int (*headerTagTagFunction) (Header h, HE_t he); /** \ingroup header * Define header tag output formats. @@ -804,10 +748,8 @@ #if !defined(SWIG) struct headerSprintfExtension_s { headerSprintfExtensionType type; /*!< Type of extension. */ -/*@observer@*/ /*@null@*/ const char * name; /*!< Name of extension. */ union { -/*@observer@*/ /*@null@*/ void * generic; /*!< Private extension. */ headerTagFormatFunction fmtFunction; /*!< HEADER_EXT_TAG extension. */ headerTagTagFunction tagFunction; /*!< HEADER_EXT_FORMAT extension. */ @@ -820,13 +762,11 @@ /** \ingroup header * Supported default header tag output formats. */ -/*@unchecked@*/ /*@observer@*/ extern headerSprintfExtension headerDefaultFormats; /** \ingroup header * Supported default header extension/tag output formats. */ -/*@unchecked@*/ /*@observer@*/ extern headerSprintfExtension headerCompoundFormats; /** @@ -835,11 +775,9 @@ * @param _rpmTagTable rpm tag table (NULL uses rpmTagTable) * @param _rpmHeaderFormats rpm tag extensions & formats (NULL uses headerCompoundFormats) */ -void rpmDisplayQueryTags(/*@null@*/ FILE * fp, - /*@null@*/ headerTagTableEntry _rpmTagTable, - /*@null@*/ headerSprintfExtension _rpmHeaderFormats) - /*@globals fileSystem, internalState @*/ - /*@modifies *fp, fileSystem, internalState @*/; +void rpmDisplayQueryTags(FILE * fp, + headerTagTableEntry _rpmTagTable, + headerSprintfExtension _rpmHeaderFormats); /** \ingroup header * Return formatted output string from header tags. @@ -852,13 +790,10 @@ * @retval errmsg error message (if any) * @return formatted output string (malloc'ed) */ -/*@only@*/ /*@null@*/ char * headerSprintf(Header h, const char * fmt, - /*@null@*/ headerTagTableEntry tags, - /*@null@*/ headerSprintfExtension exts, - /*@null@*/ /*@out@*/ errmsg_t * errmsg) - /*@globals headerCompoundFormats, fileSystem, internalState @*/ - /*@modifies h, *errmsg, fileSystem, internalState @*/; + headerTagTableEntry tags, + headerSprintfExtension exts, + errmsg_t * errmsg); /** \ingroup header * Retrieve extension or tag value from a header. @@ -868,9 +803,7 @@ * @param flags tag retrieval flags * @return 1 on success, 0 on failure */ -int headerGet(Header h, HE_t he, unsigned int flags) - /*@globals internalState @*/ - /*@modifies he, internalState @*/; +int headerGet(Header h, HE_t he, unsigned int flags); #define HEADERGET_NOEXTENSION (1 << 0) /*!< Extension search disabler. */ #define HEADERGET_NOI18NSTRING (1 << 1) /*!< Return i18n strings as argv. */ #define HEADERGET_SIGHEADER (1 << 2) /*!< Override signature tag data. */ @@ -883,9 +816,7 @@ * @param flags (unused) * @return 1 on success, 0 on failure */ -/*@mayexit@*/ -int headerPut(Header h, HE_t he, /*@unused@*/ unsigned int flags) - /*@modifies h @*/; +int headerPut(Header h, HE_t he, unsigned int flags); /** \ingroup header * Remove tag container from header. @@ -895,9 +826,7 @@ * @param flags (unused) * @return 1 on success, 0 on failure */ -/*@mayexit@*/ -int headerDel(Header h, HE_t he, /*@unused@*/ unsigned int flags) - /*@modifies h @*/; +int headerDel(Header h, HE_t he, unsigned int flags); /** \ingroup header * Modify tag container in header. @@ -907,27 +836,21 @@ * @param flags (unused) * @return 1 on success, 0 on failure */ -int headerMod(Header h, HE_t he, /*@unused@*/ unsigned int flags) - /*@modifies h @*/; +int headerMod(Header h, HE_t he, unsigned int flags); /** \ingroup header * Destroy header tag container iterator. * @param hi header tag container iterator * @return NULL always */ -/*@null@*/ -HeaderIterator headerFini(/*@only@*/ HeaderIterator hi) - /*@globals fileSystem @*/ - /*@modifies hi, fileSystem */; +HeaderIterator headerFini(HeaderIterator hi); /** \ingroup header * Create header tag iterator. * @param h header * @return header tag iterator */ -HeaderIterator headerInit(Header h) - /*@globals fileSystem @*/ - /*@modifies h, fileSystem */; +HeaderIterator headerInit(Header h); /** \ingroup header * Return next tag from header. @@ -936,17 +859,14 @@ * @param flags (unused) * @return 1 on success, 0 on failure */ -int headerNext(HeaderIterator hi, HE_t he, /*@unused@*/ unsigned int flags) - /*@globals internalState @*/ - /*@modifies hi, he, internalState @*/; +int headerNext(HeaderIterator hi, HE_t he, unsigned int flags); /** \ingroup header * Reference a header instance. * @param h header * @return referenced header instance */ -Header headerLink(Header h) - /*@modifies h @*/; +Header headerLink(Header h); #define headerLink(_h) \ ((Header)rpmioLinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__)) @@ -955,9 +875,7 @@ * @param h header * @return NULL on last dereference */ -/*@null@*/ -Header headerUnlink(/*@killref@*/ /*@null@*/ Header h) - /*@modifies h @*/; +Header headerUnlink(Header h); #define headerUnlink(_h) \ ((Header)rpmioUnlinkPoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__)) @@ -966,9 +884,7 @@ * @param h header * @return NULL on last dereference */ -/*@null@*/ -Header headerFree(/*@killref@*/ /*@null@*/ Header h) - /*@modifies h @*/; +Header headerFree(Header h); #define headerFree(_h) \ ((Header)rpmioFreePoolItem((rpmioItem)(_h), __FUNCTION__, __FILE__, __LINE__)) @@ -976,17 +892,14 @@ * Create new (empty) header instance. * @return header */ -Header headerNew(void) - /*@globals fileSystem @*/ - /*@modifies fileSystem @*/; +Header headerNew(void); /** \ingroup header * Return size of on-disk header representation in bytes. * @param h header * @return size of on-disk header */ -size_t headerSizeof(/*@null@*/ Header h) - /*@modifies h @*/; +size_t headerSizeof(Header h); /** \ingroup header * headerUnload. @@ -994,10 +907,7 @@ * @retval *lenp no. bytes in unloaded header blob * @return unloaded header blob (NULL on error) */ -/*@only@*/ /*@null@*/ -void * headerUnload(Header h, /*@out@*/ /*@null@*/ size_t * lenp) - /*@globals internalState @*/ - /*@modifies h, *lenp, internalState @*/; +void * headerUnload(Header h, size_t * lenp); /** \ingroup header * Convert header to on-disk representation, and then reload. @@ -1007,40 +917,28 @@ * @param tag region tag * @return on-disk header (with offsets) */ -/*@null@*/ -Header headerReload(/*@only@*/ Header h, rpmTag tag) - /*@globals fileSystem, internalState @*/ - /*@modifies h, fileSystem, internalState @*/; +Header headerReload(Header h, rpmTag tag); /** \ingroup header * Duplicate a header. * @param h header * @return new header instance */ -/*@null@*/ -Header headerCopy(Header h) - /*@globals fileSystem, internalState @*/ - /*@modifies h, fileSystem, internalState @*/; +Header headerCopy(Header h); /** \ingroup header * Convert header to in-memory representation. * @param uh on-disk header blob (i.e. with offsets) * @return header */ -/*@null@*/ -Header headerLoad(/*@kept@*/ void * uh) - /*@globals fileSystem, internalState @*/ - /*@modifies uh, fileSystem, internalState @*/; +Header headerLoad(void * uh); /** \ingroup header * Make a copy and convert header to in-memory representation. * @param uh on-disk header blob (i.e. with offsets) * @return header */ -/*@null@*/ -Header headerCopyLoad(const void * uh) - /*@globals fileSystem, internalState @*/ - /*@modifies fileSystem, internalState @*/; +Header headerCopyLoad(const void * uh); /** \ingroup header * Check if tag is in header. @@ -1048,8 +946,7 @@ * @param tag tag * @return 1 on success, 0 on failure */ -int headerIsEntry(/*@null@*/ Header h, rpmTag tag) - /*@*/; +int headerIsEntry(Header h, rpmTag tag); #if defined(SUPPORT_I18NSTRING_TYPE) /** \ingroup header @@ -1073,8 +970,7 @@ * @return 1 on success, 0 on failure */ int headerAddI18NString(Header h, rpmTag tag, const char * string, - const char * lang) - /*@modifies h @*/; + const char * lang); #endif /** \ingroup header @@ -1083,9 +979,7 @@ * @param headerTo destination header * @param tagstocopy array of tags that are copied */ -void headerCopyTags(Header headerFrom, Header headerTo, rpmTag * tagstocopy) - /*@globals internalState @*/ - /*@modifies headerTo, internalState @*/; +void headerCopyTags(Header headerFrom, Header headerTo, rpmTag * tagstocopy); /** \ingroup header * Return header magic. @@ -1094,8 +988,7 @@ * @param nmagicp *nmagicp no. bytes of magic * @return 0 always */ -int headerGetMagic(/*@null@*/ Header h, unsigned char **magicp, size_t *nmagicp) - /*@modifies *magicp, *nmagicp @*/; +int headerGetMagic(Header h, unsigned char **magicp, size_t *nmagicp); /** \ingroup header * Store header magic. @@ -1104,18 +997,15 @@ * @param nmagic no. bytes of magic * @return 0 always */ -int headerSetMagic(/*@null@*/ Header h, unsigned char * magic, size_t nmagic) - /*@modifies h @*/; +int headerSetMagic(Header h, unsigned char * magic, size_t nmagic); /** \ingroup header * Return header origin (e.g path or URL). * @param h header * @return header origin */ -/*@observer@*/ /*@null@*/ -const char * headerGetOrigin(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +const char * headerGetOrigin(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store header origin (e.g path or URL). @@ -1123,18 +1013,15 @@ * @param origin new header origin * @return 0 always */ -int headerSetOrigin(/*@null@*/ Header h, const char * origin) - /*@modifies h @*/; +int headerSetOrigin(Header h, const char * origin); /** \ingroup header * Return header parent identifier (e.g parent's NVRA). * @param h header * @return header parent */ -/*@observer@*/ /*@null@*/ -const char * headerGetParent(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +const char * headerGetParent(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store header parent (e.g parent's NVRA). @@ -1142,18 +1029,15 @@ * @param parent new header parent * @return 0 always */ -int headerSetParent(/*@null@*/ Header h, const char * parent) - /*@modifies h @*/; +int headerSetParent(Header h, const char * parent); /** \ingroup header * Return header base URL (e.g path or URL). * @param h header * @return header origin */ -/*@observer@*/ /*@null@*/ -const char * headerGetBaseURL(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +const char * headerGetBaseURL(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store header base URL (e.g path or URL). @@ -1161,17 +1045,16 @@ * @param baseurl new header baseurl * @return 0 always */ -int headerSetBaseURL(/*@null@*/ Header h, const char * baseurl) - /*@modifies h @*/; +int headerSetBaseURL(Header h, const char * baseurl); /** \ingroup header * Return header stat(2) buffer (of origin *.rpm file). * @param h header * @return header stat(2) buffer */ -struct stat * headerGetStatbuf(/*@null@*/ Header h) - RPM_GNUC_CONST - /*@*/; +struct stat; +struct stat * headerGetStatbuf(Header h) + RPM_GNUC_CONST; /** \ingroup header * Copy into header stat(2) buffer (of origin *.rpm file). @@ -1179,18 +1062,15 @@ * @param st new header stat(2) buffer * @return 0 always */ -int headerSetStatbuf(/*@null@*/ Header h, struct stat * st) - /*@modifies h @*/; +int headerSetStatbuf(Header h, struct stat * st); /** \ingroup header * Return digest of origin *.rpm file. * @param h header * @return header digest */ -/*@null@*/ -const char * headerGetDigest(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +const char * headerGetDigest(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store digest of origin *.rpm file. @@ -1198,18 +1078,15 @@ * @param digest new header digest * @return 0 always */ -int headerSetDigest(/*@null@*/ Header h, const char * digest) - /*@modifies h @*/; +int headerSetDigest(Header h, const char * digest); /** \ingroup header * Return rpmdb pointer. * @param h header * @return rpmdb pointer */ -/*@null@*/ -void * headerGetRpmdb(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +void * headerGetRpmdb(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store rpmdb pointer. @@ -1217,18 +1094,15 @@ * @param rpmdb new rpmdb pointer (or NULL to unset) * @return NULL always */ -/*@null@*/ -void * headerSetRpmdb(/*@null@*/ Header h, /*@null@*/ void * rpmdb) - /*@modifies h @*/; +void * headerSetRpmdb(Header h, void * rpmdb); /** \ingroup header * Return header instance (if from rpmdb). * @param h header * @return header instance */ -uint32_t headerGetInstance(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +uint32_t headerGetInstance(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store header instance (e.g path or URL). @@ -1236,17 +1110,15 @@ * @param instance new header instance * @return 0 always */ -uint32_t headerSetInstance(/*@null@*/ Header h, uint32_t instance) - /*@modifies h @*/; +uint32_t headerSetInstance(Header h, uint32_t instance); /** \ingroup header * Return header starting byte offset. * @param h header * @return header starting byte offset */ -rpmuint32_t headerGetStartOff(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +rpmuint32_t headerGetStartOff(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store header starting byte offset. @@ -1254,17 +1126,15 @@ * @param startoff new header starting byte offset * @return 0 always */ -rpmuint32_t headerSetStartOff(/*@null@*/ Header h, rpmuint32_t startoff) - /*@modifies h @*/; +rpmuint32_t headerSetStartOff(Header h, rpmuint32_t startoff); /** \ingroup header * Return header ending byte offset. * @param h header * @return header ending byte offset */ -rpmuint32_t headerGetEndOff(/*@null@*/ Header h) - RPM_GNUC_PURE - /*@*/; +rpmuint32_t headerGetEndOff(Header h) + RPM_GNUC_PURE; /** \ingroup header * Store header ending byte offset. @@ -1272,8 +1142,7 @@ * @param endoff new header ending byte offset * @return 0 always */ -rpmuint32_t headerSetEndOff(/*@null@*/ Header h, rpmuint32_t endoff) - /*@modifies h @*/; +rpmuint32_t headerSetEndOff(Header h, rpmuint32_t endoff); /** \ingroup header * Return header stats accumulator structure. @@ -1281,28 +1150,22 @@ * @param opx per-header accumulator index (aka rpmtsOpX) * @return per-header accumulator pointer */ -/*@null@*/ void * headerGetStats(Header h, int opx) - RPM_GNUC_PURE - /*@*/; + RPM_GNUC_PURE; /** * Define per-header macros. * @param h header * @return 0 always */ -int headerMacrosLoad(Header h) - /*@globals internalState @*/ - /*@modifies internalState @*/; +int headerMacrosLoad(Header h); /** * Define per-header macros. * @param h header * @return 0 always */ -int headerMacrosUnload(Header h) - /*@globals internalState @*/ - /*@modifies internalState @*/; +int headerMacrosUnload(Header h); /** \ingroup header * Return name, epoch, version, release, arch strings from header. @@ -1315,22 +1178,18 @@ * @return 0 always */ int headerNEVRA(Header h, - /*@null@*/ /*@out@*/ const char ** np, - /*@null@*/ /*@out@*/ /*@unused@*/ const char ** ep, - /*@null@*/ /*@out@*/ const char ** vp, - /*@null@*/ /*@out@*/ const char ** rp, - /*@null@*/ /*@out@*/ const char ** ap) - /*@globals internalState @*/ - /*@modifies h, *np, *vp, *rp, *ap, internalState @*/; + const char ** np, + const char ** ep, + const char ** vp, + const char ** rp, + const char ** ap); /** * Return header color. * @param h header * @return header color */ -rpmuint32_t hGetColor(Header h) - /*@globals internalState @*/ - /*@modifies h, internalState @*/; +rpmuint32_t hGetColor(Header h); /** \ingroup header * Translate and merge legacy signature tags into header. @@ -1338,9 +1197,7 @@ * @param h header * @param sigh signature header */ -void headerMergeLegacySigs(Header h, const Header sigh) - /*@globals fileSystem, internalState @*/ - /*@modifies h, sigh, fileSystem, internalState @*/; +void headerMergeLegacySigs(Header h, const Header sigh); /** \ingroup header * Regenerate signature header. @@ -1349,9 +1206,7 @@ * @param noArchiveSize don't copy archive size tag (pre rpm-4.1) * @return regenerated signature header */ -Header headerRegenSigHeader(const Header h, int noArchiveSize) - /*@globals fileSystem, internalState @*/ - /*@modifies h, fileSystem, internalState @*/; +Header headerRegenSigHeader(const Header h, int noArchiveSize); #ifdef __cplusplus } @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/rpmtypes.h ============================================================================ $ cvs diff -u -r1.6.2.1 -r1.6.2.2 rpmtypes.h --- rpm/rpmdb/rpmtypes.h 3 May 2011 15:58:19 -0000 1.6.2.1 +++ rpm/rpmdb/rpmtypes.h 25 Jun 2016 08:32:00 -0000 1.6.2.2 @@ -11,21 +11,21 @@ * sets to reduce errors. In general, installs/upgrades are done before * strict removals, and prerequisite ordering is done on installs/upgrades. */ -typedef /*@abstract@*/ /*@refcounted@*/ struct rpmts_s * rpmts; +typedef struct rpmts_s * rpmts; /** \ingroup rpmts * An added/available package retrieval key. */ -typedef /*@abstract@*/ void * alKey; +typedef void * alKey; /** \ingroup rpmbuild */ -typedef /*@abstract@*/ /*@refcounted@*/ struct Spec_s * Spec; +typedef struct Spec_s * Spec; /** \ingroup rpmds * Dependency tag sets from a header, so that a header can be discarded early. */ -typedef /*@abstract@*/ /*@refcounted@*/ struct rpmds_s * rpmds; +typedef struct rpmds_s * rpmds; /** \ingroup rpmds * Container for commonly extracted dependency set(s). @@ -35,22 +35,22 @@ /** \ingroup rpmte * An element of a transaction set, i.e. a TR_ADDED or TR_REMOVED package. */ -typedef /*@abstract@*/ struct rpmte_s * rpmte; +typedef struct rpmte_s * rpmte; /** \ingroup rpmdb * Database of headers and tag value indices. */ -typedef /*@abstract@*/ /*@refcounted@*/ struct rpmdb_s * rpmdb; +typedef struct rpmdb_s * rpmdb; /** \ingroup rpmdb * Database iterator. */ -typedef /*@abstract@*/ struct rpmmi_s * rpmmi; +typedef struct rpmmi_s * rpmmi; /** \ingroup rpmgi * Generalized iterator. */ -typedef /*@abstract@*/ /*@refcounted@*/ struct rpmgi_s * rpmgi; +typedef struct rpmgi_s * rpmgi; /** */ @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/scanner.l ============================================================================ $ cvs diff -u -r1.1.2.3 -r1.1.2.4 scanner.l --- rpm/rpmdb/scanner.l 11 Jun 2015 02:22:55 -0000 1.1.2.3 +++ rpm/rpmdb/scanner.l 25 Jun 2016 08:32:00 -0000 1.1.2.4 @@ -13,7 +13,7 @@ %option noyyget_lval %{ - #include <rpmutil.h> + #include <rpmdefs.h> #include "json.h" #include "Jgrammar.h" @@ . patch -p0 <<'@@ .' Index: rpm/rpmdb/signature.c ============================================================================ $ cvs diff -u -r1.68.2.16 -r1.68.2.17 signature.c --- rpm/rpmdb/signature.c 10 Apr 2016 22:03:54 -0000 1.68.2.16 +++ rpm/rpmdb/signature.c 25 Jun 2016 08:32:00 -0000 1.68.2.17 @@ -13,6 +13,7 @@ #include <rpmhkp.h> #include <rpmku.h> #include <argv.h> +#include <popt.h> #include <rpmtag.h> #include "rpmdb.h" @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org