Fix various incorrect format string types

This commit is contained in:
Frederik Seiffert 2021-08-10 18:49:29 +02:00 committed by Frederik Seiffert
parent 87dc8ab70c
commit 27c06a9209
14 changed files with 102 additions and 96 deletions

View file

@ -1525,8 +1525,8 @@ setNonBlocking(SOCKET fd)
- (NSString*) description
{
return [NSString stringWithFormat: @"%@ sock %d loopID %p",
[super description], _sock, _loopID];
return [NSString stringWithFormat: @"%@ sock %lld loopID %p",
[super description], (long long)_sock, _loopID];
}
- (id) init
@ -2077,7 +2077,7 @@ setNonBlocking(SOCKET fd)
#ifndef NDEBUG
else
{
NSDebugMLLog(@"NSStream", @"%@ EVENTS 0x%x",
NSDebugMLLog(@"NSStream", @"%@ EVENTS 0x%lx",
self, events.lNetworkEvents);
}
#endif
@ -2539,7 +2539,7 @@ setNonBlocking(SOCKET fd)
#ifndef NDEBUG
else
{
NSDebugMLLog(@"NSStream", @"%@ EVENTS 0x%x",
NSDebugMLLog(@"NSStream", @"%@ EVENTS 0x%lx",
self, events.lNetworkEvents);
}
#endif

View file

@ -1022,8 +1022,9 @@ descriptorOrComparator: (id)descriptorOrComparator
r1 = runStack[i];
r2 = runStack[i+1];
NSDebugMLLog(@"GSTimSort",
@"Merging stack location %lu (stack size: %lu, run %@ with %@)", i,
stackSize, NSStringFromRange(r1), NSStringFromRange(r2));
@"Merging stack location %lu (stack size: %lu, run %@ with %@)",
(unsigned long)i, (unsigned long)stackSize,
NSStringFromRange(r1), NSStringFromRange(r2));
/* Do some housekeeping on the stack: We combine the two runs
* being merged and move around the last run on the stack
@ -1050,7 +1051,7 @@ descriptorOrComparator: (id)descriptorOrComparator
}
NSDebugMLLog(@"GSTimSort",
@"Insertion point for r2 in r1: %lu, r1 for the merge is now %@.",
insert, NSStringFromRange(r1));
(unsigned long)insert, NSStringFromRange(r1));
// Find an insertion point for the last element of r1 into r2. Subtracting the
// location from that point gives us the length of the subrange we need to

View file

@ -119,7 +119,7 @@
{
NSString *s;
s = [NSString stringWithFormat: @"%4ld", [components year]];
s = [NSString stringWithFormat: @"%4ld", (long)[components year]];
result = [result stringByAppendingString: s];
}
@ -161,7 +161,7 @@
{
NSString *s;
s = [NSString stringWithFormat: @"%2ld", [components month]];
s = [NSString stringWithFormat: @"%2ld", (long)[components month]];
result = [result stringByAppendingString: s];
}
@ -203,7 +203,7 @@
{
NSString *s;
s = [NSString stringWithFormat: @"%2ld", [components day]];
s = [NSString stringWithFormat: @"%2ld", (long)[components day]];
result = [result stringByAppendingString: s];
}
@ -245,7 +245,7 @@
{
NSString *s;
s = [NSString stringWithFormat: @"%2ld", [components hour]];
s = [NSString stringWithFormat: @"%2ld", (long)[components hour]];
result = [result stringByAppendingString: s];
}
@ -287,7 +287,7 @@
{
NSString *s;
s = [NSString stringWithFormat: @"%2ld", [components minute]];
s = [NSString stringWithFormat: @"%2ld", (long)[components minute]];
result = [result stringByAppendingString: s];
}
@ -329,7 +329,7 @@
{
NSString *s;
s = [NSString stringWithFormat: @"%2ld", [components second]];
s = [NSString stringWithFormat: @"%2ld", (long)[components second]];
result = [result stringByAppendingString: s];
}

View file

@ -844,7 +844,7 @@ GS_ROOT_CLASS @interface GSDistantObjectPlaceHolder
{
if (debug_proxy > 3)
NSLog(@"retain count for connection (%p) is now %lx\n",
_connection, [_connection retainCount]);
_connection, (unsigned long)[_connection retainCount]);
/*
* A proxy for local object retains its target - so we release it.
* For a local object the connection also retains this proxy, so we

View file

@ -1265,12 +1265,12 @@ GSPrivateReturnAddresses(NSUInteger **returns)
if ((fromSym)(hProcess, (DWORD64)addr, 0, symbol))
{
syms[i] = [NSString stringWithFormat:
@"%s - %p", symbol->Name, addr];
@"%s - %lx", symbol->Name, (unsigned long)addr];
}
else
{
syms[i] = [NSString stringWithFormat:
@"unknown - %p", addr];
@"unknown - %lx", (unsigned long)addr];
}
}
GS_MUTEX_UNLOCK(traceLock);

View file

@ -3752,8 +3752,8 @@ static NSSet *fileKeys = nil;
DWORD dwErrorCode = 0;
dwErrorCode = GetLastError();
NSDebugMLog(@"Error %d getting file handle for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu getting file handle for '%ls'",
dwErrorCode, (const unichar *)_path);
return group;
}
@ -3776,8 +3776,8 @@ static NSSet *fileKeys = nil;
DWORD dwErrorCode = 0;
dwErrorCode = GetLastError();
NSDebugMLog(@"Error %d getting security info for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu getting security info for '%ls'",
dwErrorCode, (const unichar *)_path);
return group;
}
@ -3798,17 +3798,18 @@ static NSSet *fileKeys = nil;
dwErrorCode = GetLastError();
if (dwErrorCode == ERROR_NONE_MAPPED)
NSDebugMLog(@"Error %d in LookupAccountSid for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu in LookupAccountSid for '%ls'",
dwErrorCode, (const unichar *)_path);
else
NSDebugMLog(@"Error %d getting security info for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu getting security info for '%ls'",
dwErrorCode, (const unichar *)_path);
return group;
}
if (accountSize >= 1024)
{
NSDebugMLog(@"Account name for '%S' is unreasonably long", _path);
NSDebugMLog(@"Account name for '%ls' is unreasonably long",
(const unichar *)_path);
return group;
}
return [NSString stringWithCharacters: account length: accountSize];
@ -3918,8 +3919,8 @@ static NSSet *fileKeys = nil;
DWORD dwErrorCode = 0;
dwErrorCode = GetLastError();
NSDebugMLog(@"Error %d getting file handle for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu getting file handle for '%ls'",
dwErrorCode, (const unichar *)_path);
return owner;
}
@ -3942,8 +3943,8 @@ static NSSet *fileKeys = nil;
DWORD dwErrorCode = 0;
dwErrorCode = GetLastError();
NSDebugMLog(@"Error %d getting security info for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu getting security info for '%ls'",
dwErrorCode, (const unichar *)_path);
return owner;
}
@ -3964,17 +3965,18 @@ static NSSet *fileKeys = nil;
dwErrorCode = GetLastError();
if (dwErrorCode == ERROR_NONE_MAPPED)
NSDebugMLog(@"Error %d in LookupAccountSid for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu in LookupAccountSid for '%ls'",
dwErrorCode, (const unichar *)_path);
else
NSDebugMLog(@"Error %d getting security info for '%S'",
dwErrorCode, _path);
NSDebugMLog(@"Error %lu getting security info for '%ls'",
dwErrorCode, (const unichar *)_path);
return owner;
}
if (accountSize >= 1024)
{
NSDebugMLog(@"Account name for '%S' is unreasonably long", _path);
NSDebugMLog(@"Account name for '%ls' is unreasonably long",
(const unichar *)_path);
return owner;
}
return [NSString stringWithCharacters: account length: accountSize];

View file

@ -108,7 +108,7 @@ static SEL remSel;
reason = [NSString stringWithFormat:
@"Index %"PRIuPTR" is out of range %lu (in '%@')",
index, count, NSStringFromSelector(sel)];
index, (unsigned long)count, NSStringFromSelector(sel)];
exception = [NSException exceptionWithName: NSRangeException
reason: reason

View file

@ -1139,7 +1139,7 @@ static void determineOperatingSystem()
* use the information from NSBundle and only get the version info
* here.
*/
_operatingSystemVersion = [[NSString alloc] initWithFormat: @"%d.%d",
_operatingSystemVersion = [[NSString alloc] initWithFormat: @"%lu.%lu",
osver.dwMajorVersion, osver.dwMinorVersion];
#else
#if defined(HAVE_SYS_UTSNAME_H)

View file

@ -271,7 +271,7 @@
*/
- (NSString*) description
{
return [NSString stringWithFormat: @"<%s %lx>",
return [NSString stringWithFormat: @"<%s %zx>",
GSClassNameFromObject(self), (size_t)self];
}

View file

@ -481,15 +481,15 @@ static Class runLoopClass;
if (d == INVALID_SOCKET)
{
NSLog(@"illegal descriptor (%d) for Tcp Handle", d);
NSLog(@"illegal descriptor (%lld) for Tcp Handle", (long long)d);
return nil;
}
#ifdef _WIN32
dummy = 1;
if (ioctlsocket(d, FIONBIO, &dummy) == SOCKET_ERROR)
{
NSLog(@"unable to set non-blocking mode on %d - %@",
d, [NSError _last]);
NSLog(@"unable to set non-blocking mode on %lld - %@",
(long long)d, [NSError _last]);
return nil;
}
#else /* !_WIN32 */
@ -688,8 +688,8 @@ static Class runLoopClass;
else
{
gotAddr = YES;
NSDebugMLLog(@"GSTcpHandle", @"Connecting to %@:%d using desc %d",
addr, [aPort portNumber], desc);
NSDebugMLLog(@"GSTcpHandle", @"Connecting to %@:%d using desc %lld",
addr, [aPort portNumber], (long long)desc);
}
}
@ -770,7 +770,8 @@ static Class runLoopClass;
if (setsockopt(desc, SOL_SOCKET, SO_KEEPALIVE, (char*)&status,
(OPTLEN)sizeof(status)) < 0)
{
NSLog(@"failed to turn on keepalive for connected socket %d", desc);
NSLog(@"failed to turn on keepalive for connected socket %lld",
(long long)desc);
}
addrNum = 0;
caller = YES;
@ -794,8 +795,8 @@ static Class runLoopClass;
- (NSString*) description
{
return [NSString stringWithFormat: @"<Handle %p (%d) to %@>",
self, desc, GSPrivateSockaddrName(&sockAddr)];
return [NSString stringWithFormat: @"<Handle %p (%lld) to %@>",
self, (long long)desc, GSPrivateSockaddrName(&sockAddr)];
}
- (int) descriptor
@ -1531,7 +1532,7 @@ static Class runLoopClass;
}
if (ocurredEvents.lNetworkEvents)
{
NSLog(@"Event not get %d", ocurredEvents.lNetworkEvents);
NSLog(@"Event not get %ld", ocurredEvents.lNetworkEvents);
abort();
}
@ -1573,8 +1574,8 @@ static Class runLoopClass;
NSAssert([components count] > 0, NSInternalInconsistencyException);
NSDebugMLLog(@"GSTcpHandle",
@"Sending message %p %@ on %p(%d) before %@",
components, components, self, desc, when);
@"Sending message %p %@ on %p(%lld) before %@",
components, components, self, (long long)desc, when);
M_LOCK(myLock);
[wMsgs addObject: components];
@ -2383,8 +2384,8 @@ static Class tcpPortClass;
if (setsockopt(desc, SOL_SOCKET, SO_KEEPALIVE, (char*)&status,
(OPTLEN)sizeof(status)) < 0)
{
NSLog(@"failed to turn on keepalive for accepted socket %d",
desc);
NSLog(@"failed to turn on keepalive for accepted socket %lld",
(long long)desc);
}
#if defined(_WIN32)
// reset associated event with new socket
@ -2438,7 +2439,7 @@ static Class tcpPortClass;
#endif
else if (type == ET_RPORT) t = "rport";
else t = "unknown";
NSLog(@"No handle for event %s on descriptor %d", t, desc);
NSLog(@"No handle for event %s on descriptor %lld", t, (long long)desc);
}
else
{

View file

@ -2103,7 +2103,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
if (e != ERROR_BROKEN_PIPE && e != ERROR_HANDLE_EOF)
{
NSLog(@"pipe peek problem %d, %@", e, [NSError _last]);
NSLog(@"pipe peek problem %lu: %@", e, [NSError _last]);
return;
}
/* In the case of a broken pipe, we fall through so that a read
@ -2300,7 +2300,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
if (type != ET_HANDLE)
{
NSLog(@"Argh, TRIGGER on socket %"PRIuPTR" %"PRIuPTR
" %@ with event %u desc %u",
" %@ with event %"PRIuPTR" desc %"PRIuPTR,
(uintptr_t)data, (uintptr_t)extra, mode, (uintptr_t)event,
(uintptr_t)descriptor);
/*
@ -2318,42 +2318,42 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
}
if (ocurredEvents.lNetworkEvents & FD_CONNECT)
{
NSDebugMLLog(@"NSFileHandle", @"Connect on %x", extra);
NSDebugMLLog(@"NSFileHandle", @"Connect on %p", extra);
ocurredEvents.lNetworkEvents ^= FD_CONNECT;
[self receivedEventWrite];
GSPrivateNotifyASAP(mode);
}
if (ocurredEvents.lNetworkEvents & FD_ACCEPT)
{
NSDebugMLLog(@"NSFileHandle", @"Accept on %x", extra);
NSDebugMLLog(@"NSFileHandle", @"Accept on %p", extra);
ocurredEvents.lNetworkEvents ^= FD_ACCEPT;
[self receivedEventRead];
GSPrivateNotifyASAP(mode);
}
if (ocurredEvents.lNetworkEvents & FD_WRITE)
{
NSDebugMLLog(@"NSFileHandle", @"Write on %x", extra);
NSDebugMLLog(@"NSFileHandle", @"Write on %p", extra);
ocurredEvents.lNetworkEvents ^= FD_WRITE;
[self receivedEventWrite];
GSPrivateNotifyASAP(mode);
}
if (ocurredEvents.lNetworkEvents & FD_READ)
{
NSDebugMLLog(@"NSFileHandle", @"Read on %x", extra);
NSDebugMLLog(@"NSFileHandle", @"Read on %p", extra);
ocurredEvents.lNetworkEvents ^= FD_READ;
[self receivedEventRead];
GSPrivateNotifyASAP(mode);
}
if (ocurredEvents.lNetworkEvents & FD_OOB)
{
NSDebugMLLog(@"NSFileHandle", @"OOB on %x", extra);
NSDebugMLLog(@"NSFileHandle", @"OOB on %p", extra);
ocurredEvents.lNetworkEvents ^= FD_OOB;
[self receivedEventRead];
GSPrivateNotifyASAP(mode);
}
if (ocurredEvents.lNetworkEvents & FD_CLOSE)
{
NSDebugMLLog(@"NSFileHandle", @"Close on %x", extra);
NSDebugMLLog(@"NSFileHandle", @"Close on %p", extra);
ocurredEvents.lNetworkEvents ^= FD_CLOSE;
if ([writeInfo count] > 0)
{
@ -2367,7 +2367,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
}
if (ocurredEvents.lNetworkEvents)
{
NSLog(@"Event not get %d", ocurredEvents.lNetworkEvents);
NSLog(@"Event not get %ld", ocurredEvents.lNetworkEvents);
abort();
}
}
@ -2440,7 +2440,7 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
}
else
{
NSLog(@"unable to set pipe non-blocking mode to %s - %d",
NSLog(@"unable to set pipe non-blocking mode to %s - %lu",
(YES == flag ? "YES" : "NO"), GetLastError());
}
return;

View file

@ -348,8 +348,8 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
port_hd_array = malloc(sizeof(NSInteger)*port_hd_size);
[port getFds: port_hd_array count: &port_hd_count];
}
NSDebugMLLog(@"NSRunLoop", @"listening to %d port handles",
port_hd_count);
NSDebugMLLog(@"NSRunLoop", @"listening to %ld port handles",
(long)port_hd_count);
while (port_hd_count--)
{
NSMapInsert(handleMap,
@ -587,7 +587,7 @@ static const NSMapTableValueCallBacks WatcherMapValueCallBacks =
}
else
{
NSDebugMLLog(@"NSRunLoop", @"unexpected result %d", wait_return);
NSDebugMLLog(@"NSRunLoop", @"unexpected result %lu", wait_return);
GSPrivateNotifyASAP(mode);
completed = NO;
return NO;

View file

@ -214,7 +214,7 @@ static Class messagePortClass = 0;
toRunLoop: (NSRunLoop*)aLoop
forMode: (NSString*)aMode
{
NSDebugMLLog(@"NSMessagePort", @"%@ add to 0x%x in mode %@",
NSDebugMLLog(@"NSMessagePort", @"%@ add to 0x%p in mode %@",
self, aLoop, aMode);
NSAssert(PORT(self)->rHandle != INVALID_HANDLE_VALUE,
@"Attempt to listen on send port");
@ -248,7 +248,7 @@ static Class messagePortClass = 0;
{
internal *this;
NSDebugMLLog(@"NSMessagePort", @"NSMessagePort 0x%x finalized", self);
NSDebugMLLog(@"NSMessagePort", @"NSMessagePort 0x%p finalized", self);
[self invalidate];
this = PORT(self);
if (this != 0)
@ -493,7 +493,7 @@ static Class messagePortClass = 0;
M_LOCK(this->lock);
NSDebugMLLog(@"NSMessagePort", @"entered with rWant=%d", this->rWant);
NSDebugMLLog(@"NSMessagePort", @"entered with rWant=%lu", this->rWant);
if (this->rState == RS_MESG)
{
@ -529,7 +529,7 @@ static Class messagePortClass = 0;
}
else
{
NSLog(@"GetOverlappedResult success ... %u", this->rSize);
NSLog(@"GetOverlappedResult success ... %lu", this->rSize);
this->rState = RS_NONE;
this->rLength = 0;
}
@ -552,7 +552,7 @@ static Class messagePortClass = 0;
else
{
this->rState = RS_DATA;
NSDebugMLLog(@"NSMessagePort", @"mailslot size=%d",
NSDebugMLLog(@"NSMessagePort", @"mailslot size=%lu",
this->rWant);
[this->rData setLength: this->rWant];
if (ReadFile(this->rHandle,
@ -568,7 +568,7 @@ static Class messagePortClass = 0;
}
if (this->rSize != this->rWant)
{
NSLog(@"only read %d of %d bytes from mailslot '%@' - %@",
NSLog(@"only read %lu of %lu bytes from mailslot '%@' - %@",
this->rSize, this->rWant, this->name, [NSError _last]);
[self invalidate];
return;
@ -776,7 +776,7 @@ static Class messagePortClass = 0;
pm = RETAIN([this->rMsgs objectAtIndex: 0]);
[this->rMsgs removeObjectAtIndex: 0];
NSDebugMLLog(@"NSMessagePort", @"got message %@ on 0x%x", pm, self);
NSDebugMLLog(@"NSMessagePort", @"got message %@ on 0x%p", pm, self);
M_UNLOCK(this->lock);
NS_DURING
{
@ -838,7 +838,7 @@ again:
if (this->wData != nil)
{
NSDebugMLLog(@"NSMessagePort",
@"completed write on 0x%x", self);
@"completed write on 0x%p", self);
[this->wMsgs removeObjectIdenticalTo: this->wData];
this->wData = nil;
}
@ -863,8 +863,8 @@ again:
&this->wOv);
if (rc > 0)
{
NSDebugMLLog(@"NSMessagePort", @"Write of %d performs %d",
[this->wData length] - this->wLength, this->wSize);
NSDebugMLLog(@"NSMessagePort", @"Write of %lu performs %lu",
(unsigned long)([this->wData length] - this->wLength), this->wSize);
this->wLength += this->wSize;
goto again;
}
@ -880,8 +880,8 @@ again:
}
else
{
NSDebugMLLog(@"NSMessagePort", @"Write of %d queued",
[this->wData length] - this->wLength);
NSDebugMLLog(@"NSMessagePort", @"Write of %lu queued",
(unsigned long)([this->wData length] - this->wLength));
}
}
M_UNLOCK(this->lock);
@ -910,7 +910,7 @@ again:
else
{
NSDebugMLLog(@"NSMessagePort",
@"got event on invalidated port 0x%x in mode %@", self, mode);
@"got event on invalidated port 0x%p in mode %@", self, mode);
}
RELEASE(self);
}
@ -920,7 +920,7 @@ again:
fromRunLoop: (NSRunLoop*)aLoop
forMode: (NSString*)aMode
{
NSDebugMLLog(@"NSMessagePort", @"%@ remove from 0x%x in mode %@",
NSDebugMLLog(@"NSMessagePort", @"%@ remove from 0x%p in mode %@",
self, aLoop, aMode);
[aLoop removeEvent: (void*)(uintptr_t)PORT(self)->rEvent
type: ET_HANDLE
@ -1006,7 +1006,7 @@ again:
*/
if (length != [self reservedSpaceLength])
{
NSLog(@"bad reserved length - %u", length);
NSLog(@"bad reserved length - %lu", (unsigned long)length);
return NO;
}
NSAssert([receivingPort isKindOfClass: messagePortClass] == YES,

View file

@ -65,7 +65,7 @@ struct NSUserDefaultsWin32_DomainInfo
NSString *dPath;
dPath = [registryPrefix stringByAppendingString: domain];
NSLog(@"Failed to close registry HKEY_CURRENT_USER\\%@ (%x)",
NSLog(@"Failed to close registry HKEY_CURRENT_USER\\%@ (%lx)",
dPath, rc);
}
}
@ -77,7 +77,7 @@ struct NSUserDefaultsWin32_DomainInfo
NSString *dPath;
dPath = [registryPrefix stringByAppendingString: domain];
NSLog(@"Failed to close registry HKEY_LOCAL_MACHINE\\%@ (%x)",
NSLog(@"Failed to close registry HKEY_LOCAL_MACHINE\\%@ (%lx)",
dPath, rc);
}
}
@ -177,7 +177,7 @@ struct NSUserDefaultsWin32_DomainInfo
}
else if (rc != ERROR_SUCCESS)
{
NSLog(@"Failed to open registry HKEY_CURRENT_USER\\%@ (%x)",
NSLog(@"Failed to open registry HKEY_CURRENT_USER\\%@ (%lx)",
dPath, rc);
return nil;
}
@ -195,7 +195,7 @@ struct NSUserDefaultsWin32_DomainInfo
}
else if (rc != ERROR_SUCCESS)
{
NSLog(@"Failed to open registry HKEY_LOCAL_MACHINE\\%@ (%x)",
NSLog(@"Failed to open registry HKEY_LOCAL_MACHINE\\%@ (%lx)",
dPath, rc);
return nil;
}
@ -254,7 +254,8 @@ struct NSUserDefaultsWin32_DomainInfo
}
break;
default:
NSLog(@"Bad registry type %d for '%S'", type, name);
NSLog(@"Bad registry type %lu for '%ls'", type,
(const unichar *)name);
v = 0;
}
v = [v propertyList];
@ -266,7 +267,7 @@ struct NSUserDefaultsWin32_DomainInfo
}
}
NS_HANDLER
NSLog(@"Bad registry value for '%S'", name);
NSLog(@"Bad registry value for '%ls'", (const unichar *)name);
NS_ENDHANDLER
}
else if (rc == ERROR_MORE_DATA)
@ -289,7 +290,7 @@ struct NSUserDefaultsWin32_DomainInfo
}
else
{
NSLog(@"RegEnumValueW error %d", rc);
NSLog(@"RegEnumValueW error %ld", rc);
break;
}
i++;
@ -350,7 +351,8 @@ struct NSUserDefaultsWin32_DomainInfo
}
break;
default:
NSLog(@"Bad registry type %d for '%S'", type, name);
NSLog(@"Bad registry type %lu for '%ls'", type,
(const unichar *)name);
v = 0;
}
v = [v propertyList];
@ -362,7 +364,7 @@ struct NSUserDefaultsWin32_DomainInfo
}
}
NS_HANDLER
NSLog(@"Bad registry value for '%S'", name);
NSLog(@"Bad registry value for '%ls'", (const unichar *)name);
NS_ENDHANDLER
}
else if (rc == ERROR_MORE_DATA)
@ -385,7 +387,7 @@ struct NSUserDefaultsWin32_DomainInfo
}
else
{
NSLog(@"RegEnumValueW error %d", rc);
NSLog(@"RegEnumValueW error %ld", rc);
break;
}
i++;
@ -431,7 +433,7 @@ struct NSUserDefaultsWin32_DomainInfo
NSString *dName = [@"HKEY_CURRENT_USER\\"
stringByAppendingString: dPath];
NSLog(@"Failed to query modify time on registry %@ (%x)",
NSLog(@"Failed to query modify time on registry %@ (%lx)",
dName, rc);
NSEndMapTableEnumeration(&iter);
return YES;
@ -461,7 +463,7 @@ struct NSUserDefaultsWin32_DomainInfo
NSString *dName = [@"HKEY_CURRENT_USER\\"
stringByAppendingString: dPath];
NSLog(@"Failed to open registry %@ (%x)", dName, rc);
NSLog(@"Failed to open registry %@ (%lx)", dName, rc);
}
else
{
@ -476,7 +478,7 @@ struct NSUserDefaultsWin32_DomainInfo
NULL, NULL, (PFILETIME)&lasttime);
if (rc != ERROR_SUCCESS)
{
NSLog(@"Failed to query time on HKEY_LOCAL_MACHINE\\%@ (%x)",
NSLog(@"Failed to query time on HKEY_LOCAL_MACHINE\\%@ (%lx)",
dPath, rc);
NSEndMapTableEnumeration(&iter);
return YES;
@ -502,7 +504,7 @@ struct NSUserDefaultsWin32_DomainInfo
}
else if (rc != ERROR_SUCCESS)
{
NSLog(@"Failed to open registry HKEY_LOCAL_MACHINE\\%@ (%x)",
NSLog(@"Failed to open registry HKEY_LOCAL_MACHINE\\%@ (%lx)",
dPath, rc);
}
else
@ -569,7 +571,7 @@ struct NSUserDefaultsWin32_DomainInfo
NULL);
if (rc != ERROR_SUCCESS)
{
NSLog(@"Failed to create registry HKEY_CURRENT_USER\\%@ (%x)",
NSLog(@"Failed to create registry HKEY_CURRENT_USER\\%@ (%lx)",
dPath, rc);
return NO;
}
@ -596,7 +598,7 @@ struct NSUserDefaultsWin32_DomainInfo
2*(wcslen(ptr) + 1));
if (rc != ERROR_SUCCESS)
{
NSLog(@"Failed to insert HKEY_CURRENT_USER\\%@\\%@ (%x)",
NSLog(@"Failed to insert HKEY_CURRENT_USER\\%@\\%@ (%lx)",
dPath, valName, rc);
return NO;
}
@ -612,7 +614,7 @@ struct NSUserDefaultsWin32_DomainInfo
rc = RegDeleteValueW(dinfo->userKey, UNISTR(valName));
if (rc != ERROR_SUCCESS)
{
NSLog(@"Failed to delete HKEY_CURRENT_USER\\%@\\%@ (%x)",
NSLog(@"Failed to delete HKEY_CURRENT_USER\\%@\\%@ (%lx)",
dPath, valName, rc);
return NO;
}