[vtk-developers] Python warnings may be serious?

Brad King brad.king at kitware.com
Fri Feb 5 18:10:51 EST 2010


David,

Bill Lorensen wrote:
> I noticed these warnings on the dashboard related to python.
> http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=532372
> 
> Can you check to see if they are valid?

FYI, those come from code of this form:

  char     temp20;
  ...
  return PyString_FromStringAndSize((char *)&temp20,1);

The warning is incorrect in this case.  The return value is the
result of evaluating the function, and the local variable is in
scope throughout evaluation of the function.  Of course the
compiler cannot know whether the function is returning a pointer
to memory it got from its argument, so it is not too wrong in
flagging the case.

The warning can be suppressed or worked around by tweaking the
python wrapper generator.

-Brad



More information about the vtk-developers mailing list