summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-10-15 19:52:49 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-10-15 19:52:49 +0200
commit35d9529156cb769442a78ee2ba381a29a8958432 (patch)
treec6b2f63b3706e1927d731e6b44579d3e9e7ef62c
parent443369fc35ac35525eb4241548cad79d0c94f8dc (diff)
downloadcython-35d9529156cb769442a78ee2ba381a29a8958432.tar.gz
Avoid some C compiler warnings about constant conditions.
-rw-r--r--Cython/Utility/Coroutine.c4
-rw-r--r--Cython/Utility/Optimize.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/Cython/Utility/Coroutine.c b/Cython/Utility/Coroutine.c
index 252f6c217..8cd3138b2 100644
--- a/Cython/Utility/Coroutine.c
+++ b/Cython/Utility/Coroutine.c
@@ -607,7 +607,7 @@ void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
const char *msg;
- if (0) {
+ if ((0)) {
#ifdef __Pyx_Coroutine_USED
} else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
msg = "coroutine already executing";
@@ -625,7 +625,7 @@ static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineOb
#define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
const char *msg;
- if (0) {
+ if ((0)) {
#ifdef __Pyx_Coroutine_USED
} else if (__Pyx_Coroutine_Check(gen)) {
msg = "can't send non-None value to a just-started coroutine";
diff --git a/Cython/Utility/Optimize.c b/Cython/Utility/Optimize.c
index 3d5be8f00..3366f9cf0 100644
--- a/Cython/Utility/Optimize.c
+++ b/Cython/Utility/Optimize.c
@@ -600,7 +600,7 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
- float_value = PyNumber_Float(obj); if (0) goto bad;
+ float_value = PyNumber_Float(obj); if ((0)) goto bad;
#else
PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
if (likely(nb) && likely(nb->nb_float)) {