From 812f789db6ec21ebe817521424dff32ada8be00c Mon Sep 17 00:00:00 2001 From: xantares Date: Sat, 25 Jul 2015 16:25:42 +0200 Subject: Avoid gcc uninitialized variable warnings in Python wrappers. Just initialize the local array with zeroes. Closes #453. --- Source/Modules/python.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 781cab721..df7fb3445 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -2385,7 +2385,7 @@ public: Printv(f->def, linkage, builtin_ctor ? "int " : "PyObject *", wname, "(PyObject *self, PyObject *args) {", NIL); Wrapper_add_local(f, "argc", "int argc"); - Printf(tmp, "PyObject *argv[%d]", maxargs + 1); + Printf(tmp, "PyObject *argv[%d] = {0}", maxargs + 1); Wrapper_add_local(f, "argv", tmp); if (!fastunpack) { -- cgit v1.2.1