• 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: Spurious warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spurious warnings


  • Subject: Re: Spurious warnings
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 22 Jul 2008 11:15:21 -0400
  • Organization: Rogue Research

On 7/22/08 9:49 AM, Jan E. Schotsman said:

>HIRect	shapeBounds;
>
>drawRect = CGRectMake( 0.0f, 0.0f, shapeBounds.size.width,
>shapeBounds.size.height );
>
>warning: passing argument 1 of 'CGRectMake' as 'float' rather than
>'double' due to prototype
>warning: passing argument 2 of 'CGRectMake' as 'float' rather than
>'double' due to prototype
>warning: passing argument 3 of 'CGRectMake' as 'float' rather than
>'double' due to prototype
>warning: passing argument 4 of 'CGRectMake' as 'float' rather than
>'double' due to prototype
>
>CGGeometry.h:
>CG_INLINE CGRect CGRectMake(CGFloat x, CGFloat y, CGFloat width,
>CGFloat height);
>
>CGBase.h:
>typedef float CGFloat;
>
>HIRect is also made of float fields.

Also, don't forget that CGFloat is sometimes float and sometimes double,
depending if you're building for 32 or 64 bit.  This can be annoying
when you want to use constants like '0.0f'.  Should one use the 'f' or
not?  If you don't, you'll get warnings in 32 bit about implicit 64 to
32 bit conversions.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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: Spurious warnings
      • From: "Jan E. Schotsman" <email@hidden>
References: 
 >Re: Spurious warnings (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: Re: Spurious warnings
  • Next by Date: Is there an elegant way to get the URL (file:/// or http://) of the currently open documentation page?
  • Previous by thread: Re: Spurious warnings
  • Next by thread: Re: Spurious warnings
  • Index(es):
    • Date
    • Thread