Missing braces? I don't see where
Missing braces? I don't see where
- Subject: Missing braces? I don't see where
- From: Steve Mills <email@hidden>
- Date: Tue, 27 Oct 2009 16:46:30 -0500
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};
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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