Fix error in generated code for Python in MSVC 2019.

Visual Studio 2019 release builds:
error C4703: potentially uninitialized local pointer variable 'p' used
This commit is contained in:
Daniel Emminizer 2019-08-29 09:10:41 -04:00
commit 9fc57f47bd
5 changed files with 6 additions and 6 deletions

View file

@ -47,7 +47,7 @@
res = get_pair(first, second, val);
}
} else {
value_type *p;
value_type *p = 0;
swig_type_info *descriptor = swig::type_info<value_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = *p;
@ -104,7 +104,7 @@
res = get_pair(first, second, val);
}
} else {
value_type *p;
value_type *p = 0;
swig_type_info *descriptor = swig::type_info<value_type>();
res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res) && val) *val = p;