[vtk-developers] Python warnings may be serious?
David Gobbi
david.gobbi at gmail.com
Fri Feb 5 18:57:10 EST 2010
On Fri, Feb 5, 2010 at 4:10 PM, Brad King <brad.king at kitware.com> wrote:
> 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
>
I'm way ahead of you, Brad. I committed my tweak a few hours ago ;)
- David
More information about the vtk-developers
mailing list