summaryrefslogtreecommitdiff
path: root/Cython/Utility/ModuleSetupCode.c
diff options
context:
space:
mode:
authorRobert Bradshaw <robertwb@gmail.com>2014-01-18 14:06:49 -0800
committerRobert Bradshaw <robertwb@gmail.com>2014-01-18 14:06:49 -0800
commit376ee134b60825277115a2ce5a54912b59e597d0 (patch)
tree0d10b7f339f8b53190cec17a8e777ce8f1a23715 /Cython/Utility/ModuleSetupCode.c
parent11081196beef5be000ae52d7c846ff278cb0a3bf (diff)
downloadcython-376ee134b60825277115a2ce5a54912b59e597d0.tar.gz
Better unused warning suppression.
The (k=k) can results in "multiple unsequenced modifications to 'kind'" warning when this macro is expanded twice in the same expression.
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r--Cython/Utility/ModuleSetupCode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c
index 88a134ea9..d6fc27d84 100644
--- a/Cython/Utility/ModuleSetupCode.c
+++ b/Cython/Utility/ModuleSetupCode.c
@@ -157,8 +157,8 @@
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
- /* (k=k) => avoid unused variable warning due to macro: */
- #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ /* (void)(k) => avoid unused variable warning due to macro: */
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))