[vtk-developers] gcc warnings about empty if/while bodies
Will Schroeder
will.schroeder at kitware.com
Mon Jun 16 18:53:53 EDT 2008
Actually there is another verbose style that is useful when debugging:
while ()
{
;
}
W
On Mon, Jun 16, 2008 at 5:12 PM, Sean McBride <sean at rogue-research.com>
wrote:
> Hi all,
>
> Apple's newest gcc is giving warnings like:
>
> vtkOpenGLRenderWindow.cxx:458: warning: suggest a space before ';' or
> explicit braces around empty body in 'while' statement
>
> for code like:
>
> while(glGetError() != GL_NO_ERROR);
>
> There are only 100 or so; I could commit fixes. But what style of fix?
> Options:
>
> 1) while(glGetError() != GL_NO_ERROR) ;
>
> 2) while(glGetError() != GL_NO_ERROR) {};
>
> Of course, whitespace permutations are also possible. :) I vote 2.
>
> Thanks,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng sean at rogue-research.com
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
--
William J. Schroeder, PhD
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
518-371-3971 (phone and fax)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080616/24825784/attachment.html>
More information about the vtk-developers
mailing list