Closed mwoehlke-kitware closed 8 years ago
I'll accept this, since the commit is harmless and since it resolved the warning. But I don't think there can be any problems here since either swig_ptr
is set or mexErrMsgIdAndTxt
will terminate the execution.
Thanks. I think the real problem is that mexErrMsgIdAndTxt
isn't marked [[noreturn]]
, so the compiler has no way of knowing that it will terminate execution... which makes life not so fun for anyone using -Werror
, as we are.
I see, that makes sense. Thanks for fixing this!
Explicitly initialize the
SwigPtr
inSWIG_Matlab_NewPointerObj
to null. This fixes a-wmaybe-uninitialized
warning, because the pointer may or may not be initialized bySWIG_Matlab_NewPointer
, and is used later in the function.