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.
This commit is contained in:
Serhiy Storchaka 2018-11-27 13:27:31 +02:00 committed by GitHub
parent 81524022d0
commit 62be74290a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 174 additions and 174 deletions

View file

@ -4810,11 +4810,11 @@ static PyMethodDef sock_methods[] = {
listen_doc},
{"recv", (PyCFunction)sock_recv, METH_VARARGS,
recv_doc},
{"recv_into", (PyCFunction)sock_recv_into, METH_VARARGS | METH_KEYWORDS,
{"recv_into", (PyCFunction)(void(*)(void))sock_recv_into, METH_VARARGS | METH_KEYWORDS,
recv_into_doc},
{"recvfrom", (PyCFunction)sock_recvfrom, METH_VARARGS,
recvfrom_doc},
{"recvfrom_into", (PyCFunction)sock_recvfrom_into, METH_VARARGS | METH_KEYWORDS,
{"recvfrom_into", (PyCFunction)(void(*)(void))sock_recvfrom_into, METH_VARARGS | METH_KEYWORDS,
recvfrom_into_doc},
{"send", (PyCFunction)sock_send, METH_VARARGS,
send_doc},
@ -4843,7 +4843,7 @@ static PyMethodDef sock_methods[] = {
sendmsg_doc},
#endif
#ifdef HAVE_SOCKADDR_ALG
{"sendmsg_afalg", (PyCFunction)sock_sendmsg_afalg, METH_VARARGS | METH_KEYWORDS,
{"sendmsg_afalg", (PyCFunction)(void(*)(void))sock_sendmsg_afalg, METH_VARARGS | METH_KEYWORDS,
sendmsg_afalg_doc},
#endif
{NULL, NULL} /* sentinel */
@ -6741,7 +6741,7 @@ static PyMethodDef socket_methods[] = {
{"inet_ntop", socket_inet_ntop,
METH_VARARGS, inet_ntop_doc},
#endif
{"getaddrinfo", (PyCFunction)socket_getaddrinfo,
{"getaddrinfo", (PyCFunction)(void(*)(void))socket_getaddrinfo,
METH_VARARGS | METH_KEYWORDS, getaddrinfo_doc},
{"getnameinfo", socket_getnameinfo,
METH_VARARGS, getnameinfo_doc},