[FFmpeg-devel] [PATCH] Remove final semicolons from get_bits macros

Michael Niedermayer michaelni
Sun Feb 21 03:58:18 CET 2010


On Sun, Feb 21, 2010 at 02:43:46AM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Sun, Feb 21, 2010 at 01:19:16AM +0000, M?ns Rullg?rd wrote:
> >> Mans Rullgard <mans at mansr.com> writes:
> >> 
> >> > Some of the macros in get_bits.h include a final semicolon.  This
> >> > removes them and adds semicolons as necessary where these macros
> >> > are invoked.
> >> >
> >> > Tested with all three readers.
> >> > ---
> >> >  libavcodec/get_bits.h |  118 ++++++++++++++++++++++++------------------------
> >> >  libavcodec/mjpegdec.c |   24 +++++-----
> >> >  2 files changed, 71 insertions(+), 71 deletions(-)
> >> 
> >> ping
> >
> > I prefer them with the semicolons as they are
> > They are blocks of code not single statements
> > This of course is arguably a bikeshed issue but to me
> >
> > if(X)
> >     MAKRO()
> >
> > reminds me that i forgot something
> > while
> >
> > if(X)
> >     MAKRO();
> >
> > looks like a function call
> > and then someone will argue that we need
> > do{
> > }while(0)
> 
> Which we should, dammit.

i dont like red tape
it just makes markos behave like something that they are not


> 
> I've tripped over those bizarre semicolons of yours too many times.

and at least i would be tripping over the alternative too many times

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

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- 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/20100221/5963d169/attachment.pgp>



More information about the ffmpeg-devel mailing list