[vtk-developers] Some interesting warnings from the clang compiler

Bill Lorensen bill.lorensen at gmail.com
Thu Jul 29 17:27:26 EDT 2010


That's a great warning. Looking at the code, obviously an error. Nice
catch clang... I think that code has been wrong since it was written
over 11 years ago. Guess it was never tested. Nor has 35% of vtk.

Bill

On Thu, Jul 29, 2010 at 9:26 AM, Michael Halle <mhalle at bwh.harvard.edu> wrote:
> Originally, C supported syntax like =- as a synonym for -=, but deprecated it because it was error prone (it relied on whitespace for disambiguation). I think that's what the warning means. Just put spaces around the equals sign.
>
> -Mike
>
>
>
> On Jul 29, 2010, at 8:56 AM, David Gobbi <david.gobbi at gmail.com> wrote:
>
>> The clang compiler has found some interesting warnings.  Can someone
>> look into the vtkFunctionParser one?  I'll deal with the Tcl wrapper
>> ones.
>>
>> vtk-git/Common/vtkFunctionParser.cxx:555:36: warning: use of unary
>> operator that may be intended as compound assignment (-=)
>>         this->Stack[stackPosition] =- this->Stack[stackPosition];
>>
>> vtk-git-clang/Common/vtkObjectTcl.cxx:153:27: warning: conversion
>> specifies type 'unsigned short' but the argument has type 'int'
>> [-Wformat]
>>     sprintf(tempResult,"%hu",temp20);
>> [ditto for several other tcl-wrapped objects]
>>
>> Full list here:
>>
>> http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=678985
>>
>>  David
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list