summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxantares <xantares09@hotmail.com>2015-07-25 16:25:42 +0200
committerVadim Zeitlin <vz-swig@zeitlins.org>2015-07-25 19:10:06 +0200
commit812f789db6ec21ebe817521424dff32ada8be00c (patch)
tree1f8d979313d47bc7ece400fd49195755c11ec029
parent3ab7315cf9de7805512a1b37f11dd63b469fc88c (diff)
downloadswig-812f789db6ec21ebe817521424dff32ada8be00c.tar.gz
Avoid gcc uninitialized variable warnings in Python wrappers.
Just initialize the local array with zeroes. Closes #453.
-rw-r--r--Source/Modules/python.cxx2
1 files changed, 1 insertions, 1 deletions
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) {