summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.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/socketmodule.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/socketmodule.c')
-rw-r--r--Modules/socketmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index a47f031..04bfdaf 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -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},