mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-24 23:52:43 +00:00
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.
This commit is contained in:
@@ -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]];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user