]> sigrok.org Git - libsigrokdecode.git/commitdiff
type_decoder.c: Workaround for a compiler warning.
authorUwe Hermann <redacted>
Thu, 21 May 2020 14:40:23 +0000 (16:40 +0200)
committerUwe Hermann <redacted>
Thu, 21 May 2020 14:43:09 +0000 (16:43 +0200)
  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,
        |                ^

type_decoder.c

index c097c7fce5b94cb950d3cb03c0fb4e52371a0df2..983400bacb0070fd07826c10c5ed397f17f36555 100644 (file)
@@ -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" },