• 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
Re: Unused Variables warnings with global consts.h header file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unused Variables warnings with global consts.h header file


  • Subject: Re: Unused Variables warnings with global consts.h header file
  • From: Greg Guerin <email@hidden>
  • Date: Mon, 28 Jan 2008 11:28:05 -0700

Jan Barnholt wrote:

>Unfortunately that doesn't change a thing, the warning keeps popping up.
>And it still strikes me odd that these lines don't give a warning
>
>const RGBColor kColMode_BW_BgCol        = {0xFF<<8, 0xFF<<8, 0xFF<<8},
>                                        kColMode_BW_FgCol       =
>{0x11<<8, 0x11<<8, 0x11<<8};

That initializer expression isn't dependent on anything other than
RGBColor, and can be compiled to static values (initialized static storage).

Compare and contrast:
>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.

  -- GG


 _______________________________________________
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

  • Prev by Date: Re: Unused Variables warnings with global consts.h header file
  • Next by Date: Re: Unused Variables warnings with global consts.h header file
  • Previous by thread: Re: Unused Variables warnings with global consts.h header file
  • Next by thread: Re: Unused Variables warnings with global consts.h header file
  • Index(es):
    • Date
    • Thread