From: Uwe Hermann Date: Thu, 21 May 2020 14:40:23 +0000 (+0200) Subject: type_decoder.c: Workaround for a compiler warning. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9e3ed17732bfee95dd17fbd74ad82195a992eb2f;p=libsigrokdecode.git type_decoder.c: Workaround for a compiler warning. type_decoder.c:1040:16: warning: cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *, struct _object *)’} to ‘PyObject * (*)(PyObject *, PyObject *)’ {aka ‘struct _object * (*)(struct _object *, struct _object *)’} [-Wcast-function-type] 1040 | { "register", (PyCFunction)Decoder_register, METH_VARARGS|METH_KEYWORDS, | ^ --- diff --git a/type_decoder.c b/type_decoder.c index c097c7f..983400b 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -1037,7 +1037,7 @@ err: static PyMethodDef Decoder_methods[] = { { "put", Decoder_put, METH_VARARGS, "Accepts a dictionary with the following keys: startsample, endsample, data" }, - { "register", (PyCFunction)Decoder_register, METH_VARARGS|METH_KEYWORDS, + { "register", (PyCFunction)(void(*)(void))Decoder_register, METH_VARARGS|METH_KEYWORDS, "Register a new output stream" }, { "wait", Decoder_wait, METH_VARARGS, "Wait for one or more conditions to occur" },