Brian Paul wrote:
> CVSROOT:      /cvs/mesa
> Module name:  Mesa
> Repository:   Mesa/src/mesa/tnl/
> Changes by:   [EMAIL PROTECTED]       06/10/18 17:36:57
> 
> Log message:
>   Fix a dangerous use of ASSERT in an else-clause not enclosed in braces.
>   We've been lucky if this hasn't been causing line rendering bugs.

Why is it dangerous?  It will evaluate to either

  if (x) blah; else assert(foo);

or
        
  if (x) blah; else ;

Neither form changes the meaning of any nearby expression.

In general it might be better to change the non-debug version of ASSERT 
to something like:

#define ASSERT(x) do { } while (0)

But in the case above I don't see there was a problem.

Keith

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to