Re: Missing braces? I don't see where
Re: Missing braces? I don't see where
- Subject: Re: Missing braces? I don't see where
- From: Dave McCarthy <email@hidden>
- Date: Tue, 27 Oct 2009 18:03:35 -0400
Don't you need a semicolon after the brace that ends the namespace?On Oct 27, 2009, at 5:46 PM, Steve Mills wrote: Xcode 3.2 is complaining about missing braces. I added the ones I thought it needed, but it's still complaining. Can anyone figure out what it's going on about? The error-producing lines are at the bottom.
namespace PortLib { struct RGBCOMPONENT { COLORCOMPONENT red; COLORCOMPONENT green; COLORCOMPONENT blue; };
struct CMYKCOMPONENT { COLORCOMPONENT cyan; COLORCOMPONENT magenta; COLORCOMPONENT yellow; COLORCOMPONENT black; };
struct XYZCOMPONENT { COLORCOMPONENT x; COLORCOMPONENT y; COLORCOMPONENT z; };
struct GRAYCOMPONENT { COLORCOMPONENT gray; };
struct COLORDATA { COLORSPACE space; bool useCMYKValues; union { RGBCOMPONENT rgb; CMYKCOMPONENT cmyk; GRAYCOMPONENT gray; XYZCOMPONENT xyz; }; }; }
/depot/cmyk/creatortech/desktop/mac/C2Mac/../../../semiportlib/GraphicUIAll.cpp:191:0 /depot/cmyk/creatortech/desktop/mac/C2Mac/../../../semiportlib/GraphicUIAll.cpp:191: warning: missing braces around initializer for 'PortLib::RGBCOMPONENT' COLORDATA backgroundColor = { kRGBSpace, false, {0xFFFF, 0xFFFF, 0xFFFF} };
The code previously didn't have the brackets around the three 0xffff's, so I added them thinking it would fix the warning. It's still complains.
Then there are a bunch of these, which has always been a legal way of initting the entire struct to 0 as far as I've known:
/depot/cmyk/creatortech/desktop/mac/C2Mac/../../../../commonutils/dogbert/source/FileUtils.cp:1252:0 Missing braces around initializer for 'HFileInfo'
CInfoPBRec param = {0};
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden