diff options
author | Petr Viktorin <encukou@gmail.com> | 2019-09-12 10:12:53 +0100 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2019-09-12 10:21:28 +0100 |
commit | 7455f696ffcf37a55d6ebd53f92c0df6daa43d07 (patch) | |
tree | 804a60701c1f2c1a921efe0d606d31075b1f4d3e | |
parent | f02c74f89c7b47519a8dfdedb21ebc4246455613 (diff) | |
download | cpython-git-backport-ff023ed-3.8.tar.gz |
bpo-37879: Fix warnings in _testcapimodule (GH-16004)backport-ff023ed-3.8
-rw-r--r-- | Modules/_testcapimodule.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index f6da285583..cb9206ca4e 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -5991,7 +5991,7 @@ static PyType_Slot HeapGcCType_slots[] = { {Py_tp_init, heapctype_init}, {Py_tp_members, heapctype_members}, {Py_tp_dealloc, heapgcctype_dealloc}, - {Py_tp_doc, heapgctype__doc__}, + {Py_tp_doc, (char*)heapgctype__doc__}, {0, 0}, }; @@ -6019,7 +6019,7 @@ static PyType_Slot HeapCType_slots[] = { {Py_tp_init, heapctype_init}, {Py_tp_members, heapctype_members}, {Py_tp_dealloc, heapctype_dealloc}, - {Py_tp_doc, heapctype__doc__}, + {Py_tp_doc, (char*)heapctype__doc__}, {0, 0}, }; @@ -6060,7 +6060,7 @@ static struct PyMemberDef heapctypesubclass_members[] = { static PyType_Slot HeapCTypeSubclass_slots[] = { {Py_tp_init, heapctypesubclass_init}, {Py_tp_members, heapctypesubclass_members}, - {Py_tp_doc, heapctypesubclass__doc__}, + {Py_tp_doc, (char*)heapctypesubclass__doc__}, {0, 0}, }; @@ -6089,7 +6089,8 @@ heapctypesubclasswithfinalizer_init(PyObject *self, PyObject *args, PyObject *kw static void heapctypesubclasswithfinalizer_finalize(PyObject *self) { - PyObject *error_type, *error_value, *error_traceback, *m, *oldtype, *newtype; + PyObject *error_type, *error_value, *error_traceback, *m; + PyObject *oldtype = NULL, *newtype = NULL; /* Save the current exception, if any. */ PyErr_Fetch(&error_type, &error_value, &error_traceback); @@ -6128,7 +6129,7 @@ static PyType_Slot HeapCTypeSubclassWithFinalizer_slots[] = { {Py_tp_init, heapctypesubclasswithfinalizer_init}, {Py_tp_members, heapctypesubclass_members}, {Py_tp_finalize, heapctypesubclasswithfinalizer_finalize}, - {Py_tp_doc, heapctypesubclasswithfinalizer__doc__}, + {Py_tp_doc, (char*)heapctypesubclasswithfinalizer__doc__}, {0, 0}, }; |