From: Michael Tremer Date: Thu, 21 Jul 2011 11:38:18 +0000 (+0200) Subject: Fix a couple of compiler warnings in the C module. X-Git-Tag: 0.9.4~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4069d10ca0b9d0ee7da55e390459e5836699a1dc;p=pakfire.git Fix a couple of compiler warnings in the C module. --- diff --git a/src/pool.c b/src/pool.c index eb530d6e2..9fc855550 100644 --- a/src/pool.c +++ b/src/pool.c @@ -48,6 +48,8 @@ PyObject* Pool_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *Pool_dealloc(PoolObject *self) { pool_free(self->_pool); self->ob_type->tp_free((PyObject *)self); + + Py_RETURN_NONE; } PyObject *Pool_add_repo(PoolObject *self, PyObject *args) { @@ -75,7 +77,7 @@ void _Pool_prepare(Pool *pool) { pool_addfileprovides(pool); pool_createwhatprovides(pool); - Id r; + Repo *r; int idx; FOR_REPOS(idx, r) { repo_internalize(r); diff --git a/src/problem.c b/src/problem.c index f1d9ebb99..266eb2be3 100644 --- a/src/problem.c +++ b/src/problem.c @@ -36,4 +36,6 @@ PyObject* Problem_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *Problem_dealloc(ProblemObject *self) { //self->ob_type->tp_free((PyObject *)self); + + Py_RETURN_NONE; } diff --git a/src/repo.c b/src/repo.c index eccf32963..cab9a0070 100644 --- a/src/repo.c +++ b/src/repo.c @@ -1,5 +1,6 @@ #include +#include #include #include "pool.h" @@ -44,6 +45,8 @@ PyObject* Repo_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *Repo_dealloc(RepoObject *self) { // repo_free(self->_repo, 0); self->ob_type->tp_free((PyObject *)self); + + Py_RETURN_NONE; } PyObject *Repo_name(RepoObject *self) { @@ -84,7 +87,7 @@ PyObject *Repo_set_enabled(RepoObject *self, PyObject *args) { } PyObject *Repo_get_priority(RepoObject *self) { - Py_BuildValue("i", self->_repo->priority); + return Py_BuildValue("i", self->_repo->priority); } PyObject *Repo_set_priority(RepoObject *self, PyObject *args) { diff --git a/src/request.c b/src/request.c index 090226c34..7c7fb64a4 100644 --- a/src/request.c +++ b/src/request.c @@ -40,6 +40,8 @@ PyObject* Request_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *Request_dealloc(RequestObject *self) { self->ob_type->tp_free((PyObject *)self); + + Py_RETURN_NONE; } void _Request_solvable(RequestObject *self, Id what, Id solvable) { diff --git a/src/solver.c b/src/solver.c index 6931fe992..168018763 100644 --- a/src/solver.c +++ b/src/solver.c @@ -40,6 +40,8 @@ PyObject* Solver_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *Solver_dealloc(SolverObject *self) { solver_free(self->_solver); self->ob_type->tp_free((PyObject *)self); + + Py_RETURN_NONE; } PyObject *Solver_get_allow_downgrade(SolverObject *self, PyObject *args) { diff --git a/src/step.c b/src/step.c index a2b0c3614..033af6278 100644 --- a/src/step.c +++ b/src/step.c @@ -39,6 +39,8 @@ PyObject* Step_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *Step_dealloc(StepObject *self) { self->ob_type->tp_free((PyObject *)self); + + Py_RETURN_NONE; } PyObject *Step_get_solvable(StepObject *self, PyObject *args) { diff --git a/src/transaction.c b/src/transaction.c index cec1d62ae..8188cd058 100644 --- a/src/transaction.c +++ b/src/transaction.c @@ -44,6 +44,8 @@ PyObject* Transaction_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *Transaction_dealloc(TransactionObject *self) { /* XXX need to free self->_transaction */ self->ob_type->tp_free((PyObject *)self); + + Py_RETURN_NONE; } PyObject *Transaction_steps(TransactionObject *self, PyObject *args) {