Re: [PATCH 1/1] kernel/sched.c: Fix array initialization typo

From: Valdis . Kletnieks
Date: Tue Jun 14 2011 - 14:49:18 EST


On Sun, 12 Jun 2011 15:31:07 MDT, Jean Sacren said:
> The fix makes certain so that the size of the initialized arrays doesn't
> go beyond the boundary set by the array size of 40.

Did you notice that gcc as far back as 3.4.6 will whinge *anyhow*
if you have too many initializers?

% cat > test9.c
int foo[5] = { 0, 1, 2, 3, 4, 5, 6};
^D
% gcc -c test9.c
test9.c:1:1: warning: excess elements in array initializer [enabled by default]
test9.c:1:1: warning: (near initialization for 'foo') [enabled by default]
test9.c:1:1: warning: excess elements in array initializer [enabled by default]
test9.c:1:1: warning: (near initialization for 'foo') [enabled by default]

Attachment: pgp00000.pgp
Description: PGP signature