summaryrefslogtreecommitdiff
path: root/Lib/python/std_map.i
diff options
context:
space:
mode:
authorDaniel Emminizer <emminizer@enews.nrl.navy.mil>2019-08-29 09:10:41 -0400
committerDaniel Emminizer <emminizer@enews.nrl.navy.mil>2019-08-29 09:10:41 -0400
commit9fc57f47bdf908c6f9546548acef8052c5a1bb89 (patch)
tree1f223a3b1d95e2f4e5d27a263b2221336c8d2dd3 /Lib/python/std_map.i
parentc48d11ac17f04038b617cc44c2a44c0d09041267 (diff)
downloadswig-9fc57f47bdf908c6f9546548acef8052c5a1bb89.tar.gz
Fix error in generated code for Python in MSVC 2019.
Visual Studio 2019 release builds: error C4703: potentially uninitialized local pointer variable 'p' used
Diffstat (limited to 'Lib/python/std_map.i')
-rw-r--r--Lib/python/std_map.i2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/python/std_map.i b/Lib/python/std_map.i
index 8ae483cef..e0b7d69dc 100644
--- a/Lib/python/std_map.i
+++ b/Lib/python/std_map.i
@@ -101,7 +101,7 @@
%#endif
res = traits_asptr_stdseq<map_type, std::pair<K, T> >::asptr(items, val);
} else {
- map_type *p;
+ map_type *p = 0;
swig_type_info *descriptor = swig::type_info<map_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = p;