This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Array Initialization warnings


When I compile this line of code

int JPEG_MRK_NTSC[4][4] =
{
0x01, 0x02, 0x03, 0x04,
0x05, 0x06, 0x07, 0x08,
0x09, 0x0a, 0x0b, 0x0c,
0x0d, 0x0e, 0x0f, 0x00
};

 with the -Wall option, I get the following warnings

vis.c:264: warning: missing braces around initializer
vis.c:264: warning: (near initialization for `JPEG_MRK_NTSC[0]')

If I look at the values of the array members during execution, they are 
correct.

Is this array really being initialized correctly?
Are the warnings correct?

Is there a way to 'turn off' these particular warnings with a compiler 
directive?

TIA

-- 
Best regards,
David Stroupe
Keyed-Up Software



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]