Array Initialization warnings

David Stroupe dstroupe@keyed-upsoftware.com
Sat Apr 20 06:30:00 GMT 2002


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




More information about the Gcc-help mailing list