[gst-devel] Re: [gst-cvs] thomasvs gst-ffmpeg: gst-ffmpeg/ext/ffmpeg/

Wayne Meissner wmeissner at gmail.com
Sun Oct 2 21:49:51 CEST 2005


David Schleef wrote:
> On Sat, Oct 01, 2005 at 12:06:43PM +0200, Thomas Vander Stichele wrote:

>>Me too.  Do you know which ? When I asked nobody could give me a
>>definitive answer, and IIRC there are lots of places in the core where
>>{ } is used, so I'd prefer to have the same style anywhere.
>>
>>If you know more info about this, please let me know.
> 
> 
> As { } blocks are required by C89, I'd be highly surprised if there are
> any interesting compilers these days that don't support it.

I remember the do { ... } while(0) in macros coming up on another list, 
and it basically boiled down to:

#define FOO() do { ... } while(0)

if (xxx)
	FOO();
else
         bar();

If you only use { }, then the above doesn't compile.  If you never use 
conditional blocks without braces anyway, then it probably doesn't matter.

See: http://www.monkey.org/openbsd/archive/misc/0204/msg00610.html




More information about the gstreamer-devel mailing list