summaryrefslogtreecommitdiffstats
path: root/Modules/_hashopenssl.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 11:27:31 (GMT)
committerGitHub <noreply@github.com>2018-11-27 11:27:31 (GMT)
commit62be74290aca26d16f3f55ece7ff6dad14e60e8d (patch)
tree656625bee7ca61fd87c6370407162522d8fb277f /Modules/_hashopenssl.c
parent81524022d0c0df7a41f9b2b2df41e2ebe140e610 (diff)
downloadcpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.zip
cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.tar.gz
cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.tar.bz2
bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)
Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS excluding Argument Clinic generated code.
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r--Modules/_hashopenssl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 42ea997..d7e613c 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -1011,7 +1011,7 @@ generate_hash_name_list(void)
/* a PyMethodDef structure for the constructor */
#define CONSTRUCTOR_METH_DEF(NAME) \
- {"openssl_" #NAME, (PyCFunction)EVP_new_ ## NAME, METH_FASTCALL, \
+ {"openssl_" #NAME, (PyCFunction)(void(*)(void))EVP_new_ ## NAME, METH_FASTCALL, \
PyDoc_STR("Returns a " #NAME \
" hash object; optionally initialized with a string") \
}
@@ -1034,9 +1034,9 @@ GEN_CONSTRUCTOR(sha512)
/* List of functions exported by this module */
static struct PyMethodDef EVP_functions[] = {
- {"new", (PyCFunction)EVP_new, METH_VARARGS|METH_KEYWORDS, EVP_new__doc__},
+ {"new", (PyCFunction)(void(*)(void))EVP_new, METH_VARARGS|METH_KEYWORDS, EVP_new__doc__},
#ifdef PY_PBKDF2_HMAC
- {"pbkdf2_hmac", (PyCFunction)pbkdf2_hmac, METH_VARARGS|METH_KEYWORDS,
+ {"pbkdf2_hmac", (PyCFunction)(void(*)(void))pbkdf2_hmac, METH_VARARGS|METH_KEYWORDS,
pbkdf2_hmac__doc__},
#endif
_HASHLIB_SCRYPT_METHODDEF