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:
parent
8855ef2b48
commit
82969b0755
5 changed files with 5 additions and 5 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue