diff options
author | Cristian Gafton <gafton@redhat.com> | 1999-08-20 21:41:23 +0000 |
---|---|---|
committer | Cristian Gafton <gafton@redhat.com> | 1999-08-20 21:41:23 +0000 |
commit | 370f08bc26a8211b43574f64cd6d3349a391de83 (patch) | |
tree | 58a5e554728debf52d9816b9734694a7fefb6047 /rpmmodule | |
parent | afd62094e275a0a09fab4bc19ddad6a61666fc26 (diff) | |
download | anaconda-370f08bc26a8211b43574f64cd6d3349a391de83.tar.gz anaconda-370f08bc26a8211b43574f64cd6d3349a391de83.tar.xz anaconda-370f08bc26a8211b43574f64cd6d3349a391de83.zip |
Fix some compile-time warnings
Diffstat (limited to 'rpmmodule')
-rw-r--r-- | rpmmodule/rpmmodule.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/rpmmodule/rpmmodule.c b/rpmmodule/rpmmodule.c index 477620f6f..038baefe6 100644 --- a/rpmmodule/rpmmodule.c +++ b/rpmmodule/rpmmodule.c @@ -174,6 +174,9 @@ static struct PyMethodDef hdrMethods[] = { {NULL, NULL} /* sentinel */ }; +/* External functions */ +int mdfile(const char *fn, unsigned char *digest); + /* Code */ void initrpm(void) { @@ -345,7 +348,7 @@ static void pkgSort(struct pkgSet * psp) { static PyObject * findUpgradeSet(PyObject * self, PyObject * args) { PyObject * hdrList, * result; char * root = "/"; - int i, num; + int i; struct pkgSet list; hdrObject * hdr; @@ -478,7 +481,6 @@ static PyObject * rpmHeaderFromFile(PyObject * self, PyObject * args) { } static PyObject * rpmHeaderFromPackage(PyObject * self, PyObject * args) { - PyObject * fileObj; hdrObject * h; Header header; int rc; @@ -900,7 +902,7 @@ static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) { PyTuple_SetItem(tuple, 0, attrName); sprintf(buf, "0x%-4x", s->rdevs[fileNumber]); PyTuple_SetItem(tuple, 1, PyString_FromString(buf)); - sprintf(buf, "0x%-4x", sb.st_rdev); + sprintf(buf, "0x%-4x", (unsigned int) sb.st_rdev); PyTuple_SetItem(tuple, 2, PyString_FromString(buf)); PyList_Append(list, tuple); } @@ -984,7 +986,9 @@ static void rpmtransDealloc(PyObject * o) { rpmtransObject * trans = (void *) o; rpmtransFree(trans->ts); - if (trans->dbo) Py_DECREF(trans->dbo); + if (trans->dbo) { + Py_DECREF(trans->dbo); + } if (trans->scriptFd) fdClose(trans->scriptFd); /* this will free the keyList, and decrement the ref count of all the items on the list as well :-) */ |