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

On Thu, 16 Jan 2003, Axel =?iso-8859-1?q?D=F6rfler ?= wrote:

>
> Tyler wrote:
> > + Added licenses
> > ...
> > +//------------------------------------------------------------------
> > ------------
> > +// Copyright (c) 2001-2002, OpenBeOS
> > +//
>
> Although you've obviously realized it yourself during the update, we
> already have 2003 :-)
> Anyway, do you really think we need that big fat license at the top of
> every file=3F I really prefer the short "distrubuted under the terms of
> the OpenBeOS license" phrase more which we have used for everything
> else in the kernel to date.

Wouldn't it be really great, if the admin team would vote or otherwise
decide for a file header, that is to be used for the each project file?
:-P I think, I saw at least four different versions (not counting the
empty string).

> > -//#define TRACE(x)
> > -#define TRACE(x) dprintf x
> > +#define TRACE(x)
> > +//#define TRACE(x) dprintf x
>
> 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! ;-). But you're of course right, to define it to `;' is
sensible.

CU, Ingo


Other related posts: