Skip to content

Commit 2e6299c

Browse files
committed
NumberDate: add explicit cast for Windows char
Windows uses `signed char` rather than `unsigned char`. Add a cast to silence the `-Wpointer-sign` warning.
1 parent d75613b commit 2e6299c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: CoreFoundation/NumberDate.subproj/CFTimeZone.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static CFMutableArrayRef __CFCopyWindowsTimeZoneList() {
136136
#if defined(UNICODE)
137137
CFStringRef string = CFStringCreateWithBytes(kCFAllocatorSystemDefault, (const UInt8 *)lpName, (_tcslen(lpName) * sizeof(UniChar)), kCFStringEncodingUnicode, false);
138138
#else
139-
CFStringRef string = CFStringCreateWithBytes(kCFAllocatorSystemDefault, lpName, _tcslen(lpName), CFStringGetSystemEncoding(), false);
139+
CFStringRef string = CFStringCreateWithBytes(kCFAllocatorSystemDefault, (const unsigned char *)lpName, _tcslen(lpName), CFStringGetSystemEncoding(), false);
140140
#endif
141141
CFArrayAppendValue(result, string);
142142
CFRelease(string);

0 commit comments

Comments
 (0)