diff --git a/python/header-py.c b/python/header-py.c index 2c42ba823..96fb82f28 100644 --- a/python/header-py.c +++ b/python/header-py.c @@ -131,7 +131,6 @@ /** \ingroup python * \name Class: rpm.hdr */ -/*@{*/ /** \ingroup py_c */ @@ -148,8 +147,7 @@ struct hdrObject_s { unsigned short * modes; } ; -/*@unused@*/ static inline Header headerAllocated(Header h) - /*@modifies h @*/ +static inline Header headerAllocated(Header h) { h->flags |= HEADERFLAG_ALLOCATED; return 0; @@ -158,7 +156,6 @@ struct hdrObject_s { /** \ingroup py_c */ static PyObject * hdrKeyList(hdrObject * s) - /*@*/ { PyObject * list, *o; HeaderIterator hi; @@ -190,7 +187,6 @@ static PyObject * hdrKeyList(hdrObject * s) /** \ingroup py_c */ static PyObject * hdrUnload(hdrObject * s, PyObject * args, PyObject *keywords) - /*@*/ { char * buf; PyObject * rc; @@ -225,7 +221,6 @@ static PyObject * hdrUnload(hdrObject * s, PyObject * args, PyObject *keywords) /** \ingroup py_c */ static PyObject * hdrExpandFilelist(hdrObject * s) - /*@*/ { expandFilelist (s->h); @@ -236,7 +231,6 @@ static PyObject * hdrExpandFilelist(hdrObject * s) /** \ingroup py_c */ static PyObject * hdrCompressFilelist(hdrObject * s) - /*@*/ { compressFilelist (s->h); @@ -248,7 +242,6 @@ static PyObject * hdrCompressFilelist(hdrObject * s) /** \ingroup py_c */ static void mungeFilelist(Header h) - /*@*/ { const char ** fileNames = NULL; int count = 0; @@ -273,7 +266,6 @@ static void mungeFilelist(Header h) /** \ingroup py_c */ static PyObject * hdrFullFilelist(hdrObject * s) - /*@*/ { mungeFilelist (s->h); @@ -284,7 +276,6 @@ static PyObject * hdrFullFilelist(hdrObject * s) /** \ingroup py_c */ static PyObject * hdrSprintf(hdrObject * s, PyObject * args, PyObject * kwds) - /*@*/ { char * fmt; char * r; @@ -310,7 +301,6 @@ static PyObject * hdrSprintf(hdrObject * s, PyObject * args, PyObject * kwds) /** */ static int hdr_compare(hdrObject * a, hdrObject * b) - /*@*/ { return rpmVersionCompare(a->h, b->h); } @@ -322,7 +312,6 @@ static long hdr_hash(PyObject * h) /** \ingroup py_c */ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef hdr_methods[] = { {"keys", (PyCFunction) hdrKeyList, METH_NOARGS, NULL }, @@ -350,7 +339,6 @@ static struct PyMethodDef hdr_methods[] = { /** \ingroup py_c */ static void hdr_dealloc(hdrObject * s) - /*@*/ { if (s->h) headerFree(s->h); s->md5list = _free(s->md5list); @@ -377,7 +365,6 @@ long tagNumFromPyObject (PyObject *item) /** \ingroup py_c */ static PyObject * hdr_subscript(hdrObject * s, PyObject * item) - /*@*/ { int tagtype, type, count, i, tag = -1; void * data; @@ -545,7 +532,6 @@ static int hdr_setattro(PyObject * o, PyObject * n, PyObject * v) /** \ingroup py_c */ -/*@unchecked@*/ /*@observer@*/ static PyMappingMethods hdr_as_mapping = { (lenfunc) 0, /* mp_length */ (binaryfunc) hdr_subscript, /* mp_subscript */ @@ -559,7 +545,6 @@ static char hdr_doc[] = /** \ingroup py_c */ -/*@unchecked@*/ /*@observer@*/ PyTypeObject hdr_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -930,4 +915,3 @@ PyObject * labelCompare (PyObject * self, PyObject * args) return Py_BuildValue("i", rc); } -/*@}*/ diff --git a/python/header-py.h b/python/header-py.h index 20aa8b1a0..64587990f 100644 --- a/python/header-py.h +++ b/python/header-py.h @@ -11,7 +11,6 @@ */ typedef struct hdrObject_s hdrObject; -/*@unchecked@*/ extern PyTypeObject hdr_Type; /** \ingroup py_c @@ -19,31 +18,31 @@ extern PyTypeObject hdr_Type; extern PyObject * pyrpmError; hdrObject * hdr_Wrap(Header h) - /*@*/; + ; Header hdrGetHeader(hdrObject * h) - /*@*/; + ; long tagNumFromPyObject (PyObject *item) - /*@*/; + ; PyObject * labelCompare (PyObject * self, PyObject * args) - /*@*/; + ; PyObject * versionCompare (PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; + ; PyObject * rpmMergeHeadersFromFD(PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; + ; int rpmMergeHeaders(PyObject * list, FD_t fd, int matchTag) - /*@*/; + ; PyObject * rpmHeaderFromFile(PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; + ; PyObject * rpmHeaderFromFD(PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; + ; PyObject * rpmSingleHeaderFromFD(PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; + ; PyObject * rpmReadHeaders (FD_t fd) - /*@*/; + ; PyObject * hdrLoad(PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; + ; #endif diff --git a/python/rpmal-py.c b/python/rpmal-py.c index ddb9d8ac1..0eafd841b 100644 --- a/python/rpmal-py.c +++ b/python/rpmal-py.c @@ -12,11 +12,8 @@ #include "debug.h" -/*@null@*/ static PyObject * -rpmal_Debug(/*@unused@*/ rpmalObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmal_Debug(rpmalObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -27,10 +24,8 @@ rpmal_Debug(/*@unused@*/ rpmalObject * s, PyObject * args, PyObject * kwds) return Py_None; } -/*@null@*/ static PyObject * rpmal_Add(rpmalObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { rpmdsObject * dso; rpmfiObject * fio; @@ -49,11 +44,8 @@ rpmal_Add(rpmalObject * s, PyObject * args, PyObject * kwds) return Py_BuildValue("i", pkgKey); } -/*@null@*/ static PyObject * rpmal_Del(rpmalObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { alKey pkgKey; char * kwlist[] = {"key", NULL}; @@ -67,11 +59,8 @@ rpmal_Del(rpmalObject * s, PyObject * args, PyObject * kwds) return Py_None; } -/*@null@*/ static PyObject * rpmal_AddProvides(rpmalObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { rpmdsObject * dso; alKey pkgKey; @@ -90,11 +79,8 @@ rpmal_AddProvides(rpmalObject * s, PyObject * args, PyObject * kwds) return Py_None; } -/*@null@*/ static PyObject * rpmal_MakeIndex(rpmalObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { rpmalMakeIndex(s->al); @@ -102,8 +88,6 @@ rpmal_MakeIndex(rpmalObject * s) return Py_None; } -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmal_methods[] = { {"Debug", (PyCFunction)rpmal_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, @@ -117,13 +101,11 @@ static struct PyMethodDef rpmal_methods[] = { NULL}, {NULL, NULL } /* sentinel */ }; -/*@=fullinitblock@*/ /* ---------- */ static void rpmal_dealloc(rpmalObject * s) - /*@modifies s @*/ { if (s) { s->al = rpmalFree(s->al); @@ -132,25 +114,20 @@ rpmal_dealloc(rpmalObject * s) } static PyObject * rpmal_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } static int rpmal_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { return PyObject_GenericSetAttr(o, n, v); } /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmal_doc[] = ""; -/*@-fullinitblock@*/ -/*@unchecked@*/ PyTypeObject rpmal_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -197,7 +174,6 @@ PyTypeObject rpmal_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ /* ---------- */ diff --git a/python/rpmal-py.h b/python/rpmal-py.h index d8aa09c99..cbbe0d463 100644 --- a/python/rpmal-py.h +++ b/python/rpmal-py.h @@ -13,11 +13,9 @@ typedef struct rpmalObject_s { rpmal al; } rpmalObject; -/*@unchecked@*/ extern PyTypeObject rpmal_Type; -/*@null@*/ rpmalObject * rpmal_Wrap(rpmal al) - /*@*/; + ; #endif diff --git a/python/rpmbc-py.h b/python/rpmbc-py.h index b75409326..b0d1c384b 100644 --- a/python/rpmbc-py.h +++ b/python/rpmbc-py.h @@ -16,7 +16,6 @@ typedef struct rpmbcObject_s { /** */ -/*@unchecked@*/ extern PyTypeObject rpmbc_Type; #endif diff --git a/python/rpmdb-py.c b/python/rpmdb-py.c index b21c94ee5..026d319c6 100644 --- a/python/rpmdb-py.c +++ b/python/rpmdb-py.c @@ -12,7 +12,6 @@ #include "debug.h" -/*@access Header @*/ /** \ingroup python * \class Rpmdb @@ -101,15 +100,11 @@ /** \ingroup python * \name Class: rpm.db */ -/*@{*/ /** */ -/*@null@*/ static rpmmiObject * rpmdb_Match (rpmdbObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { PyObject *TagN = NULL; char *key = NULL; @@ -131,22 +126,17 @@ rpmdb_Match (rpmdbObject * s, PyObject * args, PyObject * kwds) /** */ -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmdb_methods[] = { {"match", (PyCFunction) rpmdb_Match, METH_VARARGS|METH_KEYWORDS, "db.match([TagN, [key, [len]]]) -> mi\n\ - Create an rpm db match iterator.\n" }, {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /** */ static int rpmdb_length(rpmdbObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { rpmdbMatchIterator mi; int count = 0; @@ -161,11 +151,8 @@ rpmdb_length(rpmdbObject * s) /** */ -/*@null@*/ static hdrObject * rpmdb_subscript(rpmdbObject * s, PyObject * key) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { int offset; hdrObject * ho; @@ -194,7 +181,6 @@ rpmdb_subscript(rpmdbObject * s, PyObject * key) /** */ -/*@unchecked@*/ /*@observer@*/ static PyMappingMethods rpmdb_as_mapping = { (lenfunc) rpmdb_length, /* mp_length */ (binaryfunc) rpmdb_subscript, /* mp_subscript */ @@ -204,7 +190,6 @@ static PyMappingMethods rpmdb_as_mapping = { /** */ static void rpmdb_dealloc(rpmdbObject * s) - /*@modifies s @*/ { if (s->db != NULL) rpmdbClose(s->db); @@ -212,26 +197,22 @@ static void rpmdb_dealloc(rpmdbObject * s) } static PyObject * rpmdb_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } static int rpmdb_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { return PyObject_GenericSetAttr(o, n, v); } /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmdb_doc[] = ""; /** */ -/*@-fullinitblock@*/ PyTypeObject rpmdb_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -277,7 +258,6 @@ PyTypeObject rpmdb_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ #ifdef _LEGACY_BINDINGS_TOO rpmdb dbFromDb(rpmdbObject * db) @@ -288,7 +268,7 @@ rpmdb dbFromDb(rpmdbObject * db) /** */ rpmdbObject * -rpmOpenDB(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) { +rpmOpenDB(PyObject * self, PyObject * args, PyObject * kwds) { rpmdbObject * o; char * root = ""; int forWrite = 0; @@ -310,9 +290,7 @@ rpmOpenDB(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) { /* PyErr_SetString should take varargs... */ errsize = strlen(errmsg) + *root == '\0' ? 15 /* "/var/lib/rpm" */ : strlen(root); errstr = alloca(errsize); -/*@-formatconst@*/ snprintf(errstr, errsize, errmsg, *root == '\0' ? "/var/lib/rpm" : root); -/*@=formatconst@*/ PyErr_SetString(pyrpmError, errstr); return NULL; } @@ -324,7 +302,7 @@ rpmOpenDB(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) { * @todo Permit header checks when doing --rebuilddb. */ PyObject * -rebuildDB (/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) +rebuildDB (PyObject * self, PyObject * args, PyObject * kwds) { char * rootDir = ""; char * kwlist[] = {"rootdir", NULL}; @@ -336,4 +314,3 @@ rebuildDB (/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) } #endif -/*@}*/ diff --git a/python/rpmdb-py.h b/python/rpmdb-py.h index 062ad8310..37d5db699 100644 --- a/python/rpmdb-py.h +++ b/python/rpmdb-py.h @@ -22,18 +22,15 @@ struct rpmdbObject_s { int *offsets; } ; -/*@unchecked@*/ extern PyTypeObject rpmdb_Type; #ifdef _LEGACY_BINDINGS_TOO rpmdb dbFromDb(rpmdbObject * db) - /*@*/; + ; rpmdbObject * rpmOpenDB(PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; -PyObject * rebuildDB (PyObject * self, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies rpmGlobalMacroContext @*/; + ; +PyObject * rebuildDB (PyObject * self, PyObject * args, PyObject * kwds); #endif #endif diff --git a/python/rpmdebug-py.c b/python/rpmdebug-py.c index 8a7810791..dfe9356f3 100644 --- a/python/rpmdebug-py.c +++ b/python/rpmdebug-py.c @@ -1,9 +1,6 @@ -/*@unchecked@*/ extern PyTypeObject PyCode_Type; -/*@unchecked@*/ extern PyTypeObject PyDictIter_Type; -/*@unchecked@*/ extern PyTypeObject PyFrame_Type; #include "header-py.h" /* XXX debug only */ @@ -20,9 +17,7 @@ extern PyTypeObject PyFrame_Type; /** */ -/*@observer@*/ static const char * lbl(void * s) - /*@*/ { PyObject * o = s; diff --git a/python/rpmds-py.c b/python/rpmds-py.c index 81afab35e..ed7c4c46c 100644 --- a/python/rpmds-py.c +++ b/python/rpmds-py.c @@ -11,7 +11,6 @@ #include "debug.h" -/*@access rpmds @*/ /** * Split EVR into epoch, version, and release components. @@ -22,11 +21,9 @@ */ static void rpmds_ParseEVR(char * evr, - /*@exposed@*/ /*@out@*/ const char ** ep, - /*@exposed@*/ /*@out@*/ const char ** vp, - /*@exposed@*/ /*@out@*/ const char ** rp) - /*@modifies *ep, *vp, *rp @*/ - /*@requires maxSet(ep) >= 0 /\ maxSet(vp) >= 0 /\ maxSet(rp) >= 0 @*/ + const char ** ep, + const char ** vp, + const char ** rp) { const char *epoch; const char *version; /* assume only version is present */ @@ -41,17 +38,13 @@ void rpmds_ParseEVR(char * evr, epoch = evr; *s++ = '\0'; version = s; - /*@-branchstate@*/ if (*epoch == '\0') epoch = "0"; - /*@=branchstate@*/ } else { epoch = NULL; /* XXX disable epoch compare if missing */ version = evr; } if (se) { -/*@-boundswrite@*/ *se++ = '\0'; -/*@=boundswrite@*/ release = se; } else { release = NULL; @@ -62,11 +55,8 @@ void rpmds_ParseEVR(char * evr, if (rp) *rp = release; } -/*@null@*/ static PyObject * -rpmds_Debug(/*@unused@*/ rpmdsObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmds_Debug(rpmdsObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -77,82 +67,62 @@ rpmds_Debug(/*@unused@*/ rpmdsObject * s, PyObject * args, PyObject * kwds) return Py_None; } -/*@null@*/ static PyObject * rpmds_Count(rpmdsObject * s) - /*@*/ { return Py_BuildValue("i", rpmdsCount(s->ds)); } -/*@null@*/ static PyObject * rpmds_Ix(rpmdsObject * s) - /*@*/ { return Py_BuildValue("i", rpmdsIx(s->ds)); } -/*@null@*/ static PyObject * rpmds_DNEVR(rpmdsObject * s) - /*@*/ { return Py_BuildValue("s", rpmdsDNEVR(s->ds)); } -/*@null@*/ static PyObject * rpmds_N(rpmdsObject * s) - /*@*/ { return Py_BuildValue("s", rpmdsN(s->ds)); } -/*@null@*/ static PyObject * rpmds_EVR(rpmdsObject * s) - /*@*/ { return Py_BuildValue("s", rpmdsEVR(s->ds)); } -/*@null@*/ static PyObject * rpmds_Flags(rpmdsObject * s) - /*@*/ { return Py_BuildValue("i", rpmdsFlags(s->ds)); } -/*@null@*/ static PyObject * rpmds_BT(rpmdsObject * s) - /*@*/ { return Py_BuildValue("i", (int) rpmdsBT(s->ds)); } -/*@null@*/ static PyObject * rpmds_TagN(rpmdsObject * s) - /*@*/ { return Py_BuildValue("i", rpmdsTagN(s->ds)); } -/*@null@*/ static PyObject * rpmds_Color(rpmdsObject * s) - /*@*/ { return Py_BuildValue("i", rpmdsColor(s->ds)); } -/*@null@*/ static PyObject * rpmds_Refs(rpmdsObject * s) - /*@*/ { return Py_BuildValue("i", rpmdsRefs(s->ds)); } @@ -172,7 +142,6 @@ static int compare_values(const char *str1, const char *str2) static int rpmds_compare(rpmdsObject * a, rpmdsObject * b) - /*@*/ { char *aEVR = xstrdup(rpmdsEVR(a->ds)); const char *aE, *aV, *aR; @@ -199,7 +168,6 @@ rpmds_compare(rpmdsObject * a, rpmdsObject * b) static PyObject * rpmds_richcompare(rpmdsObject * a, rpmdsObject * b, int op) - /*@*/ { int rc; @@ -214,7 +182,6 @@ rpmds_richcompare(rpmdsObject * a, rpmdsObject * b, int op) case Py_GT: case Py_GE: case Py_EQ: - /*@fallthrough@*/ default: rc = -1; break; @@ -224,16 +191,13 @@ rpmds_richcompare(rpmdsObject * a, rpmdsObject * b, int op) static PyObject * rpmds_iter(rpmdsObject * s) - /*@*/ { Py_INCREF(s); return (PyObject *)s; } -/*@null@*/ static PyObject * rpmds_iternext(rpmdsObject * s) - /*@modifies s @*/ { PyObject * result = NULL; @@ -250,10 +214,8 @@ rpmds_iternext(rpmdsObject * s) int tagN = rpmdsTagN(s->ds); int Flags = rpmdsFlags(s->ds); -/*@-branchstate@*/ if (N != NULL) N = xstrdup(N); if (EVR != NULL) EVR = xstrdup(EVR); -/*@=branchstate@*/ result = (PyObject *) rpmds_Wrap( rpmdsSingle(tagN, N, EVR, Flags) ); } else s->active = 0; @@ -261,11 +223,8 @@ rpmds_iternext(rpmdsObject * s) return result; } -/*@null@*/ static PyObject * rpmds_Next(rpmdsObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { PyObject * result; @@ -278,10 +237,8 @@ rpmds_Next(rpmdsObject * s) return result; } -/*@null@*/ static PyObject * rpmds_SetNoPromote(rpmdsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { int nopromote; char * kwlist[] = {"noPromote", NULL}; @@ -293,11 +250,8 @@ rpmds_SetNoPromote(rpmdsObject * s, PyObject * args, PyObject * kwds) return Py_BuildValue("i", rpmdsSetNoPromote(s->ds, nopromote)); } -/*@null@*/ static PyObject * rpmds_Notify(rpmdsObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ { const char * where; int rc; @@ -313,21 +267,16 @@ rpmds_Notify(rpmdsObject * s, PyObject * args, PyObject * kwds) } /* XXX rpmdsFind uses bsearch on s->ds, so a sort is needed. */ -/*@null@*/ static PyObject * rpmds_Sort(rpmdsObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ { /* XXX sort on (N,EVR,F) here. */ Py_INCREF(Py_None); return Py_None; } -/*@null@*/ static PyObject * rpmds_Find(rpmdsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { PyObject * to = NULL; rpmdsObject * o; @@ -347,10 +296,8 @@ rpmds_Find(rpmdsObject * s, PyObject * args, PyObject * kwds) return Py_BuildValue("i", rc); } -/*@null@*/ static PyObject * rpmds_Merge(rpmdsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { PyObject * to = NULL; rpmdsObject * o; @@ -367,7 +314,6 @@ rpmds_Merge(rpmdsObject * s, PyObject * args, PyObject * kwds) #ifdef NOTYET static PyObject * rpmds_Compare(rpmdsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { PyObject * to = NULL; rpmdsObject * o; @@ -381,10 +327,8 @@ rpmds_Compare(rpmdsObject * s, PyObject * args, PyObject * kwds) return Py_BuildValue("i", rpmdsCompare(s->ds, o->ds)); } -/*@null@*/ static PyObject * rpmds_Problem(rpmdsObject * s) - /*@*/ { if (!PyArg_ParseTuple(args, ":Problem")) return NULL; @@ -393,8 +337,6 @@ rpmds_Problem(rpmdsObject * s) } #endif -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmds_methods[] = { {"Debug", (PyCFunction)rpmds_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, @@ -439,13 +381,11 @@ static struct PyMethodDef rpmds_methods[] = { #endif {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /* ---------- */ static void rpmds_dealloc(rpmdsObject * s) - /*@modifies s @*/ { if (s) { s->ds = rpmdsFree(s->ds); @@ -454,9 +394,7 @@ rpmds_dealloc(rpmdsObject * s) } static int -rpmds_print(rpmdsObject * s, FILE * fp, /*@unused@*/ int flags) - /*@globals fileSystem @*/ - /*@modifies s, fp, fileSystem @*/ +rpmds_print(rpmdsObject * s, FILE * fp, int flags) { if (!(s && s->ds)) return -1; @@ -468,28 +406,23 @@ rpmds_print(rpmdsObject * s, FILE * fp, /*@unused@*/ int flags) } static PyObject * rpmds_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } static int rpmds_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { return PyObject_GenericSetAttr(o, n, v); } static int rpmds_length(rpmdsObject * s) - /*@*/ { return rpmdsCount(s->ds); } -/*@null@*/ static PyObject * rpmds_subscript(rpmdsObject * s, PyObject * key) - /*@modifies s @*/ { int ix; @@ -514,8 +447,6 @@ static PyMappingMethods rpmds_as_mapping = { /** \ingroup py_c */ static int rpmds_init(rpmdsObject * s, PyObject *args, PyObject *kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { hdrObject * ho = NULL; PyObject * to = NULL; @@ -545,8 +476,7 @@ fprintf(stderr, "*** rpmds_init(%p,%p,%p)\n", s, args, kwds); /** \ingroup py_c */ -static void rpmds_free(/*@only@*/ rpmdsObject * s) - /*@modifies s @*/ +static void rpmds_free(rpmdsObject * s) { if (_rpmds_debug) fprintf(stderr, "%p -- ds %p\n", s, s->ds); @@ -558,7 +488,6 @@ fprintf(stderr, "%p -- ds %p\n", s, s->ds); /** \ingroup py_c */ static PyObject * rpmds_alloc(PyTypeObject * subtype, int nitems) - /*@*/ { PyObject * s = PyType_GenericAlloc(subtype, nitems); @@ -569,10 +498,7 @@ fprintf(stderr, "*** rpmds_alloc(%p,%d) ret %p\n", subtype, nitems, s); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmds_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies rpmGlobalMacroContext @*/ { rpmdsObject * s = (void *) PyObject_New(rpmdsObject, subtype); @@ -590,11 +516,9 @@ fprintf(stderr, "%p ++ ds %p\n", s, s->ds); /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmds_doc[] = ""; -/*@-fullinitblock@*/ PyTypeObject rpmds_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -642,7 +566,6 @@ PyTypeObject rpmds_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ /* ---------- */ @@ -664,7 +587,7 @@ rpmds_Wrap(rpmds ds) } rpmdsObject * -rpmds_Single(/*@unused@*/ PyObject * s, PyObject * args, PyObject * kwds) +rpmds_Single(PyObject * s, PyObject * args, PyObject * kwds) { PyObject * to = NULL; int tagN = RPMTAG_PROVIDENAME; diff --git a/python/rpmds-py.h b/python/rpmds-py.h index 8edbd01df..16403e156 100644 --- a/python/rpmds-py.h +++ b/python/rpmds-py.h @@ -13,43 +13,36 @@ typedef struct rpmdsObject_s { PyObject_HEAD PyObject *md_dict; /*!< to look like PyModuleObject */ int active; -/*@null@*/ rpmds ds; } rpmdsObject; /** */ -/*@unchecked@*/ extern PyTypeObject rpmds_Type; /** */ -/*@null@*/ rpmds dsFromDs(rpmdsObject * ds) - /*@*/; + ; /** */ -/*@null@*/ rpmdsObject * rpmds_Wrap(rpmds ds) - /*@*/; + ; /** */ -/*@null@*/ rpmdsObject * rpmds_Single(PyObject * s, PyObject * args, PyObject * kwds) - /*@*/; + ; /** */ -/*@null@*/ rpmdsObject * hdr_dsFromHeader(PyObject * s, PyObject * args, PyObject * kwds) - /*@*/; + ; /** */ -/*@null@*/ rpmdsObject * hdr_dsOfHeader(PyObject * s) - /*@*/; + ; #endif diff --git a/python/rpmfd-py.c b/python/rpmfd-py.c index 1f2f6c5ef..079da735c 100644 --- a/python/rpmfd-py.c +++ b/python/rpmfd-py.c @@ -15,9 +15,7 @@ #include "debug.h" -/*@access FD_t @*/ -/*@unchecked@*/ static int _rpmfd_debug = 1; /** \ingroup python @@ -26,11 +24,8 @@ static int _rpmfd_debug = 1; * \brief An python rpm.fd object represents an rpm I/O handle. */ -/*@null@*/ static PyObject * -rpmfd_Debug(/*@unused@*/ rpmfdObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmfd_Debug(rpmfdObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -65,8 +60,6 @@ static FDlist *fdtail = NULL; /** */ static int closeCallback(FILE * f) - /*@globals fdhead @*/ - /*@modifies fdhead @*/ { FDlist *node, *last; @@ -78,7 +71,6 @@ static int closeCallback(FILE * f) last = node; node = node->next; } -/*@-branchstate@*/ if (node) { if (last) last->next = node->next; @@ -91,17 +83,13 @@ static int closeCallback(FILE * f) node->fd = fdFree(node->fd, "closeCallback"); node = _free (node); } -/*@=branchstate@*/ return 0; } /** */ -/*@null@*/ static PyObject * -rpmfd_Fopen(/*@unused@*/ PyObject * s, PyObject * args, PyObject * kwds) - /*@globals fdhead, fdtail @*/ - /*@modifies fdhead, fdtail @*/ +rpmfd_Fopen(PyObject * s, PyObject * args, PyObject * kwds) { char * path; char * mode = "r.ufdio"; @@ -139,7 +127,6 @@ rpmfd_Fopen(/*@unused@*/ PyObject * s, PyObject * args, PyObject * kwds) } node->next = NULL; -/*@-branchstate@*/ if (!fdhead) { fdhead = fdtail = node; } else if (fdtail) { @@ -147,7 +134,6 @@ rpmfd_Fopen(/*@unused@*/ PyObject * s, PyObject * args, PyObject * kwds) } else { fdhead = node; } -/*@=branchstate@*/ fdtail = node; return PyFile_FromFile (node->f, path, mode, closeCallback); @@ -155,8 +141,6 @@ rpmfd_Fopen(/*@unused@*/ PyObject * s, PyObject * args, PyObject * kwds) /** \ingroup py_c */ -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmfd_methods[] = { {"Debug", (PyCFunction)rpmfd_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, @@ -164,15 +148,13 @@ static struct PyMethodDef rpmfd_methods[] = { NULL}, {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /* ---------- */ /** \ingroup py_c */ static void -rpmfd_dealloc(/*@only@*/ /*@null@*/ rpmfdObject * s) - /*@modifies s @*/ +rpmfd_dealloc(rpmfdObject * s) { if (s) { Fclose(s->fd); @@ -182,13 +164,11 @@ rpmfd_dealloc(/*@only@*/ /*@null@*/ rpmfdObject * s) } static PyObject * rpmfd_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } static int rpmfd_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { return PyObject_GenericSetAttr(o, n, v); } @@ -196,7 +176,6 @@ static int rpmfd_setattro(PyObject * o, PyObject * n, PyObject * v) /** \ingroup py_c */ static int rpmfd_init(rpmfdObject * s, PyObject *args, PyObject *kwds) - /*@modifies s @*/ { char * path; char * mode = "r.ufdio"; @@ -229,8 +208,7 @@ fprintf(stderr, "*** rpmfd_init(%p,%p,%p)\n", s, args, kwds); /** \ingroup py_c */ -static void rpmfd_free(/*@only@*/ rpmfdObject * s) - /*@modifies s @*/ +static void rpmfd_free(rpmfdObject * s) { if (_rpmfd_debug) fprintf(stderr, "%p -- fd %p\n", s, s->fd); @@ -243,7 +221,6 @@ fprintf(stderr, "%p -- fd %p\n", s, s->fd); /** \ingroup py_c */ static PyObject * rpmfd_alloc(PyTypeObject * subtype, int nitems) - /*@*/ { PyObject * s = PyType_GenericAlloc(subtype, nitems); @@ -254,9 +231,7 @@ fprintf(stderr, "*** rpmfd_alloc(%p,%d) ret %p\n", subtype, nitems, s); /** \ingroup py_c */ -/*@null@*/ static rpmfdObject * rpmfd_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds) - /*@*/ { rpmfdObject * s = PyObject_New(rpmfdObject, subtype); @@ -274,13 +249,11 @@ fprintf(stderr, "%p ++ fd %p\n", s, s->fd); /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmfd_doc[] = ""; /** \ingroup py_c */ -/*@-fullinitblock@*/ PyTypeObject rpmfd_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -327,7 +300,6 @@ PyTypeObject rpmfd_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ rpmfdObject * rpmfd_Wrap(FD_t fd) { diff --git a/python/rpmfd-py.h b/python/rpmfd-py.h index 0d016603f..15bc9ce2d 100644 --- a/python/rpmfd-py.h +++ b/python/rpmfd-py.h @@ -8,15 +8,12 @@ typedef struct rpmfdObject_s { PyObject_HEAD PyObject *md_dict; /*!< to look like PyModuleObject */ -/*@relnull@*/ FD_t fd; } rpmfdObject; -/*@unchecked@*/ extern PyTypeObject rpmfd_Type; -/*@null@*/ rpmfdObject * rpmfd_Wrap(FD_t fd) - /*@*/; + ; #endif diff --git a/python/rpmfi-py.c b/python/rpmfi-py.c index 7695be67a..0cc4e0ff5 100644 --- a/python/rpmfi-py.c +++ b/python/rpmfi-py.c @@ -11,13 +11,9 @@ #include "debug.h" -/*@access rpmfi @*/ -/*@null@*/ static PyObject * -rpmfi_Debug(/*@unused@*/ rpmfiObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmfi_Debug(rpmfiObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -28,99 +24,75 @@ rpmfi_Debug(/*@unused@*/ rpmfiObject * s, PyObject * args, PyObject * kwds) return Py_None; } -/*@null@*/ static PyObject * rpmfi_FC(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFC(s->fi)); } -/*@null@*/ static PyObject * rpmfi_FX(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFX(s->fi)); } -/*@null@*/ static PyObject * rpmfi_DC(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiDC(s->fi)); } -/*@null@*/ static PyObject * rpmfi_DX(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiDX(s->fi)); } -/*@null@*/ static PyObject * rpmfi_BN(rpmfiObject * s) - /*@*/ { return Py_BuildValue("s", xstrdup(rpmfiBN(s->fi))); } -/*@null@*/ static PyObject * rpmfi_DN(rpmfiObject * s) - /*@*/ { return Py_BuildValue("s", xstrdup(rpmfiDN(s->fi))); } -/*@null@*/ static PyObject * rpmfi_FN(rpmfiObject * s) - /*@modifies s @*/ { return Py_BuildValue("s", xstrdup(rpmfiFN(s->fi))); } -/*@null@*/ static PyObject * rpmfi_FFlags(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFFlags(s->fi)); } -/*@null@*/ static PyObject * rpmfi_VFlags(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiVFlags(s->fi)); } -/*@null@*/ static PyObject * rpmfi_FMode(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFMode(s->fi)); } -/*@null@*/ static PyObject * rpmfi_FState(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFState(s->fi)); } /* XXX rpmfiMD5 */ -/*@null@*/ static PyObject * rpmfi_MD5(rpmfiObject * s) - /*@*/ { const unsigned char * MD5; char fmd5[33]; @@ -136,66 +108,50 @@ rpmfi_MD5(rpmfiObject * s) return Py_BuildValue("s", xstrdup(fmd5)); } -/*@null@*/ static PyObject * rpmfi_FLink(rpmfiObject * s) - /*@*/ { return Py_BuildValue("s", xstrdup(rpmfiFLink(s->fi))); } -/*@null@*/ static PyObject * rpmfi_FSize(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFSize(s->fi)); } -/*@null@*/ static PyObject * rpmfi_FRdev(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFRdev(s->fi)); } -/*@null@*/ static PyObject * rpmfi_FMtime(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFMtime(s->fi)); } -/*@null@*/ static PyObject * rpmfi_FUser(rpmfiObject * s) - /*@*/ { return Py_BuildValue("s", xstrdup(rpmfiFUser(s->fi))); } -/*@null@*/ static PyObject * rpmfi_FGroup(rpmfiObject * s) - /*@*/ { return Py_BuildValue("s", xstrdup(rpmfiFGroup(s->fi))); } -/*@null@*/ static PyObject * rpmfi_FColor(rpmfiObject * s) - /*@*/ { return Py_BuildValue("i", rpmfiFColor(s->fi)); } -/*@null@*/ static PyObject * rpmfi_FClass(rpmfiObject * s) - /*@*/ { const char * FClass; @@ -207,18 +163,14 @@ rpmfi_FClass(rpmfiObject * s) #if Py_TPFLAGS_HAVE_ITER static PyObject * rpmfi_iter(rpmfiObject * s) - /*@*/ { Py_INCREF(s); return (PyObject *)s; } #endif -/*@null@*/ static PyObject * rpmfi_iternext(rpmfiObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { PyObject * result = NULL; @@ -242,9 +194,7 @@ rpmfi_iternext(rpmfiObject * s) int VFlags = rpmfiVFlags(s->fi); const char * FUser = rpmfiFUser(s->fi); const char * FGroup = rpmfiFGroup(s->fi); -/*@-shadow@*/ const unsigned char * MD5 = rpmfiMD5(s->fi), *s = MD5; -/*@=shadow@*/ char FMD5[2*16+1], *t = FMD5; static const char hex[] = "0123456789abcdef"; int gotMD5, i; @@ -297,8 +247,6 @@ rpmfi_iternext(rpmfiObject * s) static PyObject * rpmfi_Next(rpmfiObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { PyObject * result = NULL; @@ -313,27 +261,21 @@ rpmfi_Next(rpmfiObject * s) } #ifdef NOTYET -/*@null@*/ static PyObject * rpmfi_NextD(rpmfiObject * s) - /*@*/ { Py_INCREF(Py_None); return Py_None; } -/*@null@*/ static PyObject * rpmfi_InitD(rpmfiObject * s) - /*@*/ { Py_INCREF(Py_None); return Py_None; } #endif -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmfi_methods[] = { {"Debug", (PyCFunction)rpmfi_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, @@ -388,13 +330,11 @@ static struct PyMethodDef rpmfi_methods[] = { #endif {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /* ---------- */ static void -rpmfi_dealloc(/*@only@*/ /*@null@*/ rpmfiObject * s) - /*@modifies s @*/ +rpmfi_dealloc(rpmfiObject * s) { if (s) { s->fi = rpmfiFree(s->fi); @@ -403,9 +343,7 @@ rpmfi_dealloc(/*@only@*/ /*@null@*/ rpmfiObject * s) } static int -rpmfi_print(rpmfiObject * s, FILE * fp, /*@unused@*/ int flags) - /*@globals fileSystem @*/ - /*@modifies s, fp, fileSystem @*/ +rpmfi_print(rpmfiObject * s, FILE * fp, int flags) { if (!(s && s->fi)) return -1; @@ -417,28 +355,23 @@ rpmfi_print(rpmfiObject * s, FILE * fp, /*@unused@*/ int flags) } static PyObject * rpmfi_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } static int rpmfi_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { return PyObject_GenericSetAttr(o, n, v); } static int rpmfi_length(rpmfiObject * s) - /*@*/ { return rpmfiFC(s->fi); } -/*@null@*/ static PyObject * rpmfi_subscript(rpmfiObject * s, PyObject * key) - /*@modifies s @*/ { int ix; @@ -452,7 +385,6 @@ rpmfi_subscript(rpmfiObject * s, PyObject * key) return Py_BuildValue("s", xstrdup(rpmfiFN(s->fi))); } -/*@unchecked@*/ /*@observer@*/ static PyMappingMethods rpmfi_as_mapping = { (lenfunc) rpmfi_length, /* mp_length */ (binaryfunc) rpmfi_subscript, /* mp_subscript */ @@ -462,8 +394,6 @@ static PyMappingMethods rpmfi_as_mapping = { /** \ingroup py_c */ static int rpmfi_init(rpmfiObject * s, PyObject *args, PyObject *kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { hdrObject * ho = NULL; PyObject * to = NULL; @@ -494,8 +424,7 @@ fprintf(stderr, "*** rpmfi_init(%p,%p,%p)\n", s, args, kwds); /** \ingroup py_c */ -static void rpmfi_free(/*@only@*/ rpmfiObject * s) - /*@modifies s @*/ +static void rpmfi_free(rpmfiObject * s) { if (_rpmfi_debug) fprintf(stderr, "%p -- fi %p\n", s, s->fi); @@ -507,7 +436,6 @@ fprintf(stderr, "%p -- fi %p\n", s, s->fi); /** \ingroup py_c */ static PyObject * rpmfi_alloc(PyTypeObject * subtype, int nitems) - /*@*/ { PyObject * s = PyType_GenericAlloc(subtype, nitems); @@ -518,10 +446,7 @@ fprintf(stderr, "*** rpmfi_alloc(%p,%d) ret %p\n", subtype, nitems, s); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmfi_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies rpmGlobalMacroContext @*/ { rpmfiObject * s = (void *) PyObject_New(rpmfiObject, subtype); @@ -539,11 +464,9 @@ fprintf(stderr, "%p ++ fi %p\n", s, s->fi); /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmfi_doc[] = ""; -/*@-fullinitblock@*/ PyTypeObject rpmfi_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -590,7 +513,6 @@ PyTypeObject rpmfi_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ /* ---------- */ diff --git a/python/rpmfi-py.h b/python/rpmfi-py.h index 372b675f0..edc150829 100644 --- a/python/rpmfi-py.h +++ b/python/rpmfi-py.h @@ -11,24 +11,17 @@ typedef struct rpmfiObject_s { PyObject_HEAD PyObject *md_dict; /*!< to look like PyModuleObject */ int active; -/*@null@*/ rpmfi fi; } rpmfiObject; -/*@unchecked@*/ extern PyTypeObject rpmfi_Type; -/*@null@*/ rpmfi fiFromFi(rpmfiObject * fi) - /*@*/; + ; -/*@null@*/ rpmfiObject * rpmfi_Wrap(rpmfi fi) - /*@*/; + ; -/*@null@*/ -rpmfiObject * hdr_fiFromHeader(PyObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies rpmGlobalMacroContext @*/; +rpmfiObject * hdr_fiFromHeader(PyObject * s, PyObject * args, PyObject * kwds); #endif diff --git a/python/rpmfts-py.c b/python/rpmfts-py.c index fcdbcd69f..6d5b6f3ed 100644 --- a/python/rpmfts-py.c +++ b/python/rpmfts-py.c @@ -14,7 +14,6 @@ #include "debug.h" -/*@unchecked@*/ static int _rpmfts_debug = 1; #define infoBit(_ix) (1 << (((unsigned)(_ix)) & 0x1f)) @@ -37,9 +36,7 @@ static const char * ftsInfoStrings[] = { "W", }; -/*@observer@*/ static const char * ftsInfoStr(int fts_info) - /*@*/ { if (!(fts_info >= 1 && fts_info <= 14)) fts_info = 0; @@ -63,14 +60,11 @@ rpmfts_debug (const char * msg, rpmftsObject * s) static int rpmfts_initialize(rpmftsObject * s, const char * root, int options, int ignore) - /*@modifies s @*/ { int ac = 1; size_t nb; -/*@-branchstate@*/ if (root == NULL) root = "/"; -/*@=branchstate@*/ if (options == -1) options = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT); if (ignore == -1) ignore = infoBit(FTS_DP); @@ -100,7 +94,6 @@ rpmfts_initialize(rpmftsObject * s, const char * root, int options, int ignore) static int rpmfts_state(rpmftsObject * s, int nactive) - /*@modifies s @*/ { int rc = 0; @@ -128,10 +121,8 @@ rpmfts_debug(__FUNCTION__, s); return rc; } -/*@null@*/ static PyObject * rpmfts_step(rpmftsObject * s) - /*@modifies s @*/ { PyObject * result = NULL; int xx; @@ -166,11 +157,8 @@ rpmfts_debug(__FUNCTION__, s); * \brief A python rpm.fts object represents an rpm fts(3) handle. */ -/*@null@*/ static PyObject * -rpmfts_Debug(/*@unused@*/ rpmftsObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmfts_Debug(rpmftsObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -182,10 +170,8 @@ rpmfts_Debug(/*@unused@*/ rpmftsObject * s, PyObject * args, PyObject * kwds) return Py_None; } -/*@null@*/ static PyObject * rpmfts_Open(rpmftsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { char * root = NULL; int options = -1; @@ -205,11 +191,8 @@ rpmfts_debug(__FUNCTION__, s); return (PyObject *)s; } -/*@null@*/ static PyObject * rpmfts_Read(rpmftsObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { PyObject * result; @@ -225,11 +208,8 @@ rpmfts_debug(__FUNCTION__, s); return result; } -/*@null@*/ static PyObject * rpmfts_Children(rpmftsObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { int instr; char * kwlist[] = {"instructions", NULL}; @@ -249,10 +229,8 @@ rpmfts_debug(__FUNCTION__, s); return Py_None; } -/*@null@*/ static PyObject * rpmfts_Close(rpmftsObject * s) - /*@modifies s @*/ { rpmfts_debug(__FUNCTION__, s); @@ -260,10 +238,8 @@ rpmfts_debug(__FUNCTION__, s); return Py_BuildValue("i", rpmfts_state(s, RPMFTS_CLOSE)); } -/*@null@*/ static PyObject * rpmfts_Set(rpmftsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { int instr = 0; int rc = 0; @@ -281,8 +257,6 @@ rpmfts_debug(__FUNCTION__, s); /** \ingroup py_c */ -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmfts_methods[] = { {"Debug", (PyCFunction)rpmfts_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, @@ -298,7 +272,6 @@ static struct PyMethodDef rpmfts_methods[] = { NULL}, {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /* ---------- */ @@ -315,14 +288,12 @@ static PyMemberDef rpmfts_members[] = { }; static PyObject * rpmfts_getattro(PyObject * o, PyObject * n) - /*@*/ { rpmfts_debug(__FUNCTION__, (rpmftsObject *)o); return PyObject_GenericGetAttr(o, n); } static int rpmfts_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { rpmfts_debug(__FUNCTION__, (rpmftsObject *)o); return PyObject_GenericSetAttr(o, n, v); @@ -332,16 +303,13 @@ rpmfts_debug(__FUNCTION__, (rpmftsObject *)o); static PyObject * rpmfts_iter(rpmftsObject * s) - /*@*/ { Py_INCREF(s); return (PyObject *)s; } -/*@null@*/ static PyObject * rpmfts_iternext(rpmftsObject * s) - /*@modifies s @*/ { int xx; @@ -353,20 +321,17 @@ rpmfts_iternext(rpmftsObject * s) /* ---------- */ -static void rpmfts_free(/*@only@*/ PyObject * s) - /*@*/ +static void rpmfts_free(PyObject * s) { _PyObject_GC_Del(s); } static PyObject * rpmfts_alloc(PyTypeObject * type, int nitems) - /*@*/ { return PyType_GenericAlloc(type, nitems); } -static void rpmfts_dealloc(/*@only@*/ rpmftsObject * s) - /*@modifies s @*/ +static void rpmfts_dealloc(rpmftsObject * s) { int xx; @@ -388,7 +353,6 @@ rpmfts_debug(__FUNCTION__, s); } static int rpmfts_init(rpmftsObject * s, PyObject *args, PyObject *kwds) - /*@modifies s @*/ { char * root = NULL; int options = -1; @@ -403,9 +367,7 @@ rpmfts_debug(__FUNCTION__, s); return rpmfts_initialize(s, root, options, ignore); } -/*@null@*/ static PyObject * rpmfts_new(PyTypeObject *type, PyObject *args, PyObject *kwds) - /*@*/ { rpmftsObject *s; PyObject *o; @@ -496,7 +458,6 @@ rpmfts_debug(__FUNCTION__, s); } static int rpmfts_traverse(rpmftsObject * s, visitproc visit, void * arg) - /*@*/ { if (s->md_dict != NULL) return visit(s->md_dict, arg); @@ -505,9 +466,7 @@ static int rpmfts_traverse(rpmftsObject * s, visitproc visit, void * arg) return 0; } -static int rpmfts_print(rpmftsObject * s, FILE * fp, /*@unused@*/ int flags) - /*@globals fileSystem @*/ - /*@modifies fp, fileSystem @*/ +static int rpmfts_print(rpmftsObject * s, FILE * fp, int flags) { static int indent = 2; @@ -521,13 +480,11 @@ static int rpmfts_print(rpmftsObject * s, FILE * fp, /*@unused@*/ int flags) /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmfts_doc[] = ""; /** \ingroup py_c */ -/*@-fullinitblock@*/ PyTypeObject rpmfts_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -572,4 +529,3 @@ PyTypeObject rpmfts_Type = { (freefunc) rpmfts_free, /* tp_free */ 0, /* tp_is_gc */ }; -/*@=fullinitblock@*/ diff --git a/python/rpmfts-py.h b/python/rpmfts-py.h index d6b4b411a..ca431b8b6 100644 --- a/python/rpmfts-py.h +++ b/python/rpmfts-py.h @@ -12,22 +12,17 @@ typedef struct rpmftsObject_s { PyObject *md_dict; /*!< to look like PyModuleObject */ PyObject *callbacks; -/*@null@*/ const char ** roots; int options; int ignore; -/*@null@*/ int (*compare) (const void *, const void *); -/*@null@*/ FTS * ftsp; -/*@null@*/ FTSENT * fts; int active; } rpmftsObject; -/*@unchecked@*/ extern PyTypeObject rpmfts_Type; #endif diff --git a/python/rpmmi-py.c b/python/rpmmi-py.c index 537804421..0988a9557 100644 --- a/python/rpmmi-py.c +++ b/python/rpmmi-py.c @@ -64,13 +64,11 @@ /** \ingroup python * \name Class: Rpmmi */ -/*@{*/ /** */ static PyObject * rpmmi_iter(rpmmiObject * s) - /*@*/ { Py_INCREF(s); return (PyObject *)s; @@ -78,11 +76,8 @@ rpmmi_iter(rpmmiObject * s) /** */ -/*@null@*/ static PyObject * rpmmi_iternext(rpmmiObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { Header h; @@ -95,11 +90,8 @@ rpmmi_iternext(rpmmiObject * s) /** */ -/*@null@*/ static PyObject * rpmmi_Next(rpmmiObject * s) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { PyObject * result; @@ -114,10 +106,8 @@ rpmmi_Next(rpmmiObject * s) /** */ -/*@null@*/ static PyObject * rpmmi_Instance(rpmmiObject * s) - /*@*/ { int rc = 0; @@ -129,10 +119,8 @@ rpmmi_Instance(rpmmiObject * s) /** */ -/*@null@*/ static PyObject * rpmmi_Count(rpmmiObject * s) - /*@*/ { int rc = 0; @@ -144,11 +132,8 @@ rpmmi_Count(rpmmiObject * s) /** */ -/*@null@*/ static PyObject * rpmmi_Pattern(rpmmiObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { PyObject *TagN = NULL; int type; @@ -174,8 +159,6 @@ rpmmi_Pattern(rpmmiObject * s, PyObject * args, PyObject * kwds) /** \ingroup py_c */ -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmmi_methods[] = { {"next", (PyCFunction) rpmmi_Next, METH_NOARGS, "mi.next() -> hdr\n\ @@ -189,13 +172,10 @@ static struct PyMethodDef rpmmi_methods[] = { - Set a secondary match pattern on tags from retrieved header.\n" }, {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /** \ingroup py_c */ -static void rpmmi_dealloc(/*@only@*/ /*@null@*/ rpmmiObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ +static void rpmmi_dealloc(rpmmiObject * s) { if (s) { s->mi = rpmdbFreeIterator(s->mi); @@ -205,26 +185,22 @@ static void rpmmi_dealloc(/*@only@*/ /*@null@*/ rpmmiObject * s) } static PyObject * rpmmi_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } static int rpmmi_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { return PyObject_GenericSetAttr(o, n, v); } /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmmi_doc[] = ""; /** \ingroup py_c */ -/*@-fullinitblock@*/ PyTypeObject rpmmi_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -270,7 +246,6 @@ PyTypeObject rpmmi_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s) { @@ -286,4 +261,3 @@ rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s) return mio; } -/*@}*/ diff --git a/python/rpmmi-py.h b/python/rpmmi-py.h index 4c4f7173a..bd4d86c61 100644 --- a/python/rpmmi-py.h +++ b/python/rpmmi-py.h @@ -18,11 +18,9 @@ struct rpmmiObject_s { rpmdbMatchIterator mi; } ; -/*@unchecked@*/ extern PyTypeObject rpmmi_Type; -/*@null@*/ rpmmiObject * rpmmi_Wrap(rpmdbMatchIterator mi, PyObject *s) - /*@*/; + ; #endif diff --git a/python/rpmmodule.c b/python/rpmmodule.c index 053c8db04..5f8822e5b 100644 --- a/python/rpmmodule.c +++ b/python/rpmmodule.c @@ -30,7 +30,6 @@ /** \ingroup python * \name Module: rpm */ -/*@{*/ /** */ @@ -534,4 +533,3 @@ void init_rpm(void) REGISTER_ENUM((int)RPMAL_NOMATCH); } -/*@}*/ diff --git a/python/rpmmpw-py.h b/python/rpmmpw-py.h index 2ad1da47f..b2564cbce 100644 --- a/python/rpmmpw-py.h +++ b/python/rpmmpw-py.h @@ -17,7 +17,6 @@ typedef struct mpwObject_s { /** */ -/*@unchecked@*/ extern PyTypeObject mpw_Type; #define mpw_Check(_o) PyObject_TypeCheck((_o), &mpw_Type) @@ -31,11 +30,11 @@ extern PyTypeObject mpw_Type; /** */ mpwObject * mpw_New(int ob_size) - /*@*/; + ; /** */ mpwObject * mpw_FromMPW(size_t size, mpw* data, int normalize) - /*@*/; + ; #endif diff --git a/python/rpmps-py.c b/python/rpmps-py.c index 2d3eee50e..2cbe10b95 100644 --- a/python/rpmps-py.c +++ b/python/rpmps-py.c @@ -1,7 +1,6 @@ /** \ingroup py_c * \file python/rpmps-py.c */ -/*@-modunconnomods -evalorderuncon @*/ #include "system.h" @@ -13,15 +12,9 @@ #include "debug.h" -/*@access FILE @*/ -/*@access rpmps @*/ -/*@access rpmProblem @*/ -/*@null@*/ static PyObject * -rpmps_Debug(/*@unused@*/ rpmpsObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmps_Debug(rpmpsObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -34,7 +27,6 @@ rpmps_Debug(/*@unused@*/ rpmpsObject * s, PyObject * args, PyObject * kwds) static PyObject * rpmps_iter(rpmpsObject * s) - /*@modifies s @*/ { if (_rpmps_debug < 0) fprintf(stderr, "*** rpmps_iter(%p)\n", s); @@ -43,10 +35,8 @@ fprintf(stderr, "*** rpmps_iter(%p)\n", s); return (PyObject *)s; } -/*@null@*/ static PyObject * rpmps_iternext(rpmpsObject * s) - /*@modifies s @*/ { PyObject * result = NULL; rpmps ps = s->ps; @@ -71,20 +61,16 @@ fprintf(stderr, "*** rpmps_iternext(%p) ps %p ix %d active %d\n", s, s->ps, s->i return result; } -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmps_methods[] = { {"Debug", (PyCFunction)rpmps_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /* ---------- */ static void rpmps_dealloc(rpmpsObject * s) - /*@modifies s @*/ { if (_rpmps_debug < 0) fprintf(stderr, "*** rpmps_dealloc(%p)\n", s); @@ -95,9 +81,7 @@ fprintf(stderr, "*** rpmps_dealloc(%p)\n", s); } static int -rpmps_print(rpmpsObject * s, FILE * fp, /*@unused@*/ int flags) - /*@globals fileSystem @*/ - /*@modifies s, fp, fileSystem @*/ +rpmps_print(rpmpsObject * s, FILE * fp, int flags) { if (_rpmps_debug < 0) fprintf(stderr, "*** rpmps_print(%p,%p,%x)\n", s, (void *)fp, flags); @@ -107,7 +91,6 @@ fprintf(stderr, "*** rpmps_print(%p,%p,%x)\n", s, (void *)fp, flags); } static PyObject * rpmps_getattro(PyObject * o, PyObject * n) - /*@*/ { if (_rpmps_debug < 0) fprintf(stderr, "*** rpmps_getattro(%p,%p)\n", o, n); @@ -115,7 +98,6 @@ fprintf(stderr, "*** rpmps_getattro(%p,%p)\n", o, n); } static int rpmps_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { if (_rpmps_debug < 0) fprintf(stderr, "*** rpmps_setattro(%p,%p,%p)\n", o, n, v); @@ -124,7 +106,6 @@ fprintf(stderr, "*** rpmps_setattro(%p,%p,%p)\n", o, n, v); static int rpmps_length(rpmpsObject * s) - /*@*/ { int rc; rc = rpmpsNumProblems(s->ps); @@ -133,10 +114,8 @@ fprintf(stderr, "*** rpmps_length(%p) rc %d\n", s, rc); return rc; } -/*@null@*/ static PyObject * rpmps_subscript(rpmpsObject * s, PyObject * key) - /*@*/ { PyObject * result = NULL; rpmps ps; @@ -163,7 +142,6 @@ fprintf(stderr, "*** rpmps_subscript(%p,%p) %s\n", s, key, PyString_AsString(res static int rpmps_ass_sub(rpmpsObject * s, PyObject * key, PyObject * value) - /*@modifies s @*/ { rpmps ps; int ix; @@ -207,7 +185,6 @@ fprintf(stderr, "*** rpmps_ass_sub(%p[%s],%p[%s],%p[%s]) ps %p[%d:%d:%d]\n", s, return -1; } -/*@-branchstate@*/ if (ix >= ps->numProblems) { /* XXX force append for indices out of range. */ rpmpsAppend(s->ps, p->type, p->pkgNEVR, p->key, @@ -225,7 +202,6 @@ fprintf(stderr, "*** rpmps_ass_sub(%p[%s],%p[%s],%p[%s]) ps %p[%d:%d:%d]\n", s, *op = *p; /* structure assignment */ } -/*@=branchstate@*/ } return 0; @@ -240,7 +216,6 @@ static PyMappingMethods rpmps_as_mapping = { /** \ingroup py_c */ static int rpmps_init(rpmpsObject * s, PyObject *args, PyObject *kwds) - /*@modifies s @*/ { char * kwlist[] = {NULL}; @@ -259,8 +234,7 @@ fprintf(stderr, "*** rpmps_init(%p,%p,%p)\n", s, args, kwds); /** \ingroup py_c */ -static void rpmps_free(/*@only@*/ rpmpsObject * s) - /*@modifies s @*/ +static void rpmps_free(rpmpsObject * s) { if (_rpmps_debug) fprintf(stderr, "%p -- ps %p\n", s, s->ps); @@ -272,7 +246,6 @@ fprintf(stderr, "%p -- ps %p\n", s, s->ps); /** \ingroup py_c */ static PyObject * rpmps_alloc(PyTypeObject * subtype, int nitems) - /*@*/ { PyObject * s = PyType_GenericAlloc(subtype, nitems); @@ -283,9 +256,7 @@ fprintf(stderr, "*** rpmps_alloc(%p,%d) ret %p\n", subtype, nitems, s); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmps_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds) - /*@*/ { rpmpsObject * s = (void *) PyObject_New(rpmpsObject, subtype); @@ -303,11 +274,9 @@ fprintf(stderr, "%p ++ ps %p\n", s, s->ps); /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmps_doc[] = ""; -/*@-fullinitblock@*/ PyTypeObject rpmps_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -354,7 +323,6 @@ PyTypeObject rpmps_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ /* ---------- */ @@ -375,4 +343,3 @@ rpmps_Wrap(rpmps ps) s->ix = -1; return s; } -/*@=modunconnomods =evalorderuncon @*/ diff --git a/python/rpmps-py.h b/python/rpmps-py.h index 5278ce4da..4ce91c648 100644 --- a/python/rpmps-py.h +++ b/python/rpmps-py.h @@ -14,25 +14,21 @@ typedef struct rpmpsObject_s { PyObject *md_dict; /*!< to look like PyModuleObject */ int active; int ix; -/*@relnull@*/ rpmps ps; } rpmpsObject; /** */ -/*@unchecked@*/ extern PyTypeObject rpmps_Type; /** */ -/*@null@*/ rpmps psFromPs(rpmpsObject * ps) - /*@*/; + ; /** */ -/*@null@*/ rpmpsObject * rpmps_Wrap(rpmps ps) - /*@*/; + ; #endif diff --git a/python/rpmrc-py.c b/python/rpmrc-py.c index ead1a920d..9efc6794a 100644 --- a/python/rpmrc-py.c +++ b/python/rpmrc-py.c @@ -12,7 +12,6 @@ #include "debug.h" -/*@unchecked@*/ static int _rc_debug = 0; /** \ingroup python @@ -23,12 +22,11 @@ static int _rc_debug = 0; /** \ingroup python * \name Class: rpm.rc */ -/*@{*/ /** */ PyObject * -rpmrc_AddMacro(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) +rpmrc_AddMacro(PyObject * self, PyObject * args, PyObject * kwds) { char * name, * val; char * kwlist[] = {"name", "value", NULL}; @@ -46,7 +44,7 @@ rpmrc_AddMacro(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) /** */ PyObject * -rpmrc_DelMacro(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) +rpmrc_DelMacro(PyObject * self, PyObject * args, PyObject * kwds) { char * name; char * kwlist[] = {"name", NULL}; @@ -64,7 +62,6 @@ rpmrc_DelMacro(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) /** */ static void rpmrc_dealloc(PyObject * s) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_dealloc(%p[%s])\n", s, lbl(s)); @@ -74,19 +71,15 @@ fprintf(stderr, "*** rpmrc_dealloc(%p[%s])\n", s, lbl(s)); /** */ static int rpmrc_print(PyObject * s, FILE *fp, int flags) - /*@*/ { -/*@-formattype@*/ if (_rc_debug) fprintf(stderr, "*** rpmrc_print(%p[%s],%p,%x)\n", s, lbl(s), fp, flags); -/*@=formattype@*/ return PyDict_Type.tp_print(s, fp, flags); } /** */ static int rpmrc_compare(PyObject * a, PyObject * b) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_compare(%p[%s],%p[%s])\n", a, lbl(a), b, lbl(b)); @@ -96,7 +89,6 @@ fprintf(stderr, "*** rpmrc_compare(%p[%s],%p[%s])\n", a, lbl(a), b, lbl(b)); /** */ static PyObject * rpmrc_repr(PyObject * s) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_repr(%p[%s])\n", s, lbl(s)); @@ -106,7 +98,6 @@ fprintf(stderr, "*** rpmrc_repr(%p[%s])\n", s, lbl(s)); /** */ static long rpmrc_hash(PyObject * s) - /*@*/ { /* XXX dict objects are unhashable */ if (_rc_debug) @@ -118,7 +109,6 @@ fprintf(stderr, "*** rpmrc_hash(%p[%s])\n", s, lbl(s)); */ static int rpmrc_length(PyObject * s) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_length(%p[%s])\n", s, lbl(s)); @@ -129,7 +119,6 @@ fprintf(stderr, "*** rpmrc_length(%p[%s])\n", s, lbl(s)); */ static PyObject * rpmrc_subscript(PyObject * s, PyObject * key) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_subscript(%p[%s], %p[%s])\n", s, lbl(s), key, lbl(key)); @@ -140,14 +129,12 @@ fprintf(stderr, "*** rpmrc_subscript(%p[%s], %p[%s])\n", s, lbl(s), key, lbl(key */ static int rpmrc_ass_subscript(PyObject * s, PyObject * key, PyObject * value) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_ass_subscript(%p[%s], %p[%s], %p[%s])\n", s, lbl(s), key, lbl(key), value, lbl(value)); return PyDict_Type.tp_as_mapping->mp_ass_subscript(s, key, value); } -/*@unchecked@*/ /*@observer@*/ static PyMappingMethods rpmrc_as_mapping = { (lenfunc) rpmrc_length, /* mp_length */ rpmrc_subscript, /* mp_subscript */ @@ -157,7 +144,6 @@ static PyMappingMethods rpmrc_as_mapping = { /** */ static PyObject * rpmrc_getattro (PyObject *s, PyObject *name) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_getattro(%p[%s], \"%s\")\n", s, lbl(s), PyString_AS_STRING(name)); @@ -167,7 +153,6 @@ fprintf(stderr, "*** rpmrc_getattro(%p[%s], \"%s\")\n", s, lbl(s), PyString_AS_S /** */ static int rpmrc_setattro (PyObject *s, PyObject *name, PyObject * value) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_setattro(%p[%s], \"%s \", \"%s\")\n", s, lbl(s), PyString_AS_STRING(name), PyString_AS_STRING(value)); @@ -176,14 +161,12 @@ fprintf(stderr, "*** rpmrc_setattro(%p[%s], \"%s \", \"%s\")\n", s, lbl(s), PySt /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmrc_doc[] = ""; /** */ static int rpmrc_traverse(PyObject * s, visitproc visit, void *arg) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_traverse(%p[%s],%p,%p)\n", s, lbl(s), visit, arg); @@ -193,7 +176,6 @@ fprintf(stderr, "*** rpmrc_traverse(%p[%s],%p,%p)\n", s, lbl(s), visit, arg); /** */ static int rpmrc_clear(PyObject * s) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_clear(%p[%s])\n", s, lbl(s)); @@ -203,7 +185,6 @@ fprintf(stderr, "*** rpmrc_clear(%p[%s])\n", s, lbl(s)); /** */ static PyObject * rpmrc_richcompare(PyObject * v, PyObject * w, int op) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_richcompare(%p[%s],%p[%s],%x)\n", v, lbl(v), w, lbl(w), op); @@ -214,7 +195,6 @@ fprintf(stderr, "*** rpmrc_richcompare(%p[%s],%p[%s],%x)\n", v, lbl(v), w, lbl(w /** */ static PyObject * rpmrc_iter(PyObject * s) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_iter(%p[%s])\n", s, lbl(s)); @@ -225,9 +205,7 @@ fprintf(stderr, "*** rpmrc_iter(%p[%s])\n", s, lbl(s)); /** */ -/*@null@*/ static PyObject * rpmrc_iternext(PyObject * s) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_iternext(%p[%s])\n", s, lbl(s)); @@ -238,10 +216,8 @@ fprintf(stderr, "*** rpmrc_iternext(%p[%s])\n", s, lbl(s)); /** */ -/*@null@*/ /* XXX: does this _actually_ take any arguments? I don't think it does... */ static PyObject * rpmrc_next(PyObject * s, PyObject *args) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_next(%p[%s],%p)\n", s, lbl(s), args); @@ -257,7 +233,6 @@ fprintf(stderr, "*** rpmrc_next(%p[%s],%p)\n", s, lbl(s), args); /** \ingroup py_c */ static int rpmrc_init(PyObject * s, PyObject *args, PyObject *kwds) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_init(%p[%s],%p,%p)\n", s, lbl(s), args, kwds); @@ -269,7 +244,6 @@ fprintf(stderr, "*** rpmrc_init(%p[%s],%p,%p)\n", s, lbl(s), args, kwds); /** \ingroup py_c */ static void rpmrc_free(PyObject * s) - /*@*/ { if (_rc_debug) fprintf(stderr, "*** rpmrc_free(%p[%s])\n", s, lbl(s)); @@ -279,7 +253,6 @@ fprintf(stderr, "*** rpmrc_free(%p[%s])\n", s, lbl(s)); /** \ingroup py_c */ static PyObject * rpmrc_alloc(PyTypeObject * subtype, int nitems) - /*@*/ { PyObject * ns = PyType_GenericAlloc(subtype, nitems); @@ -290,9 +263,7 @@ fprintf(stderr, "*** rpmrc_alloc(%p[%s},%d) ret %p[%s]\n", subtype, lbl(subtype) /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmrc_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds) - /*@*/ { PyObject * ns; @@ -313,8 +284,6 @@ fprintf(stderr, "*** rpmrc_new(%p[%s],%p,%p) ret %p[%s]\n", subtype, lbl(subtype /** */ -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmrc_methods[] = { { "addMacro", (PyCFunction) rpmrc_AddMacro, METH_VARARGS|METH_KEYWORDS, NULL }, @@ -326,11 +295,9 @@ static struct PyMethodDef rpmrc_methods[] = { #endif {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /** \ingroup py_c */ -/*@-fullinitblock@*/ #if Py_TPFLAGS_HAVE_ITER PyTypeObject rpmrc_Type = { PyObject_HEAD_INIT(&PyType_Type) @@ -401,13 +368,11 @@ PyTypeObject rpmrc_Type = { 0 /* tp_doc */ }; #endif -/*@=fullinitblock@*/ #if Py_TPFLAGS_HAVE_ITER -PyObject * rpmrc_Create(/*@unused@*/ PyObject * self, PyObject *args, PyObject *kwds) +PyObject * rpmrc_Create(PyObject * self, PyObject *args, PyObject *kwds) { return rpmrc_new(&rpmrc_Type, args, kwds); } #endif -/*@}*/ diff --git a/python/rpmrc-py.h b/python/rpmrc-py.h index 619e8f975..bdec05dc4 100644 --- a/python/rpmrc-py.h +++ b/python/rpmrc-py.h @@ -20,22 +20,14 @@ struct rpmrcObject_s { PyObject *md_dict; /*!< to look like PyModuleObject */ } ; -/*@unchecked@*/ extern PyTypeObject rpmrc_Type; -/*@null@*/ -PyObject * rpmrc_AddMacro(PyObject * self, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies rpmGlobalMacroContext, _Py_NoneStruct @*/; -/*@null@*/ -PyObject * rpmrc_DelMacro(PyObject * self, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies rpmGlobalMacroContext, _Py_NoneStruct @*/; +PyObject * rpmrc_AddMacro(PyObject * self, PyObject * args, PyObject * kwds); +PyObject * rpmrc_DelMacro(PyObject * self, PyObject * args, PyObject * kwds); #if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */ -/*@null@*/ PyObject * rpmrc_Create(PyObject * self, PyObject * args, PyObject * kwds) - /*@*/; + ; #endif #endif diff --git a/python/rpmte-py.c b/python/rpmte-py.c index 58df539c2..833302f08 100644 --- a/python/rpmte-py.c +++ b/python/rpmte-py.c @@ -13,8 +13,6 @@ #include "debug.h" -/*@access rpmte @*/ -/*@access fnpyKey @*/ /** \ingroup python * \name Class: Rpmte @@ -52,11 +50,8 @@ * @param tag 'Basenames' */ -/*@null@*/ static PyObject * -rpmte_Debug(/*@unused@*/ rpmteObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmte_Debug(rpmteObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -67,155 +62,116 @@ rpmte_Debug(/*@unused@*/ rpmteObject * s, PyObject * args, PyObject * kwds) return Py_None; } -/*@null@*/ static PyObject * rpmte_TEType(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteType(s->te)); } -/*@null@*/ static PyObject * rpmte_N(rpmteObject * s) - /*@*/ { return Py_BuildValue("s", rpmteN(s->te)); } -/*@null@*/ static PyObject * rpmte_E(rpmteObject * s) - /*@*/ { return Py_BuildValue("s", rpmteE(s->te)); } -/*@null@*/ static PyObject * rpmte_V(rpmteObject * s) - /*@*/ { return Py_BuildValue("s", rpmteV(s->te)); } -/*@null@*/ static PyObject * rpmte_R(rpmteObject * s) - /*@*/ { return Py_BuildValue("s", rpmteR(s->te)); } -/*@null@*/ static PyObject * rpmte_A(rpmteObject * s) - /*@*/ { return Py_BuildValue("s", rpmteA(s->te)); } -/*@null@*/ static PyObject * rpmte_O(rpmteObject * s) - /*@*/ { return Py_BuildValue("s", rpmteO(s->te)); } -/*@null@*/ static PyObject * rpmte_NEVR(rpmteObject * s) - /*@*/ { return Py_BuildValue("s", rpmteNEVR(s->te)); } -/*@null@*/ static PyObject * rpmte_Color(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteColor(s->te)); } -/*@null@*/ static PyObject * rpmte_PkgFileSize(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmtePkgFileSize(s->te)); } -/*@null@*/ static PyObject * rpmte_Depth(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteDepth(s->te)); } -/*@null@*/ static PyObject * rpmte_Npreds(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteNpreds(s->te)); } -/*@null@*/ static PyObject * rpmte_Degree(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteDegree(s->te)); } -/*@null@*/ static PyObject * rpmte_Parent(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteParent(s->te)); } -/*@null@*/ static PyObject * rpmte_Tree(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteTree(s->te)); } -/*@null@*/ static PyObject * rpmte_AddedKey(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteAddedKey(s->te)); } -/*@null@*/ static PyObject * rpmte_DependsOnKey(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteDependsOnKey(s->te)); } -/*@null@*/ static PyObject * rpmte_DBOffset(rpmteObject * s) - /*@*/ { return Py_BuildValue("i", rpmteDBOffset(s->te)); } -/*@null@*/ static PyObject * rpmte_Key(rpmteObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ { PyObject * Key; @@ -227,11 +183,8 @@ rpmte_Key(rpmteObject * s) return Key; } -/*@null@*/ static PyObject * rpmte_DS(rpmteObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ { PyObject * TagN = NULL; rpmds ds; @@ -260,11 +213,8 @@ rpmte_DS(rpmteObject * s, PyObject * args, PyObject * kwds) return (PyObject *) rpmds_Wrap(rpmdsLink(ds, "rpmte_DS")); } -/*@null@*/ static PyObject * rpmte_FI(rpmteObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ { PyObject * TagN = NULL; rpmfi fi; @@ -295,8 +245,6 @@ rpmte_FI(rpmteObject * s, PyObject * args, PyObject * kwds) /** \ingroup py_c */ -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmte_methods[] = { {"Debug", (PyCFunction)rpmte_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, @@ -355,14 +303,11 @@ static struct PyMethodDef rpmte_methods[] = { - Return the TagN dependency set (or None). TagN must be 'Basenames'.\n" }, {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /* ---------- */ static int -rpmte_print(rpmteObject * s, FILE * fp, /*@unused@*/ int flags) - /*@globals fileSystem @*/ - /*@modifies fp, fileSystem @*/ +rpmte_print(rpmteObject * s, FILE * fp, int flags) { const char * tstr; if (!(s && s->te)) @@ -377,26 +322,22 @@ rpmte_print(rpmteObject * s, FILE * fp, /*@unused@*/ int flags) } static PyObject * rpmte_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } static int rpmte_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { return PyObject_GenericSetAttr(o, n, v); } /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmte_doc[] = ""; /** \ingroup py_c */ -/*@-fullinitblock@*/ PyTypeObject rpmte_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -442,7 +383,6 @@ PyTypeObject rpmte_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ rpmteObject * rpmte_Wrap(rpmte te) { diff --git a/python/rpmte-py.h b/python/rpmte-py.h index 81ff3cf95..691eea8a3 100644 --- a/python/rpmte-py.h +++ b/python/rpmte-py.h @@ -13,11 +13,9 @@ typedef struct rpmteObject_s { rpmte te; } rpmteObject; -/*@unchecked@*/ extern PyTypeObject rpmte_Type; -/*@null@*/ rpmteObject * rpmte_Wrap(rpmte te) - /*@*/; + ; #endif diff --git a/python/rpmts-py.c b/python/rpmts-py.c index d38573d9e..ad4d85c26 100644 --- a/python/rpmts-py.c +++ b/python/rpmts-py.c @@ -22,19 +22,8 @@ #include "debug.h" -/*@unchecked@*/ -/*@-shadow@*/ extern int _rpmts_debug; -/*@=shadow@*/ -/*@access alKey @*/ -/*@access FD_t @*/ -/*@access Header @*/ -/*@access rpmal @*/ -/*@access rpmdb @*/ -/*@access rpmds @*/ -/*@access rpmts @*/ -/*@access rpmtsi @*/ /** \ingroup python * \name Class: Rpmts @@ -166,11 +155,8 @@ struct rpmtsCallbackType_s { /** \ingroup py_c */ -/*@null@*/ static PyObject * -rpmts_Debug(/*@unused@*/ rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ +rpmts_Debug(rpmtsObject * s, PyObject * args, PyObject * kwds) { char * kwlist[] = {"debugLevel", NULL}; @@ -192,9 +178,7 @@ fprintf(stderr, "*** rpmts_Debug(%p) ts %p\n", s, s->ts); * @param key package private data */ static void rpmtsAddAvailableElement(rpmts ts, Header h, - /*@exposed@*/ /*@null@*/ fnpyKey key) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies h, ts, rpmGlobalMacroContext @*/ + fnpyKey key) { int scareMem = 0; rpmds provides = rpmdsNew(h, RPMTAG_PROVIDENAME, scareMem); @@ -213,11 +197,8 @@ fprintf(stderr, "\tAddAvailable(%p) list %p\n", ts, ts->availablePackages); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_AddInstall(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { hdrObject * h; PyObject * key; @@ -267,11 +248,8 @@ fprintf(stderr, "*** rpmts_AddInstall(%p,%p,%p,%s) ts %p\n", s, h, key, how, s-> /** \ingroup py_c * @todo Permit finer control (i.e. not just --allmatches) of deleted elments. */ -/*@null@*/ static PyObject * rpmts_AddErase(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { PyObject * o; int count; @@ -331,7 +309,6 @@ fprintf(stderr, "*** rpmts_AddErase(%p) ts %p\n", s, s->ts); */ static int rpmts_SolveCallback(rpmts ts, rpmds ds, const void * data) - /*@*/ { struct rpmtsCallbackType_s * cbInfo = (struct rpmtsCallbackType_s *) data; PyObject * args, * result; @@ -366,11 +343,8 @@ fprintf(stderr, "*** rpmts_SolveCallback(%p,%p,%p) \"%s\"\n", ts, ds, data, rpmd /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_Check(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { rpmps ps; rpmProblem p; @@ -488,11 +462,8 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_Order(rpmtsObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { int rc; @@ -508,11 +479,8 @@ fprintf(stderr, "*** rpmts_Order(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_Clean(rpmtsObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { if (_rpmts_debug) fprintf(stderr, "*** rpmts_Clean(%p) ts %p\n", s, s->ts); @@ -525,11 +493,8 @@ fprintf(stderr, "*** rpmts_Clean(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_IDTXload(rpmtsObject * s) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { PyObject * result = NULL; rpmTag tag = RPMTAG_INSTALLTID; @@ -542,7 +507,6 @@ fprintf(stderr, "*** rpmts_IDTXload(%p) ts %p\n", s, s->ts); idtx = IDTXload(s->ts, tag); Py_END_ALLOW_THREADS -/*@-branchstate@*/ if (idtx == NULL || idtx->nidt <= 0) { Py_INCREF(Py_None); result = Py_None; @@ -561,7 +525,6 @@ fprintf(stderr, "*** rpmts_IDTXload(%p) ts %p\n", s, s->ts); Py_DECREF(ho); } } -/*@=branchstate@*/ idtx = IDTXfree(idtx); @@ -570,11 +533,8 @@ fprintf(stderr, "*** rpmts_IDTXload(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_IDTXglob(rpmtsObject * s) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { PyObject * result = NULL; rpmTag tag = RPMTAG_REMOVETID; @@ -590,7 +550,6 @@ fprintf(stderr, "*** rpmts_IDTXglob(%p) ts %p\n", s, s->ts); globstr = _free(globstr); Py_END_ALLOW_THREADS -/*@-branchstate@*/ if (idtx == NULL || idtx->nidt <= 0) { Py_INCREF(Py_None); result = Py_None; @@ -609,7 +568,6 @@ fprintf(stderr, "*** rpmts_IDTXglob(%p) ts %p\n", s, s->ts); Py_DECREF(ho); } } -/*@=branchstate@*/ idtx = IDTXfree(idtx); @@ -618,11 +576,8 @@ fprintf(stderr, "*** rpmts_IDTXglob(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_Rollback(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { struct rpmInstallArguments_s * ia = alloca(sizeof(*ia)); rpmtransFlags transFlags; @@ -657,11 +612,8 @@ fprintf(stderr, "*** rpmts_Rollback(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_OpenDB(rpmtsObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { if (_rpmts_debug) @@ -675,10 +627,8 @@ fprintf(stderr, "*** rpmts_OpenDB(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_CloseDB(rpmtsObject * s) - /*@modifies s @*/ { int rc; @@ -693,11 +643,8 @@ fprintf(stderr, "*** rpmts_CloseDB(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_InitDB(rpmtsObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { int rc; @@ -713,11 +660,8 @@ fprintf(stderr, "*** rpmts_InitDB(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_RebuildDB(rpmtsObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { int rc; @@ -733,11 +677,8 @@ fprintf(stderr, "*** rpmts_RebuildDB(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_VerifyDB(rpmtsObject * s) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { int rc; @@ -753,11 +694,8 @@ fprintf(stderr, "*** rpmts_VerifyDB(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_HdrFromFdno(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, fileSystem @*/ - /*@modifies s, rpmGlobalMacroContext, fileSystem @*/ { PyObject * result = NULL; Header h; @@ -777,7 +715,6 @@ rpmts_HdrFromFdno(rpmtsObject * s, PyObject * args, PyObject * kwds) if (_rpmts_debug) fprintf(stderr, "*** rpmts_HdrFromFdno(%p) ts %p rc %d\n", s, s->ts, rpmrc); -/*@-branchstate@*/ switch (rpmrc) { case RPMRC_OK: if (h) @@ -799,18 +736,14 @@ fprintf(stderr, "*** rpmts_HdrFromFdno(%p) ts %p rc %d\n", s, s->ts, rpmrc); PyErr_SetString(pyrpmError, "error reading package header"); break; } -/*@=branchstate@*/ return result; } /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_HdrCheck(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { PyObject * blob; PyObject * result = NULL; @@ -865,10 +798,8 @@ fprintf(stderr, "*** rpmts_HdrCheck(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_SetVSFlags(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { rpmVSFlags vsflags; char * kwlist[] = {"flags", NULL}; @@ -888,10 +819,8 @@ fprintf(stderr, "*** rpmts_SetVSFlags(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_SetColor(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { uint_32 tscolor; char * kwlist[] = {"color", NULL}; @@ -910,11 +839,8 @@ fprintf(stderr, "*** rpmts_SetColor(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_PgpPrtPkts(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ { PyObject * blob; unsigned char * pkt; @@ -946,11 +872,8 @@ fprintf(stderr, "*** rpmts_PgpPrtPkts(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_PgpImportPubkey(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { PyObject * blob; unsigned char * pkt; @@ -983,11 +906,8 @@ fprintf(stderr, "*** rpmts_PgpImportPubkey(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static PyObject * rpmts_GetKeys(rpmtsObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { const void **data = NULL; int num, i; @@ -1019,17 +939,12 @@ fprintf(stderr, "*** rpmts_GetKeys(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@null@*/ static void * -rpmtsCallback(/*@unused@*/ const void * hd, const rpmCallbackType what, +rpmtsCallback(const void * hd, const rpmCallbackType what, const unsigned long amount, const unsigned long total, const void * pkgKey, rpmCallbackData data) - /*@globals _Py_NoneStruct @*/ - /*@modifies _Py_NoneStruct @*/ { -/*@-castexpose@*/ Header h = (Header) hd; -/*@=castexpose@*/ struct rpmtsCallbackType_s * cbInfo = data; PyObject * pkgObj = (PyObject *) pkgKey; PyObject * args, * result; @@ -1102,7 +1017,6 @@ fprintf(stderr, "\t%ld:%ld key %p\n", amount, total, pkgKey); */ static PyObject * rpmts_SetFlags(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { rpmtransFlags transFlags = 0; char * kwlist[] = {"flags", NULL}; @@ -1124,7 +1038,6 @@ fprintf(stderr, "*** rpmts_SetFlags(%p) ts %p transFlags %x\n", s, s->ts, transF */ static PyObject * rpmts_SetProbFilter(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@modifies s @*/ { rpmprobFilterFlags ignoreSet = 0; rpmprobFilterFlags oignoreSet; @@ -1145,10 +1058,8 @@ fprintf(stderr, "*** rpmts_SetProbFilter(%p) ts %p ignoreSet %x\n", s, s->ts, ig /** \ingroup py_c */ -/*@null@*/ static rpmpsObject * rpmts_Problems(rpmtsObject * s) - /*@modifies s @*/ { if (_rpmts_debug) @@ -1161,8 +1072,6 @@ fprintf(stderr, "*** rpmts_Problems(%p) ts %p\n", s, s->ts); */ static PyObject * rpmts_Run(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext, _Py_NoneStruct @*/ - /*@modifies s, rpmGlobalMacroContext, _Py_NoneStruct @*/ { int rc, i; PyObject * list; @@ -1229,7 +1138,6 @@ fprintf(stderr, "*** rpmts_Run(%p) ts %p ignore %x\n", s, s->ts, s->ignoreSet); #if Py_TPFLAGS_HAVE_ITER static PyObject * rpmts_iter(rpmtsObject * s) - /*@*/ { if (_rpmts_debug) fprintf(stderr, "*** rpmts_iter(%p) ts %p\n", s, s->ts); @@ -1242,10 +1150,8 @@ fprintf(stderr, "*** rpmts_iter(%p) ts %p\n", s, s->ts); /** * @todo Add TR_ADDED filter to iterator. */ -/*@null@*/ static PyObject * rpmts_iternext(rpmtsObject * s) - /*@modifies s @*/ { PyObject * result = NULL; rpmte te; @@ -1262,14 +1168,12 @@ fprintf(stderr, "*** rpmts_iternext(%p) ts %p tsi %p %d\n", s, s->ts, s->tsi, s- } te = rpmtsiNext(s->tsi, s->tsiFilter); -/*@-branchstate@*/ if (te != NULL) { result = (PyObject *) rpmte_Wrap(te); } else { s->tsi = rpmtsiFree(s->tsi); s->tsiFilter = 0; } -/*@=branchstate@*/ return result; } @@ -1279,8 +1183,6 @@ fprintf(stderr, "*** rpmts_iternext(%p) ts %p tsi %p %d\n", s, s->ts, s->tsi, s- */ static PyObject * rpmts_Next(rpmtsObject * s) - /*@globals _Py_NoneStruct @*/ - /*@modifies s, _Py_NoneStruct @*/ { PyObject * result; @@ -1299,11 +1201,8 @@ fprintf(stderr, "*** rpmts_Next(%p) ts %p\n", s, s->ts); /** */ -/*@null@*/ static specObject * spec_Parse(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { const char * specfile; Spec spec; @@ -1330,11 +1229,8 @@ spec_Parse(rpmtsObject * s, PyObject * args, PyObject * kwds) /** */ -/*@null@*/ static rpmmiObject * rpmts_Match(rpmtsObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { PyObject *TagN = NULL; PyObject *Key = NULL; @@ -1358,7 +1254,6 @@ fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts); } if (Key) { -/*@-branchstate@*/ if (PyString_Check(Key) || PyUnicode_Check(Key)) { key = PyString_AsString(Key); len = PyString_Size(Key); @@ -1370,7 +1265,6 @@ fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts); PyErr_SetString(PyExc_TypeError, "unknown key type"); return NULL; } -/*@=branchstate@*/ } /* XXX If not already opened, open the database O_RDONLY now. */ @@ -1388,8 +1282,6 @@ fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts); /** \ingroup py_c */ -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static struct PyMethodDef rpmts_methods[] = { {"Debug", (PyCFunction)rpmts_Debug, METH_VARARGS|METH_KEYWORDS, NULL}, @@ -1481,12 +1373,10 @@ static struct PyMethodDef rpmts_methods[] = { - Retrieve next transaction set element.\n" }, {NULL, NULL} /* sentinel */ }; -/*@=fullinitblock@*/ /** \ingroup py_c */ -static void rpmts_dealloc(/*@only@*/ rpmtsObject * s) - /*@modifies *s @*/ +static void rpmts_dealloc(rpmtsObject * s) { if (_rpmts_debug) @@ -1501,7 +1391,6 @@ fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, s->ts->rdb); } static PyObject * rpmts_getattro(PyObject * o, PyObject * n) - /*@*/ { return PyObject_GenericGetAttr(o, n); } @@ -1509,7 +1398,6 @@ static PyObject * rpmts_getattro(PyObject * o, PyObject * n) /** \ingroup py_c */ static int rpmts_setattro(PyObject * o, PyObject * n, PyObject * v) - /*@*/ { rpmtsObject *s = (rpmtsObject *)o; char * name = PyString_AsString(n); @@ -1535,8 +1423,6 @@ static int rpmts_setattro(PyObject * o, PyObject * n, PyObject * v) /** \ingroup py_c */ static int rpmts_init(rpmtsObject * s, PyObject *args, PyObject *kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies s, rpmGlobalMacroContext @*/ { /* nothing to do atm... */ return 0; @@ -1544,8 +1430,7 @@ static int rpmts_init(rpmtsObject * s, PyObject *args, PyObject *kwds) /** \ingroup py_c */ -static void rpmts_free(/*@only@*/ rpmtsObject * s) - /*@modifies s @*/ +static void rpmts_free(rpmtsObject * s) { if (_rpmts_debug) fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, s->ts->rdb); @@ -1564,7 +1449,6 @@ fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, s->ts->rdb); /** \ingroup py_c */ static PyObject * rpmts_alloc(PyTypeObject * subtype, int nitems) - /*@*/ { PyObject * s = PyType_GenericAlloc(subtype, nitems); @@ -1576,8 +1460,6 @@ fprintf(stderr, "*** rpmts_alloc(%p,%d) ret %p\n", subtype, nitems, s); /** \ingroup py_c */ static PyObject * rpmts_new(PyTypeObject * subtype, PyObject *args, PyObject *kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies rpmGlobalMacroContext @*/ { rpmtsObject * s = (void *) PyObject_New(rpmtsObject, subtype); @@ -1611,13 +1493,11 @@ static PyObject * rpmts_new(PyTypeObject * subtype, PyObject *args, PyObject *kw /** */ -/*@unchecked@*/ /*@observer@*/ static char rpmts_doc[] = ""; /** \ingroup py_c */ -/*@-fullinitblock@*/ PyTypeObject rpmts_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /* ob_size */ @@ -1663,12 +1543,11 @@ PyTypeObject rpmts_Type = { 0, /* tp_is_gc */ #endif }; -/*@=fullinitblock@*/ /** */ PyObject * -rpmts_Create(/*@unused@*/ PyObject * self, PyObject * args, PyObject * kwds) +rpmts_Create(PyObject * self, PyObject * args, PyObject * kwds) { return PyObject_Call((PyObject *) &rpmts_Type, args, kwds); } diff --git a/python/rpmts-py.h b/python/rpmts-py.h index b67bdc382..c71ac4152 100644 --- a/python/rpmts-py.h +++ b/python/rpmts-py.h @@ -13,13 +13,11 @@ typedef struct rpmtsObject_s { rpmts ts; PyObject * keyList; /* keeps reference counts correct */ FD_t scriptFd; -/*@relnull@*/ rpmtsi tsi; rpmElementType tsiFilter; rpmprobFilterFlags ignoreSet; } rpmtsObject; -/*@unchecked@*/ extern PyTypeObject rpmts_Type; /* XXX These names/constants have been removed from the rpmlib API. */ @@ -28,8 +26,6 @@ enum { RPMDEP_SENSE_CONFLICTS /*!< conflict was found. */ }; -PyObject * rpmts_Create(PyObject * s, PyObject * args, PyObject * kwds) - /*@globals rpmGlobalMacroContext @*/ - /*@modifies rpmGlobalMacroContext @*/; +PyObject * rpmts_Create(PyObject * s, PyObject * args, PyObject * kwds); #endif diff --git a/python/spec-py.c b/python/spec-py.c index 1170fc373..aab5bd026 100644 --- a/python/spec-py.c +++ b/python/spec-py.c @@ -35,7 +35,6 @@ static void spec_dealloc(specObject * s) - /*@modifies s @*/ { if (s->spec) { s->spec=freeSpec(s->spec); @@ -54,7 +53,6 @@ spec_print(specObject * s) static PyObject * spec_get_buildroot(specObject * s) - /*@*/ { Spec spec = specFromSpec(s); if (spec != NULL && spec->buildRootURL) { @@ -67,7 +65,6 @@ spec_get_buildroot(specObject * s) static PyObject * spec_get_prep(specObject * s) - /*@*/ { Spec spec = specFromSpec(s); if (spec != NULL && spec->prep) { @@ -82,7 +79,6 @@ spec_get_prep(specObject * s) static PyObject * spec_get_build(specObject * s) - /*@*/ { Spec spec = specFromSpec(s); if (spec != NULL && spec->build) { @@ -97,7 +93,6 @@ spec_get_build(specObject * s) static PyObject * spec_get_install(specObject * s) - /*@*/ { Spec spec = specFromSpec(s); if (spec != NULL && spec->install) { @@ -112,7 +107,6 @@ spec_get_install(specObject * s) static PyObject * spec_get_clean(specObject * s) - /*@*/ { Spec spec = specFromSpec(s); if (spec != NULL && spec->clean) { @@ -127,7 +121,6 @@ spec_get_clean(specObject * s) static PyObject * spec_get_sources(specObject *s) - /*@*/ { struct Source * source; PyObject *sourceList, *srcUrl; @@ -156,11 +149,9 @@ spec_get_sources(specObject *s) /** */ - /*@unchecked@*/ /*@observer@*/ + static char spec_doc[] = "RPM Spec file object"; -/*@-fullinitblock@*/ -/*@unchecked@*/ /*@observer@*/ static PyMethodDef spec_Spec_methods[] = { {"sources", (PyCFunction) spec_get_sources, METH_VARARGS, NULL }, {"prep", (PyCFunction) spec_get_prep, METH_VARARGS, NULL }, @@ -170,9 +161,7 @@ static PyMethodDef spec_Spec_methods[] = { {"buildRoot", (PyCFunction) spec_get_buildroot, METH_VARARGS, NULL }, {NULL} /* Sentinel */ }; -/*@=fullinitblock@*/ -/*@-fullinitblock@*/ PyTypeObject spec_Type = { PyObject_HEAD_INIT(&PyType_Type) 0, /*ob_size*/ @@ -216,7 +205,6 @@ PyTypeObject spec_Type = { 0, /* tp_free */ 0, /* tp_is_gc */ }; -/*@=fullinitblock@*/ Spec specFromSpec(specObject *s) { diff --git a/python/spec-py.h b/python/spec-py.h index 897b833bc..afd9f0674 100644 --- a/python/spec-py.h +++ b/python/spec-py.h @@ -10,7 +10,6 @@ typedef struct specObject_s { PyObject_HEAD /*type specific fields */ -/*@null@*/ Spec spec; } specObject; @@ -18,14 +17,10 @@ extern PyTypeObject spec_Type; /** */ -/*@null@*/ -Spec specFromSpec(specObject * spec) -/*@*/; +Spec specFromSpec(specObject * spec); /** */ -/*@null@*/ -specObject * spec_Wrap(Spec spec) -/*@*/; +specObject * spec_Wrap(Spec spec); #endif /* RPMPYTHON_SPEC */