[openbeosstorage] Re: Open-beos-cvs digest, Vol 1 #1359 - 5 msgs

  • From: Tyler Dauwalder <tyler@xxxxxxxxxxxxx>
  • To: openbeosstorage@xxxxxxxxxxxxx
  • Date: Fri, 17 Jan 2003 00:24:29 -0800

> > I would suggest you to "fix" the silent TRACE macro to:
> > #define TRACE(x) ;
> >
> > If you don't have this semicolon in there, you can easily produce 
> > code
> > that behaves different with both marco definitions, for example:
> >
> > if (xyz)
> >    TRACE(abc)
> >
> > a =3D b;
> >
> > Of course this would require you to don't use the ";" at the end of 
> > the
> > line which might be highly unlikely, but it still could happen (and 
> > the
> > compiler wouldn't complain at all). Those bugs are easy to make and
> > often hard to track down.
> 
> I personally find it, er, sort of frightening, if there is no `;' at 
> the
> end of a line that looks like a statement -- apparently a lesson 
> learned
> when starting with programming languages -- and thus it virtually 
> never
> happens, that I miss one. :-) I guess, that's why I didn't cared, when
> introducing the macro in the first module (I bet, Tyler just copied 
> it. Thief, thief! ;-). 

"Thievery is next to laziness is next to godliness", isn't that how the 
saying goes... ;-)

> But you're of course right, to define it to `;' is
> sensible.

I went ahead and changed them all to `;'. I shrank the licenses, too.

-Tyler

Other related posts: