summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 19:34:27 (GMT)
committerGitHub <noreply@github.com>2018-11-27 19:34:27 (GMT)
commit1c607155c9e363489036ae6258b165a3fae75134 (patch)
tree2bd1d2de1a6a4490840fb6658c4c33c0b11798b5 /Objects
parentc57e6e2e52d5d8b4005753bed789d99ebe407fb6 (diff)
downloadcpython-1c607155c9e363489036ae6258b165a3fae75134.zip
cpython-1c607155c9e363489036ae6258b165a3fae75134.tar.gz
cpython-1c607155c9e363489036ae6258b165a3fae75134.tar.bz2
bpo-33012: Fix more invalid function cast warnings with gcc 8. (GH-10751)
Fix warnings with gcc 8 for wrapperfunc <-> wrapperfunc_kwds casts.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/descrobject.c2
-rw-r--r--Objects/typeobject.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index d8dbfa9..e129d0c 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -346,7 +346,7 @@ wrapperdescr_raw_call(PyWrapperDescrObject *descr, PyObject *self,
wrapperfunc wrapper = descr->d_base->wrapper;
if (descr->d_base->flags & PyWrapperFlag_KEYWORDS) {
- wrapperfunc_kwds wk = (wrapperfunc_kwds)wrapper;
+ wrapperfunc_kwds wk = (wrapperfunc_kwds)(void(*)(void))wrapper;
return (*wk)(self, args, descr->d_wrapped, kwds);
}
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 73d385b..d1f1e8c 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6822,7 +6822,7 @@ static slotdef slotdefs[] = {
"__repr__($self, /)\n--\n\nReturn repr(self)."),
TPSLOT("__hash__", tp_hash, slot_tp_hash, wrap_hashfunc,
"__hash__($self, /)\n--\n\nReturn hash(self)."),
- FLSLOT("__call__", tp_call, slot_tp_call, (wrapperfunc)wrap_call,
+ FLSLOT("__call__", tp_call, slot_tp_call, (wrapperfunc)(void(*)(void))wrap_call,
"__call__($self, /, *args, **kwargs)\n--\n\nCall self as a function.",
PyWrapperFlag_KEYWORDS),
TPSLOT("__str__", tp_str, slot_tp_str, wrap_unaryfunc,
@@ -6858,7 +6858,7 @@ static slotdef slotdefs[] = {
TPSLOT("__delete__", tp_descr_set, slot_tp_descr_set,
wrap_descr_delete,
"__delete__($self, instance, /)\n--\n\nDelete an attribute of instance."),
- FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)wrap_init,
+ FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)(void(*)(void))wrap_init,
"__init__($self, /, *args, **kwargs)\n--\n\n"
"Initialize self. See help(type(self)) for accurate signature.",
PyWrapperFlag_KEYWORDS),