• 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
incompatible pointer type warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incompatible pointer type warnings


  • Subject: incompatible pointer type warnings
  • From: Tom Bernard <email@hidden>
  • Date: Mon, 31 May 2004 14:33:27 -0600

Though my application works, I am getting the following warnings, leading me
to fear future incompatibility:


MicrosecondsController.m:70: assignment from incompatible pointer type
MicrosecondsController.m:72: passing arg 1 of `decimalNumberByAdding:' from
incompatible pointer type


The relevant code:

@interface MicrosecondsController : NSObject
{
NSDecimalNumber *twoToThe32nd, *oneMillion, *microsecondsDN;
}
...



@implementation MicrosecondsController

- (void)calculateTimeSinceStartup
{
Microseconds (&microsecondsSinceStartup);
...

microsecondsDN = [NSDecimalNumber numberWithUnsignedLong:(unsigned
long)microsecondsSinceStartup.hi];

microsecondsDN = [microsecondsDN
decimalNumberByMultiplyingBy:twoToThe32nd];


microsecondsDN = [microsecondsDN decimalNumberByAdding:[NSDecimalNumber
numberWithUnsignedLong:(unsigned long)microsecondsSinceStartup.lo]];

...
}



I want to initialize microsecondsDN to the microseconds since startup. Then
I perform calculations with microsecondsDN to determine the seconds since
startup and the date at startup.

What is the best way to do this?

I was using UInt64 variables and the U64 math functions. That broke when
UnsignedWideToUInt64() went away.

The complete code is at
http://bersearch.com/TomsCocoaSoftware/Microseconds/Microseconds.sit


TIA


Tom Bernard
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: RE: NSImageView and animated GIFs
  • Previous by thread: RE: NSImageView and animated GIFs
  • Index(es):
    • Date
    • Thread