[MPlayer-cvslog] r32913 - trunk/gui/skin/font.c
Clément Bœsch
ubitux at gmail.com
Wed Feb 16 21:44:43 CET 2011
On Wed, Feb 16, 2011 at 06:40:17PM +0100, Ingo Brückl wrote:
> Clément Boesch wrote on Wed, 16 Feb 2011 18:28:40 +0100:
>
> >> +bmpFont * Fonts[MAX_FONTS] = {};
> >>
>
> > You must put a zero in it, or else the behaviour is compiler-specific.
>
> Sure? (I suppose you are.)
>
> K&R say: If there are fewer initializers for an array than the specified
> size, the others will be zero [...]
>
> No initializers seemed the fewest possible to me.
>
The grammar simply does not seem to tolerate empty initializer. So even if
some compilers allow it, it's not standard. Here is an example of a
non-tolerant one:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-July/093498.html
The K&R sentence is still valid, it just omits the fact that an
initializer is needed.
--
Clément B.
More information about the MPlayer-cvslog
mailing list