Actually never mind about trying that... It will end up being irrelevant.<br><br>The problem is that we were trying to use an enum type in the vtkGetMacro/vtkSetMacro paradigm. We can't do that in the public API of a vtkObject because the wrapper layers don't handle enum types properly. The types of the variables will be switched to "int" so that they are wrapped into tcl and python properly and this problem will go away as a result of that...<br>
<br>Sorry for the brief irrelevance.<br><br>Dave<br><br><br><br><div class="gmail_quote">On Thu, Jun 26, 2008 at 2:10 PM, David Cole <<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sean....<br><br>If you change the value in vtkTexture.h from "-1" to "0xFFFFFFFF" does the warning go away...?<br><br><br>Thx,<br>Dave<div><div></div><div class="Wj3C7c"><br><br><br><div class="gmail_quote">
On Thu, Jun 26, 2008 at 1:54 PM, David C Thompson <<a href="mailto:dcthomp@sandia.gov" target="_blank">dcthomp@sandia.gov</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Sorry, I hit send too soon... It would be nice to have the type safety<br>
there because when the ivars are declared as the enum type instead of<br>
"int" things like switch statements will generate warnings when an enum<br>
is not handled.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div><br>
> > I would suggest removing the enum name.<br>
> Would it be possible to change VTK_TEXTURE_BLENDING_MODE_NONE to a large<br>
> positive value? It would be nice to have the type safety in the Get/Set<br>
> methods.<br>
><br>
> David<br>
><br>
> ><br>
> > Jeff<br>
> ><br>
> > ---------- Forwarded message ----------<br>
> > From: Sean McBride <<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>><br>
> > Date: Thu, Jun 26, 2008 at 1:08 PM<br>
> > Subject: [vtk-developers] Recent change to vtkTexture.h adds compiler warnings<br>
> > To: <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
> ><br>
> ><br>
> > Hi all,<br>
> ><br>
> > Some warning flags produce far too many warnings with VTK's code but<br>
> > cause no problems for VTK's public headers. For this reason, we're able<br>
> > to enable more warnings in our app than with our dashboards. Up until<br>
> > very recently we were warning-free.<br>
> ><br>
> > This change:<br>
> > <<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Rendering/vtkTexture.h" target="_blank">http://public.kitware.com/cgi-bin/viewcvs.cgi/Rendering/vtkTexture.h</a>?<br>
> > r1=1.62&r2=1.63><br>
> ><br>
> > has introduced the warning (from gcc's -Wsign-promo):<br>
> ><br>
> > vtkTexture.h:171: warning: passing 'VTKTextureBlendingMode' chooses<br>
> > 'int' over 'unsigned int'<br>
> > vtkTexture.h:171: warning: in call to 'vtkOStreamWrapper&<br>
> > vtkOStreamWrapper::operator<<(int)'<br>
> > vtkTexture.h: In member function 'virtual void<br>
> > vtkTexture::SetBlendingMode(VTKTextureBlendingMode)':<br>
> ><br>
> > This was added:<br>
> ><br>
> > typedef enum<br>
> > {<br>
> > VTK_TEXTURE_BLENDING_MODE_NONE = -1,<br>
> > VTK_TEXTURE_BLENDING_MODE_REPLACE = 0,<br>
> > ...<br>
> > } VTKTextureBlendingMode;<br>
> ><br>
> > The compiler gets to decide the type and size of enums, which I guess is<br>
> > the root of the problem. One fix would be:<br>
> ><br>
> > enum<br>
> > {<br>
> > VTK_TEXTURE_BLENDING_MODE_NONE = -1,<br>
> > VTK_TEXTURE_BLENDING_MODE_REPLACE = 0,<br>
> > ...<br>
> > };<br>
> > typedef int VTKTextureBlendingMode;<br>
> ><br>
> > What are the coding standards in this situation? VTK actually seems to<br>
> > almost never give a name to enums (I found only 2 others) so another<br>
> > option would be to remove 'VTKTextureBlendingMode' entirely and use<br>
> > 'int' in place.<br>
> ><br>
> > --<br>
> > ____________________________________________________________<br>
> > Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a><br>
> > Rogue Research <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
> > Mac Software Developer Montréal, Québec, Canada<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > vtk-developers mailing list<br>
> > <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Jeff Baumes, Ph.D.<br>
> > R&D Engineer, Kitware Inc.<br>
> > (518) 371-3971 x132<br>
> > <a href="mailto:jeff.baumes@kitware.com" target="_blank">jeff.baumes@kitware.com</a><br>
> > _______________________________________________<br>
> > vtk-developers mailing list<br>
> > <a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
> > <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
> ><br>
<br>
<br>
_______________________________________________<br>
vtk-developers mailing list<br>
<a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a><br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>