Re: Unused Variables warnings with global consts.h header file
Re: Unused Variables warnings with global consts.h header file
- Subject: Re: Unused Variables warnings with global consts.h header file
- From: "Jan Barnholt" <email@hidden>
- Date: Mon, 28 Jan 2008 20:04:46 +0100 (MET)
Greg Guerin wrote:
> >const tTBButtonDefinition kTBButtonDef[kTBMaxConst] = {
> > { kTBCtrlIdxNew , "New.icns" , cmd_New },
> > { kTBCtrlIdxOpen , "Open.icns" , cmd_Open },
> > { kTBCtrlIdxSave , "Save.icns" , cmd_Save }
> >};
>
> What are the definitions for:
> kTBMaxConst?
> kTBCtrlIdxNew and cmd_New?
> kTBCtrlIdxOpen and cmd_Open?
> kTBCtrlIdxSave and cmd_Save?
>
> Can they be compiled as static values, or is code generated to initialize
> the array?
>
> Tracking those down may be informative.
Those are plain enum constants, however you nudged me in the right direction :-)
I've got rid of the warning by using const char kIconName[] constants in the kTBButtonDef declaration and changing the struct definition to use a const char*.
Seems like the compiler had to do some magic to assign the strings from the array declaration to the character array formerly used in my struct definition.
Thanks for the help!
best regards,
Jan
_______________________________________________
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