Fix warning in generated code - traits_asptr.

Visual Studio 2015 debug builds:
error C4703: potentially uninitialized local pointer variable 'p' used
This commit is contained in:
William S Fulton 2017-06-13 19:02:59 +01:00
commit 82969b0755
5 changed files with 5 additions and 5 deletions

View file

@ -45,7 +45,7 @@ namespace swig {
template <class Type>
struct traits_asptr {
static int asptr(PyObject *obj, Type **val) {
Type *p;
Type *p = 0;
swig_type_info *descriptor = type_info<Type>();
int res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
if (SWIG_IsOK(res)) {