]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
Fix a couple of compiler warnings in the C module.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Jul 2011 11:38:18 +0000 (13:38 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 21 Jul 2011 11:38:18 +0000 (13:38 +0200)
src/pool.c
src/problem.c
src/repo.c
src/request.c
src/solver.c
src/step.c
src/transaction.c

index eb530d6e2129f5fbc9d7f0c55fcb0fa9e54f13d2..9fc855550fb53cfca09436936608daa7824d2c47 100644 (file)
@@ -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);
index f1d9ebb9918244e23c3c1266c88682476539cf65..266eb2be3b4bce1305108996e7572c2ceb6446c3 100644 (file)
@@ -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;
 }
index eccf32963120cfc679d46c90fe1a9d4e4bbd8de4..cab9a0070522ec78fdccf807590efa654f0c8eec 100644 (file)
@@ -1,5 +1,6 @@
 
 #include <stdbool.h>
+#include <satsolver/repo_solv.h>
 #include <satsolver/repo_write.h>
 
 #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) {
index 090226c342c4ad380042f9c8370c3b1df5d3391f..7c7fb64a417b3a608f0ead260db2d6a325bdf496 100644 (file)
@@ -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) {
index 6931fe9927fe05c0020d96ca215c88e682afb979..16801876375723e4794183e4e67168febcb2bd2e 100644 (file)
@@ -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) {
index a2b0c3614ed0bbcb78c4849d83604f2ec9b945ec..033af6278796a742b3c1a0e162ebafebc9d88c66 100644 (file)
@@ -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) {
index cec1d62aec1e5a74a16346a664b2cbc65164ac87..8188cd05886010b6aa96f1e52f984da88de015c6 100644 (file)
@@ -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) {