diff --git a/.travis.yml b/.travis.yml index 581013cf..5dda5e08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,14 @@ matrix: - python: 3.6 env: TOXENV=doc +env: + global: + # -Wno-int-in-bool-context: don't complain about PyMem_MALLOC() + # -Werror: turn all warnings into fatal errors + - CFLAGS="-Wno-int-in-bool-context -Werror" + # pass CFLAGS and WITH_GCOV to tox tasks + - TOX_TESTENV_PASSENV="CFLAGS WITH_GCOV" + install: - pip install "pip>=7.1.0" - pip install tox-travis tox codecov coverage diff --git a/Modules/LDAPObject.c b/Modules/LDAPObject.c index 48007246..cff9337f 100644 --- a/Modules/LDAPObject.c +++ b/Modules/LDAPObject.c @@ -112,7 +112,8 @@ Tuple_to_LDAPMod( PyObject* tup, int no_op ) Py_ssize_t i, len, nstrs; if (!PyTuple_Check(tup)) { - return LDAPerror_TypeError("expected a tuple", tup); + LDAPerror_TypeError("expected a tuple", tup); + return NULL; } if (no_op) { @@ -209,13 +210,15 @@ List_to_LDAPMods( PyObject *list, int no_op ) { PyObject *item; if (!PySequence_Check(list)) { - return LDAPerror_TypeError("expected list of tuples", list); + LDAPerror_TypeError("expected list of tuples", list); + return NULL; } len = PySequence_Length(list); if (len < 0) { - return LDAPerror_TypeError("expected list of tuples", list); + LDAPerror_TypeError("expected list of tuples", list); + return NULL; } lms = PyMem_NEW(LDAPMod *, len + 1); diff --git a/Modules/ldapcontrol.c b/Modules/ldapcontrol.c index 3f5b2c4c..7d8fbe38 100644 --- a/Modules/ldapcontrol.c +++ b/Modules/ldapcontrol.c @@ -4,6 +4,7 @@ #include "LDAPObject.h" #include "ldapcontrol.h" #include "berval.h" +#include "constants.h" #include "lber.h" @@ -71,7 +72,8 @@ Tuple_to_LDAPControl( PyObject* tup ) Py_ssize_t len; if (!PyTuple_Check(tup)) { - return LDAPerror_TypeError("expected a tuple", tup); + LDAPerror_TypeError("expected a tuple", tup); + return NULL; } if (!PyArg_ParseTuple( tup, "sbO", &oid, &iscritical, &bytes )) diff --git a/Modules/ldapmodule.c b/Modules/ldapmodule.c index bd54313d..4c2c4ec9 100644 --- a/Modules/ldapmodule.c +++ b/Modules/ldapmodule.c @@ -37,7 +37,7 @@ static PyMethodDef methods[] = { /* Common initialization code */ -PyObject* init_ldap_module() +PyObject* init_ldap_module(void) { PyObject *m, *d;
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: