Does the warning go away if you enclose the entire definition in curly braces? Like this:<div><br></div><div><div>#define vtkESI_ExtendedTemplateMacro(t1, t2, call)\</div><div>  {\</div><div>  switch (t1)\</div><div>    {\</div>
<div>...</div><div>  }\</div><div>  }</div><div><br></div><br><div class="gmail_quote">On Fri, Dec 30, 2011 at 9:59 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When I compile with -Wshadow I get warnings in<br>
vtkExtractSelectedIds.cxx at line 504:<br>
<br>
Graphics/vtkExtractSelectedIds.cxx:504:7: error: declaration of<br>
‘VTK_TT’ shadows a previous local [-Werror=shadow]<br>
<br>
This line calls the vtkESI_ExtendedTemplateMacro (defined at line<br>
222). This has nested calls to vtkTemplateMacro (line 662 in<br>
vtkSetGet.h). The macro expands to:<br>
<br>
switch (idArrayType)<br>
{ case 11:<br>
 { typedef double VTK_TT; typedef VTK_TT VTK_TT1;<br>
   switch (labelArrayType) {<br>
       case 11: { typedef double VTK_TT;<br>
<br>
in which you can see VTK_TT is typedef'ed twice.<br>
<br>
Utkarsh - I believe you wrote these lines - any suggestions how to fix this?<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br></div>