From beb84c4fe2abc40f909a24758cb4ebaf57aef0d3 Mon Sep 17 00:00:00 2001 From: Yay295 Date: Tue, 23 Apr 2024 09:56:20 -0500 Subject: [PATCH] use (void) for empty function parameters --- src/_webp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/_webp.c b/src/_webp.c index 0a70e335757..db9ca10daed 100644 --- a/src/_webp.c +++ b/src/_webp.c @@ -884,7 +884,7 @@ WebPDecode_wrapper(PyObject *self, PyObject *args) { // Return the decoder's version number, packed in hexadecimal using 8bits for // each of major/minor/revision. E.g: v2.5.7 is 0x020507. PyObject * -WebPDecoderVersion_wrapper() { +WebPDecoderVersion_wrapper(void) { return Py_BuildValue("i", WebPGetDecoderVersion()); } @@ -912,7 +912,7 @@ WebPDecoderBuggyAlpha(void) { } PyObject * -WebPDecoderBuggyAlpha_wrapper() { +WebPDecoderBuggyAlpha_wrapper(void) { return Py_BuildValue("i", WebPDecoderBuggyAlpha()); } @@ -927,9 +927,12 @@ static PyMethodDef webpMethods[] = { #endif {"WebPEncode", WebPEncode_wrapper, METH_VARARGS, "WebPEncode"}, {"WebPDecode", WebPDecode_wrapper, METH_VARARGS, "WebPDecode"}, - {"WebPDecoderVersion", WebPDecoderVersion_wrapper, METH_NOARGS, "WebPVersion"}, + {"WebPDecoderVersion", + (PyCFunction)WebPDecoderVersion_wrapper, + METH_NOARGS, + "WebPVersion"}, {"WebPDecoderBuggyAlpha", - WebPDecoderBuggyAlpha_wrapper, + (PyCFunction)WebPDecoderBuggyAlpha_wrapper, METH_NOARGS, "WebPDecoderBuggyAlpha"}, {NULL, NULL}};