Commit c79ae55a authored by Max Bachmann's avatar Max Bachmann Committed by GitHub

Silence C compiler warnings about unused variables in a universal way (GH-4162)

parent afda509f
...@@ -264,7 +264,8 @@ __Pyx_async_gen_anext(PyObject *g) ...@@ -264,7 +264,8 @@ __Pyx_async_gen_anext(PyObject *g)
} }
static PyObject * static PyObject *
__Pyx_async_gen_anext_method(PyObject *g, CYTHON_UNUSED PyObject *arg) { __Pyx_async_gen_anext_method(PyObject *g, PyObject *arg) {
CYTHON_UNUSED_VAR(arg);
return __Pyx_async_gen_anext(g); return __Pyx_async_gen_anext(g);
} }
...@@ -280,8 +281,9 @@ __Pyx_async_gen_asend(__pyx_PyAsyncGenObject *o, PyObject *arg) ...@@ -280,8 +281,9 @@ __Pyx_async_gen_asend(__pyx_PyAsyncGenObject *o, PyObject *arg)
static PyObject * static PyObject *
__Pyx_async_gen_aclose(__pyx_PyAsyncGenObject *o, CYTHON_UNUSED PyObject *arg) __Pyx_async_gen_aclose(__pyx_PyAsyncGenObject *o, PyObject *arg)
{ {
CYTHON_UNUSED_VAR(arg);
if (unlikely(__Pyx_async_gen_init_hooks(o))) { if (unlikely(__Pyx_async_gen_init_hooks(o))) {
return NULL; return NULL;
} }
...@@ -300,7 +302,8 @@ __Pyx_async_gen_athrow(__pyx_PyAsyncGenObject *o, PyObject *args) ...@@ -300,7 +302,8 @@ __Pyx_async_gen_athrow(__pyx_PyAsyncGenObject *o, PyObject *args)
static PyObject * static PyObject *
__Pyx_async_gen_self_method(PyObject *g, CYTHON_UNUSED PyObject *arg) { __Pyx_async_gen_self_method(PyObject *g, PyObject *arg) {
CYTHON_UNUSED_VAR(arg);
return __Pyx_NewRef(g); return __Pyx_NewRef(g);
} }
...@@ -586,9 +589,10 @@ __Pyx_async_gen_asend_throw(__pyx_PyAsyncGenASend *o, PyObject *args) ...@@ -586,9 +589,10 @@ __Pyx_async_gen_asend_throw(__pyx_PyAsyncGenASend *o, PyObject *args)
static PyObject * static PyObject *
__Pyx_async_gen_asend_close(PyObject *g, CYTHON_UNUSED PyObject *args) __Pyx_async_gen_asend_close(PyObject *g, PyObject *args)
{ {
__pyx_PyAsyncGenASend *o = (__pyx_PyAsyncGenASend*) g; __pyx_PyAsyncGenASend *o = (__pyx_PyAsyncGenASend*) g;
CYTHON_UNUSED_VAR(args);
o->ags_state = __PYX_AWAITABLE_STATE_CLOSED; o->ags_state = __PYX_AWAITABLE_STATE_CLOSED;
Py_RETURN_NONE; Py_RETURN_NONE;
} }
...@@ -1021,9 +1025,10 @@ __Pyx_async_gen_athrow_iternext(__pyx_PyAsyncGenAThrow *o) ...@@ -1021,9 +1025,10 @@ __Pyx_async_gen_athrow_iternext(__pyx_PyAsyncGenAThrow *o)
static PyObject * static PyObject *
__Pyx_async_gen_athrow_close(PyObject *g, CYTHON_UNUSED PyObject *args) __Pyx_async_gen_athrow_close(PyObject *g, PyObject *args)
{ {
__pyx_PyAsyncGenAThrow *o = (__pyx_PyAsyncGenAThrow*) g; __pyx_PyAsyncGenAThrow *o = (__pyx_PyAsyncGenAThrow*) g;
CYTHON_UNUSED_VAR(args);
o->agt_state = __PYX_AWAITABLE_STATE_CLOSED; o->agt_state = __PYX_AWAITABLE_STATE_CLOSED;
Py_RETURN_NONE; Py_RETURN_NONE;
} }
......
...@@ -377,7 +377,8 @@ typedef struct { char c; void *x; } __Pyx_st_void_p; ...@@ -377,7 +377,8 @@ typedef struct { char c; void *x; } __Pyx_st_void_p;
typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
#endif #endif
static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
CYTHON_UNUSED_VAR(is_complex);
switch (ch) { switch (ch) {
case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
...@@ -411,7 +412,8 @@ typedef struct { void *x; char c; } __Pyx_pad_void_p; ...@@ -411,7 +412,8 @@ typedef struct { void *x; char c; } __Pyx_pad_void_p;
typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
#endif #endif
static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
CYTHON_UNUSED_VAR(is_complex);
switch (ch) { switch (ch) {
case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
......
...@@ -330,12 +330,13 @@ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); /*proto*/ ...@@ -330,12 +330,13 @@ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); /*proto*/
//////////////////// pep479 //////////////////// //////////////////// pep479 ////////////////////
//@requires: Exceptions.c::GetException //@requires: Exceptions.c::GetException
static void __Pyx_Generator_Replace_StopIteration(CYTHON_UNUSED int in_async_gen) { static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) {
PyObject *exc, *val, *tb, *cur_exc; PyObject *exc, *val, *tb, *cur_exc;
__Pyx_PyThreadState_declare __Pyx_PyThreadState_declare
#ifdef __Pyx_StopAsyncIteration_USED #ifdef __Pyx_StopAsyncIteration_USED
int is_async_stopiteration = 0; int is_async_stopiteration = 0;
#endif #endif
CYTHON_MAYBE_UNUSED_VAR(in_async_gen);
cur_exc = PyErr_Occurred(); cur_exc = PyErr_Occurred();
if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) {
...@@ -507,9 +508,10 @@ static int __pyx_Generator_init(void); /*proto*/ ...@@ -507,9 +508,10 @@ static int __pyx_Generator_init(void); /*proto*/
// Returns 0 if no exception or StopIteration is set. // Returns 0 if no exception or StopIteration is set.
// If any other exception is set, returns -1 and leaves // If any other exception is set, returns -1 and leaves
// pvalue unchanged. // pvalue unchanged.
static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *$local_tstate_cname, PyObject **pvalue) { static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *$local_tstate_cname, PyObject **pvalue) {
PyObject *et, *ev, *tb; PyObject *et, *ev, *tb;
PyObject *value = NULL; PyObject *value = NULL;
CYTHON_UNUSED_VAR($local_tstate_cname);
__Pyx_ErrFetch(&et, &ev, &tb); __Pyx_ErrFetch(&et, &ev, &tb);
...@@ -614,8 +616,9 @@ void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { ...@@ -614,8 +616,9 @@ void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
} }
#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) { static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) {
const char *msg; const char *msg;
CYTHON_MAYBE_UNUSED_VAR(gen);
if ((0)) { if ((0)) {
#ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Coroutine_USED
} else if (__Pyx_Coroutine_Check((PyObject*)gen)) { } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
...@@ -632,8 +635,9 @@ static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineOb ...@@ -632,8 +635,9 @@ static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineOb
} }
#define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { static void __Pyx__Coroutine_NotStartedError(PyObject *gen) {
const char *msg; const char *msg;
CYTHON_MAYBE_UNUSED_VAR(gen);
if ((0)) { if ((0)) {
#ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Coroutine_USED
} else if (__Pyx_Coroutine_Check(gen)) { } else if (__Pyx_Coroutine_Check(gen)) {
...@@ -650,7 +654,9 @@ static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { ...@@ -650,7 +654,9 @@ static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
} }
#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) { static void __Pyx__Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) {
CYTHON_MAYBE_UNUSED_VAR(gen);
CYTHON_MAYBE_UNUSED_VAR(closing);
#ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Coroutine_USED
if (!closing && __Pyx_Coroutine_Check(gen)) { if (!closing && __Pyx_Coroutine_Check(gen)) {
// `self` is an exhausted coroutine: raise an error, // `self` is an exhausted coroutine: raise an error,
...@@ -780,7 +786,8 @@ static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStr ...@@ -780,7 +786,8 @@ static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStr
} }
static CYTHON_INLINE static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) { PyObject *__Pyx_Coroutine_MethodReturn(PyObject* gen, PyObject *retval) {
CYTHON_MAYBE_UNUSED_VAR(gen);
if (unlikely(!retval)) { if (unlikely(!retval)) {
__Pyx_PyThreadState_declare __Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign __Pyx_PyThreadState_assign
...@@ -984,7 +991,8 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) { ...@@ -984,7 +991,8 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) {
return __Pyx_Coroutine_SendEx(gen, Py_None, 0); return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
} }
static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) { static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) {
CYTHON_UNUSED_VAR(arg);
return __Pyx_Coroutine_Close(self); return __Pyx_Coroutine_Close(self);
} }
...@@ -1315,9 +1323,10 @@ static void __Pyx_Coroutine_del(PyObject *self) { ...@@ -1315,9 +1323,10 @@ static void __Pyx_Coroutine_del(PyObject *self) {
} }
static PyObject * static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context)
{ {
PyObject *name = self->gi_name; PyObject *name = self->gi_name;
CYTHON_UNUSED_VAR(context);
// avoid NULL pointer dereference during garbage collection // avoid NULL pointer dereference during garbage collection
if (unlikely(!name)) name = Py_None; if (unlikely(!name)) name = Py_None;
Py_INCREF(name); Py_INCREF(name);
...@@ -1325,8 +1334,9 @@ __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *contex ...@@ -1325,8 +1334,9 @@ __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *contex
} }
static int static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context)
{ {
CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
if (unlikely(value == NULL || !PyUnicode_Check(value))) if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else #else
...@@ -1343,9 +1353,10 @@ __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UN ...@@ -1343,9 +1353,10 @@ __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UN
} }
static PyObject * static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context)
{ {
PyObject *name = self->gi_qualname; PyObject *name = self->gi_qualname;
CYTHON_UNUSED_VAR(context);
// avoid NULL pointer dereference during garbage collection // avoid NULL pointer dereference during garbage collection
if (unlikely(!name)) name = Py_None; if (unlikely(!name)) name = Py_None;
Py_INCREF(name); Py_INCREF(name);
...@@ -1353,8 +1364,9 @@ __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *co ...@@ -1353,8 +1364,9 @@ __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *co
} }
static int static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context)
{ {
CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
if (unlikely(value == NULL || !PyUnicode_Check(value))) if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else #else
...@@ -1371,9 +1383,10 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHO ...@@ -1371,9 +1383,10 @@ __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHO
} }
static PyObject * static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context)
{ {
PyObject *frame = self->gi_frame; PyObject *frame = self->gi_frame;
CYTHON_UNUSED_VAR(context);
if (!frame) { if (!frame) {
if (unlikely(!self->gi_code)) { if (unlikely(!self->gi_code)) {
// Avoid doing something stupid, e.g. during garbage collection. // Avoid doing something stupid, e.g. during garbage collection.
...@@ -1468,7 +1481,8 @@ static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, Py ...@@ -1468,7 +1481,8 @@ static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, Py
return __Pyx_Coroutine_Throw(self->coroutine, args); return __Pyx_Coroutine_Throw(self->coroutine, args);
} }
static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, CYTHON_UNUSED PyObject *arg) { static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, PyObject *arg) {
CYTHON_UNUSED_VAR(arg);
return __Pyx_Coroutine_Close(self->coroutine); return __Pyx_Coroutine_Close(self->coroutine);
} }
...@@ -1478,7 +1492,10 @@ static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) { ...@@ -1478,7 +1492,10 @@ static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) {
} }
#if !CYTHON_COMPILING_IN_PYPY #if !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_CoroutineAwait_no_new(CYTHON_UNUSED PyTypeObject *type, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwargs) { static PyObject *__Pyx_CoroutineAwait_no_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) {
CYTHON_UNUSED_VAR(type);
CYTHON_UNUSED_VAR(args);
CYTHON_UNUSED_VAR(kwargs);
PyErr_SetString(PyExc_TypeError, "cannot instantiate type, use 'await coroutine' instead"); PyErr_SetString(PyExc_TypeError, "cannot instantiate type, use 'await coroutine' instead");
return NULL; return NULL;
} }
...@@ -1572,7 +1589,8 @@ static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) { ...@@ -1572,7 +1589,8 @@ static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) {
#endif #endif
#if PY_VERSION_HEX < 0x030500B1 #if PY_VERSION_HEX < 0x030500B1
static PyObject *__Pyx_Coroutine_await_method(PyObject *coroutine, CYTHON_UNUSED PyObject *arg) { static PyObject *__Pyx_Coroutine_await_method(PyObject *coroutine, PyObject *arg) {
CYTHON_UNUSED_VAR(arg);
return __Pyx__Coroutine_await(coroutine); return __Pyx__Coroutine_await(coroutine);
} }
#endif #endif
......
...@@ -101,8 +101,9 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, ...@@ -101,8 +101,9 @@ static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func,
#include <structmember.h> #include <structmember.h>
static PyObject * static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{ {
CYTHON_UNUSED_VAR(closure);
if (unlikely(op->func_doc == NULL)) { if (unlikely(op->func_doc == NULL)) {
if (op->func.m_ml->ml_doc) { if (op->func.m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
...@@ -122,8 +123,9 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure ...@@ -122,8 +123,9 @@ __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure
} }
static int static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{ {
CYTHON_UNUSED_VAR(context);
if (value == NULL) { if (value == NULL) {
// Mark as deleted // Mark as deleted
value = Py_None; value = Py_None;
...@@ -134,8 +136,9 @@ __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNU ...@@ -134,8 +136,9 @@ __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNU
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{ {
CYTHON_UNUSED_VAR(context);
if (unlikely(op->func_name == NULL)) { if (unlikely(op->func_name == NULL)) {
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
...@@ -150,8 +153,9 @@ __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *contex ...@@ -150,8 +153,9 @@ __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *contex
} }
static int static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{ {
CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
if (unlikely(value == NULL || !PyUnicode_Check(value))) if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else #else
...@@ -168,15 +172,17 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UN ...@@ -168,15 +172,17 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UN
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{ {
CYTHON_UNUSED_VAR(context);
Py_INCREF(op->func_qualname); Py_INCREF(op->func_qualname);
return op->func_qualname; return op->func_qualname;
} }
static int static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{ {
CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
if (unlikely(value == NULL || !PyUnicode_Check(value))) if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else #else
...@@ -193,8 +199,9 @@ __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHO ...@@ -193,8 +199,9 @@ __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHO
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{ {
CYTHON_UNUSED_VAR(context);
if (unlikely(op->func_dict == NULL)) { if (unlikely(op->func_dict == NULL)) {
op->func_dict = PyDict_New(); op->func_dict = PyDict_New();
if (unlikely(op->func_dict == NULL)) if (unlikely(op->func_dict == NULL))
...@@ -205,8 +212,9 @@ __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *contex ...@@ -205,8 +212,9 @@ __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *contex
} }
static int static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{ {
CYTHON_UNUSED_VAR(context);
if (unlikely(value == NULL)) { if (unlikely(value == NULL)) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
"function's dictionary may not be deleted"); "function's dictionary may not be deleted");
...@@ -223,23 +231,27 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UN ...@@ -223,23 +231,27 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UN
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{ {
CYTHON_UNUSED_VAR(context);
Py_INCREF(op->func_globals); Py_INCREF(op->func_globals);
return op->func_globals; return op->func_globals;
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{ {
CYTHON_UNUSED_VAR(op);
CYTHON_UNUSED_VAR(context);
Py_INCREF(Py_None); Py_INCREF(Py_None);
return Py_None; return Py_None;
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{ {
PyObject* result = (op->func_code) ? op->func_code : Py_None; PyObject* result = (op->func_code) ? op->func_code : Py_None;
CYTHON_UNUSED_VAR(context);
Py_INCREF(result); Py_INCREF(result);
return result; return result;
} }
...@@ -270,7 +282,8 @@ __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { ...@@ -270,7 +282,8 @@ __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
} }
static int static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
CYTHON_UNUSED_VAR(context);
if (!value) { if (!value) {
// del => explicit None to prevent rebuilding // del => explicit None to prevent rebuilding
value = Py_None; value = Py_None;
...@@ -285,8 +298,9 @@ __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHO ...@@ -285,8 +298,9 @@ __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHO
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
PyObject* result = op->defaults_tuple; PyObject* result = op->defaults_tuple;
CYTHON_UNUSED_VAR(context);
if (unlikely(!result)) { if (unlikely(!result)) {
if (op->defaults_getter) { if (op->defaults_getter) {
if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
...@@ -300,7 +314,8 @@ __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *co ...@@ -300,7 +314,8 @@ __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *co
} }
static int static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
CYTHON_UNUSED_VAR(context);
if (!value) { if (!value) {
// del => explicit None to prevent rebuilding // del => explicit None to prevent rebuilding
value = Py_None; value = Py_None;
...@@ -315,8 +330,9 @@ __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYT ...@@ -315,8 +330,9 @@ __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYT
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
PyObject* result = op->defaults_kwdict; PyObject* result = op->defaults_kwdict;
CYTHON_UNUSED_VAR(context);
if (unlikely(!result)) { if (unlikely(!result)) {
if (op->defaults_getter) { if (op->defaults_getter) {
if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
...@@ -330,7 +346,8 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void * ...@@ -330,7 +346,8 @@ __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *
} }
static int static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
CYTHON_UNUSED_VAR(context);
if (!value || value == Py_None) { if (!value || value == Py_None) {
value = NULL; value = NULL;
} else if (unlikely(!PyDict_Check(value))) { } else if (unlikely(!PyDict_Check(value))) {
...@@ -344,8 +361,9 @@ __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CY ...@@ -344,8 +361,9 @@ __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CY
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
PyObject* result = op->func_annotations; PyObject* result = op->func_annotations;
CYTHON_UNUSED_VAR(context);
if (unlikely(!result)) { if (unlikely(!result)) {
result = PyDict_New(); result = PyDict_New();
if (unlikely(!result)) return NULL; if (unlikely(!result)) return NULL;
...@@ -356,8 +374,9 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void ...@@ -356,8 +374,9 @@ __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void
} }
static PyObject * static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
int is_coroutine; int is_coroutine;
CYTHON_UNUSED_VAR(context);
if (op->func_is_coroutine) { if (op->func_is_coroutine) {
return __Pyx_NewRef(op->func_is_coroutine); return __Pyx_NewRef(op->func_is_coroutine);
} }
...@@ -388,8 +407,9 @@ ignore: ...@@ -388,8 +407,9 @@ ignore:
//#if PY_VERSION_HEX >= 0x030400C1 //#if PY_VERSION_HEX >= 0x030400C1
//static PyObject * //static PyObject *
//__Pyx_CyFunction_get_signature(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { //__Pyx_CyFunction_get_signature(__pyx_CyFunctionObject *op, void *context) {
// PyObject *inspect_module, *signature_class, *signature; // PyObject *inspect_module, *signature_class, *signature;
// CYTHON_UNUSED_VAR(context);
// // from inspect import Signature // // from inspect import Signature
// inspect_module = PyImport_ImportModuleLevelObject(PYIDENT("inspect"), NULL, NULL, NULL, 0); // inspect_module = PyImport_ImportModuleLevelObject(PYIDENT("inspect"), NULL, NULL, NULL, 0);
// if (unlikely(!inspect_module)) // if (unlikely(!inspect_module))
...@@ -450,8 +470,9 @@ static PyMemberDef __pyx_CyFunction_members[] = { ...@@ -450,8 +470,9 @@ static PyMemberDef __pyx_CyFunction_members[] = {
}; };
static PyObject * static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{ {
CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
Py_INCREF(m->func_qualname); Py_INCREF(m->func_qualname);
return m->func_qualname; return m->func_qualname;
...@@ -1348,9 +1369,10 @@ bad: ...@@ -1348,9 +1369,10 @@ bad:
} }
static PyObject * static PyObject *
__Pyx_FusedFunction_get_self(__pyx_FusedFunctionObject *m, CYTHON_UNUSED void *closure) __Pyx_FusedFunction_get_self(__pyx_FusedFunctionObject *m, void *closure)
{ {
PyObject *self = m->self; PyObject *self = m->self;
CYTHON_UNUSED_VAR(closure);
if (unlikely(!self)) { if (unlikely(!self)) {
PyErr_SetString(PyExc_AttributeError, "'function' object has no attribute '__self__'"); PyErr_SetString(PyExc_AttributeError, "'function' object has no attribute '__self__'");
} else { } else {
......
...@@ -127,9 +127,9 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject ...@@ -127,9 +127,9 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject
// has changed quite a lot between the two versions. // has changed quite a lot between the two versions.
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
CYTHON_UNUSED PyObject *cause) {
__Pyx_PyThreadState_declare __Pyx_PyThreadState_declare
CYTHON_UNUSED_VAR(cause);
/* 'cause' is only used in Py3 */ /* 'cause' is only used in Py3 */
Py_XINCREF(type); Py_XINCREF(type);
if (!value || value == Py_None) if (!value || value == Py_None)
...@@ -590,9 +590,9 @@ static void __Pyx_WriteUnraisable(const char *name, int clineno, ...@@ -590,9 +590,9 @@ static void __Pyx_WriteUnraisable(const char *name, int clineno,
//@requires: PyErrFetchRestore //@requires: PyErrFetchRestore
//@requires: PyThreadStateGet //@requires: PyThreadStateGet
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, static void __Pyx_WriteUnraisable(const char *name, int clineno,
CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, int lineno, const char *filename,
int full_traceback, CYTHON_UNUSED int nogil) { int full_traceback, int nogil) {
PyObject *old_exc, *old_val, *old_tb; PyObject *old_exc, *old_val, *old_tb;
PyObject *ctx; PyObject *ctx;
__Pyx_PyThreadState_declare __Pyx_PyThreadState_declare
...@@ -605,6 +605,11 @@ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, ...@@ -605,6 +605,11 @@ static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
else state = (PyGILState_STATE)-1; else state = (PyGILState_STATE)-1;
#endif #endif
#endif #endif
CYTHON_UNUSED_VAR(clineno);
CYTHON_UNUSED_VAR(lineno);
CYTHON_UNUSED_VAR(filename);
CYTHON_MAYBE_UNUSED_VAR(nogil);
__Pyx_PyThreadState_assign __Pyx_PyThreadState_assign
__Pyx_ErrFetch(&old_exc, &old_val, &old_tb); __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
if (full_traceback) { if (full_traceback) {
......
...@@ -71,9 +71,10 @@ static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { ...@@ -71,9 +71,10 @@ static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
} }
#endif #endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, CYTHON_UNUSED PyObject *parts_tuple) { static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3 #if PY_MAJOR_VERSION < 3
PyObject *module, *from_list, *star = PYIDENT("*"); PyObject *module, *from_list, *star = PYIDENT("*");
CYTHON_UNUSED_VAR(parts_tuple);
from_list = PyList_New(1); from_list = PyList_New(1);
if (unlikely(!from_list)) if (unlikely(!from_list))
return NULL; return NULL;
......
...@@ -230,8 +230,9 @@ fail: ...@@ -230,8 +230,9 @@ fail:
} }
static int static int
__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec) __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
{ {
CYTHON_UNUSED_VAR(ndim);
// Todo: without PyBUF_INDIRECT we may not have suboffset information, i.e., the // Todo: without PyBUF_INDIRECT we may not have suboffset information, i.e., the
// ptr may not be set to NULL but may be uninitialized? // ptr may not be set to NULL but may be uninitialized?
if (spec & __Pyx_MEMVIEW_DIRECT) { if (spec & __Pyx_MEMVIEW_DIRECT) {
......
...@@ -335,14 +335,18 @@ ...@@ -335,14 +335,18 @@
# endif # endif
#endif #endif
#ifndef CYTHON_MAYBE_UNUSED_VAR #ifndef CYTHON_UNUSED_VAR
# if defined(__cplusplus) # if defined(__cplusplus)
template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
# else # else
# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # define CYTHON_UNUSED_VAR(x) (void)(x)
# endif # endif
#endif #endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED #ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON # if CYTHON_COMPILING_IN_CPYTHON
# define CYTHON_NCP_UNUSED # define CYTHON_NCP_UNUSED
...@@ -1217,8 +1221,9 @@ static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject ...@@ -1217,8 +1221,9 @@ static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject
return result; return result;
} }
static CYTHON_SMALL_CODE PyObject* ${pymodule_create_func_cname}(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { static CYTHON_SMALL_CODE PyObject* ${pymodule_create_func_cname}(PyObject *spec, PyModuleDef *def) {
PyObject *module = NULL, *moddict, *modname; PyObject *module = NULL, *moddict, *modname;
CYTHON_UNUSED_VAR(def);
// For now, we only have exactly one module instance. // For now, we only have exactly one module instance.
if (__Pyx_check_single_interpreter()) if (__Pyx_check_single_interpreter())
...@@ -1540,7 +1545,8 @@ static int __Pyx_RegisterCleanup(void); /*proto*/ ...@@ -1540,7 +1545,8 @@ static int __Pyx_RegisterCleanup(void); /*proto*/
//@substitute: naming //@substitute: naming
#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY #if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY
static PyObject* ${cleanup_cname}_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { static PyObject* ${cleanup_cname}_atexit(PyObject *module, PyObject *unused) {
CYTHON_UNUSED_VAR(unused);
${cleanup_cname}(module); ${cleanup_cname}(module);
Py_INCREF(Py_None); return Py_None; Py_INCREF(Py_None); return Py_None;
} }
...@@ -1775,7 +1781,7 @@ static void __Pyx_FastGilFuncInit0(void) { ...@@ -1775,7 +1781,7 @@ static void __Pyx_FastGilFuncInit0(void) {
#else #else
static void __Pyx_FastGilFuncInit0(void) { static void __Pyx_FastGilFuncInit0(void) {
CYTHON_UNUSED void* force_use = (void*)&__Pyx_FetchCommonPointer; CYTHON_UNUSED_VAR(&__Pyx_FetchCommonPointer);
} }
#endif #endif
......
...@@ -648,7 +648,7 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, ...@@ -648,7 +648,7 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
{{endif}} {{endif}}
Py_ssize_t cstart, Py_ssize_t cstop, Py_ssize_t cstart, Py_ssize_t cstop,
PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { int has_cstart, int has_cstop, int wraparound) {
__Pyx_TypeName obj_type_name; __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS #if CYTHON_USE_TYPE_SLOTS
PyMappingMethods* mp; PyMappingMethods* mp;
...@@ -693,6 +693,8 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, ...@@ -693,6 +693,8 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
return ms->sq_ass_slice(obj, cstart, cstop, value); return ms->sq_ass_slice(obj, cstart, cstop, value);
{{endif}} {{endif}}
} }
#else
CYTHON_UNUSED_VAR(wraparound);
#endif #endif
mp = Py_TYPE(obj)->tp_as_mapping; mp = Py_TYPE(obj)->tp_as_mapping;
...@@ -701,6 +703,8 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, ...@@ -701,6 +703,8 @@ static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
{{else}} {{else}}
if (likely(mp && mp->mp_ass_subscript)) if (likely(mp && mp->mp_ass_subscript))
{{endif}} {{endif}}
#else
CYTHON_UNUSED_VAR(wraparound);
#endif #endif
{ {
{{if access == 'Get'}}PyObject*{{else}}int{{endif}} result; {{if access == 'Get'}}PyObject*{{else}}int{{endif}} result;
...@@ -2865,7 +2869,8 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN ...@@ -2865,7 +2869,8 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
// This should be an actual function (not a macro), such that we can put it // This should be an actual function (not a macro), such that we can put it
// directly in a tp_descr_get slot. // directly in a tp_descr_get slot.
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, CYTHON_UNUSED PyObject *typ) { static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
CYTHON_UNUSED_VAR(typ);
if (!self) if (!self)
return __Pyx_NewRef(func); return __Pyx_NewRef(func);
return PyMethod_New(func, self); return PyMethod_New(func, self);
......
...@@ -227,8 +227,9 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke ...@@ -227,8 +227,9 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke
/////////////// dict_setdefault /////////////// /////////////// dict_setdefault ///////////////
static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value,
CYTHON_UNUSED int is_safe_type) { int is_safe_type) {
PyObject* value; PyObject* value;
CYTHON_MAYBE_UNUSED_VAR(is_safe_type);
#if PY_VERSION_HEX >= 0x030400A0 #if PY_VERSION_HEX >= 0x030400A0
// we keep the method call at the end to avoid "unused" C compiler warnings // we keep the method call at the end to avoid "unused" C compiler warnings
if ((1)) { if ((1)) {
...@@ -1037,7 +1038,9 @@ return_compare = ( ...@@ -1037,7 +1038,9 @@ return_compare = (
) )
}} }}
static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, long intval, long inplace) {
CYTHON_MAYBE_UNUSED_VAR(intval);
CYTHON_UNUSED_VAR(inplace);
if (op1 == op2) { if (op1 == op2) {
{{return_true if op == 'Eq' else return_false}}; {{return_true if op == 'Eq' else return_false}};
} }
...@@ -1143,9 +1146,10 @@ def zerodiv_check(operand, optype='integer', _is_mod=op == 'Remainder', _needs_c ...@@ -1143,9 +1146,10 @@ def zerodiv_check(operand, optype='integer', _is_mod=op == 'Remainder', _needs_c
) if _needs_check else '') ) if _needs_check else '')
}} }}
static {{c_ret_type}} {{cfunc_name}}(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { static {{c_ret_type}} {{cfunc_name}}(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
// Prevent "unused" warnings. CYTHON_MAYBE_UNUSED_VAR(intval);
(void)inplace; (void)zerodivision_check; CYTHON_MAYBE_UNUSED_VAR(inplace);
CYTHON_UNUSED_VAR(zerodivision_check);
{{if op in ('Eq', 'Ne')}} {{if op in ('Eq', 'Ne')}}
if (op1 == op2) { if (op1 == op2) {
......
...@@ -889,12 +889,13 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_co ...@@ -889,12 +889,13 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_co
//@substitute: naming //@substitute: naming
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
CYTHON_UNUSED Py_UCS4 max_char) { Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
PyObject *result_uval; PyObject *result_uval;
int result_ukind, kind_shift; int result_ukind, kind_shift;
Py_ssize_t i, char_pos; Py_ssize_t i, char_pos;
void *result_udata; void *result_udata;
CYTHON_MAYBE_UNUSED_VAR(max_char);
#if CYTHON_PEP393_ENABLED #if CYTHON_PEP393_ENABLED
// Py 3.3+ (post PEP-393) // Py 3.3+ (post PEP-393)
result_uval = PyUnicode_New(result_ulength, max_char); result_uval = PyUnicode_New(result_ulength, max_char);
...@@ -950,8 +951,9 @@ bad: ...@@ -950,8 +951,9 @@ bad:
return NULL; return NULL;
#else #else
// non-CPython fallback // non-CPython fallback
result_ulength++; CYTHON_UNUSED_VAR(max_char);
value_count++; CYTHON_UNUSED_VAR(result_ulength);
CYTHON_UNUSED_VAR(value_count);
return PyUnicode_Join($empty_unicode, value_tuple); return PyUnicode_Join($empty_unicode, value_tuple);
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment