• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Missing braces? I don't see where
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Missing braces? I don't see where
      • From: Chris Espinosa <email@hidden>
    • Re: Missing braces? I don't see where
      • From: Chris Suter <email@hidden>
    • Re: Missing braces? I don't see where
      • From: Dan Korn <email@hidden>
    • Re: Missing braces? I don't see where
      • From: Dave McCarthy <email@hidden>
  • Prev by Date: Re: Prevent dsymutil from running at the end of a release build?
  • Next by Date: Re: Missing braces? I don't see where
  • Previous by thread: Dynamic cast failing in dynamically loaded plugin on os x 10.6
  • Next by thread: Re: Missing braces? I don't see where
  • Index(es):
    • Date
    • Thread