[FFmpeg-devel] [VOTE] Multiple inclusion guards in headers

Michael Niedermayer michaelni
Mon Aug 18 13:43:38 CEST 2008


On Mon, Aug 18, 2008 at 10:08:26AM +0200, Diego Biurrun wrote:
> On Mon, Aug 18, 2008 at 09:33:42AM +0200, Reimar Doeffinger wrote:
> > On Mon, Aug 18, 2008 at 08:59:50AM +0200, Diego Biurrun wrote:
> > > On Mon, Aug 18, 2008 at 08:49:31AM +0200, Reimar Doeffinger wrote:
> > > > On Sun, Aug 17, 2008 at 07:17:22PM +0200, Michael Niedermayer wrote:
> > > > > This is the second issue id like to see clarified
> > > > > 
> > > > > Do we require headers that do not need multiple inclusion guards out of
> > > > > technical reasons to have multiple inclusion guards?
> > > > > technical here is speed, compiler warnings or errors, or spec compliance
> > > > > 
> > > > > 
> > > > > My vote is of course, no, as it makes the headers bigger and thus means
> > > > > more to read aka worse readability.
> > > > 
> > > > I do not think the overhead of these is significant and avoids the annoyance
> > > > of possibly having to add them later.
> > > > I am against making a big deal about it though, this is nothing critical and
> > > > while everyone should make an effort to remember adding them, forgetting
> > > > it should not lead to flaming - IMO it might be a good idea to here "discard"
> > > > the normal commit rules and allow everyone to add them without sending a patch first...

I dont mind if others add these lines, i mind if people are being asked to do
it for files that clearly do not need them. I like to spend my time with
usefull things, fixing bugs, adding features, reviewing patches, maybe
occasionally helping a user or something totally unrelated to ffmpeg. But
* reading a extra mail
* opening editor
* add 3 lines
* safe
* svn di
* test compile
* svn ci
* reply to complaint

because of this, really is annoying



[...]
> or two things to keep in mind when adding a new file.  If this is too
> hard (is it really?), we can add a checklist, similar to the new codec
> checklist.

I really would prefer if we do not need a checklist for every little thing
adding a codec is a task where a checklist makes sense. Adding a new header
is something the average C developer should be able to do without such a
list.
I do not mind rules for improved readability, to reduce bugs, to make code
faster and cleaner. But i do not like rules and checklists about minor
cosmetic issues. And these guards are just a cosmetic issue for many
small headers.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080818/1eacddad/attachment.pgp>



More information about the ffmpeg-devel mailing list