summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-08-02 09:10:51 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-08-02 09:10:51 (GMT)
commit865d12a2d9108b04f3417b0f772dfff5bf9840cb (patch)
treef05d901aa96f2f59c41f0056e7a42097fd828975 /Modules/_testcapimodule.c
parent1d7ec8f26cf7b08f8b163bea8e0236ad0228126e (diff)
downloadcpython-865d12a2d9108b04f3417b0f772dfff5bf9840cb.zip
cpython-865d12a2d9108b04f3417b0f772dfff5bf9840cb.tar.gz
cpython-865d12a2d9108b04f3417b0f772dfff5bf9840cb.tar.bz2
Fix warning: ‘ptr2’ may be used uninitialized in this function
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 1ed5687..59d3182 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2723,6 +2723,7 @@ test_setallocators(PyMemAllocatorDomain domain)
case PYMEM_DOMAIN_RAW: ptr2 = PyMem_RawRealloc(ptr, size2); break;
case PYMEM_DOMAIN_MEM: ptr2 = PyMem_Realloc(ptr, size2); break;
case PYMEM_DOMAIN_OBJ: ptr2 = PyObject_Realloc(ptr, size2); break;
+ default: ptr2 = NULL; break;
}
if (ptr2 == NULL) {