os.c:1116:14: warning: 'CFURLCreateStringByAddingPercentEscapes' is deprecated: first deprecated in macOS 10.11 - Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid). [-Wdeprecated-declarations]
1116 | rc = (jlong)CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)arg0, (CFStringRef)arg1, (CFStringRef)arg2, (CFStringRef)arg3, (CFStringEncoding)arg4);
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h:408:13: note: 'CFURLCreateStringByAddingPercentEscapes' has been explicitly marked deprecated here
408 | CFStringRef CFURLCreateStringByAddingPercentEscapes(CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding) API_DEPRECATED("Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid).", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
| ^
The SWT implementation for macOS currently referenced multiple deprecated native API methods:
CFURLCreateFromFSRefis deprecated[Cocoa] Replace deprecated LSGetApplicationForInfo in Program.findProgram #3187
GetCurrentProcessis deprecatedLSGetApplicationForInfois deprecated[Cocoa] Replace deprecated LSGetApplicationForInfo in Program.findProgram #3187
NSPrintSavePathis deprecatedSecPolicySearchCopyNextis deprecatedSecPolicySearchCreateis deprecatedWebViewis deprecatedWebViewis deprecatedCFURLCreateStringByAddingPercentEscapesis deprecatedNSDragPboardis deprecatedNSFilenamesPboardTypeis deprecatedNSTIFFPboardTypeis deprecatedNSURLPboardTypeis deprecatedNSViewGlobalFrameDidChangeNotificationis deprecatedpassing arguments to a function without a prototype is deprecated
cast of type
SEL _Nonnull[...] is deprecated[Cocoa] Fix deprecated SEL cast in sel_registerName (issue #3186) #3194
OSAtomicIncrement32is deprecated[Cocoa] Replace deprecated OSAtomicIncrement32/OSAtomicDecrement32 in callback.c #3213
OSAtomicDecrement32is deprecated[Cocoa] Replace deprecated OSAtomicIncrement32/OSAtomicDecrement32 in callback.c #3213
In total 18 (16 + 2) warnings are generated.
It would be good to replace them as it would allow us to fail on all kind of warnings.