[vtk-developers] Warning in vtkExtractSelectedIds

David Cole david.cole at kitware.com
Fri Dec 30 10:12:35 EST 2011


Does the warning go away if you enclose the entire definition in curly
braces? Like this:

#define vtkESI_ExtendedTemplateMacro(t1, t2, call)\
  {\
  switch (t1)\
    {\
...
  }\
  }


On Fri, Dec 30, 2011 at 9:59 AM, David Doria <daviddoria at gmail.com> wrote:

> When I compile with -Wshadow I get warnings in
> vtkExtractSelectedIds.cxx at line 504:
>
> Graphics/vtkExtractSelectedIds.cxx:504:7: error: declaration of
> ‘VTK_TT’ shadows a previous local [-Werror=shadow]
>
> This line calls the vtkESI_ExtendedTemplateMacro (defined at line
> 222). This has nested calls to vtkTemplateMacro (line 662 in
> vtkSetGet.h). The macro expands to:
>
> switch (idArrayType)
> { case 11:
>  { typedef double VTK_TT; typedef VTK_TT VTK_TT1;
>   switch (labelArrayType) {
>       case 11: { typedef double VTK_TT;
>
> in which you can see VTK_TT is typedef'ed twice.
>
> Utkarsh - I believe you wrote these lines - any suggestions how to fix
> this?
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20111230/3dd48735/attachment.html>


More information about the vtk-developers mailing list