From 376ee134b60825277115a2ce5a54912b59e597d0 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 18 Jan 2014 14:06:49 -0800 Subject: 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. --- Cython/Utility/ModuleSetupCode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Cython/Utility/ModuleSetupCode.c') 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)) -- cgit v1.2.1