incompatible pointer type warnings
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 (µsecondsSinceStartup);
...
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.