Fix warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
Those are all log formatting routines that assume pointers are unsigned int, for display purpose. Replace the cast with the native '%p' token from NSString::stringWithFormat that's provided for pointer address output.pull/201/head
parent
478b313122
commit
022fd81474
|
@ -1046,8 +1046,8 @@
|
|||
if (nameInContainer)
|
||||
[_ms appendFormat:@" name=%@", nameInContainer];
|
||||
if (container)
|
||||
[_ms appendFormat:@" container=0x%08X/%@",
|
||||
(unsigned int)container, [container valueForKey:@"nameInContainer"]];
|
||||
[_ms appendFormat:@" container=%p/%@",
|
||||
container, [container valueForKey:@"nameInContainer"]];
|
||||
}
|
||||
|
||||
- (NSString *) description
|
||||
|
@ -1055,7 +1055,7 @@
|
|||
NSMutableString *ms;
|
||||
|
||||
ms = [NSMutableString stringWithCapacity:64];
|
||||
[ms appendFormat:@"<0x%08X[%@]:", (unsigned int) self, NSStringFromClass([self class])];
|
||||
[ms appendFormat:@"<%p[%@]:", self, NSStringFromClass([self class])];
|
||||
[self appendAttributesToDescription:ms];
|
||||
[ms appendString:@">"];
|
||||
|
||||
|
@ -1064,8 +1064,8 @@
|
|||
|
||||
- (NSString *) loggingPrefix
|
||||
{
|
||||
return [NSString stringWithFormat:@"<0x%08X[%@]:%@>",
|
||||
(unsigned int) self, NSStringFromClass([self class]),
|
||||
return [NSString stringWithFormat:@"<%p[%@]:%@>",
|
||||
self, NSStringFromClass([self class]),
|
||||
[self nameInContainer]];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue