XQuartz: Silence warnings about deprecated functionality where it is an intended fallback
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
9244a3a24f
commit
d0caa0e4cd
|
@ -144,7 +144,15 @@ static mach_port_t checkin_or_register(char *bname) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // bootstrap_register
|
||||||
|
#endif
|
||||||
kr = bootstrap_register(bootstrap_port, bname, mp);
|
kr = bootstrap_register(bootstrap_port, bname, mp);
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
if (kr != KERN_SUCCESS) {
|
if (kr != KERN_SUCCESS) {
|
||||||
fprintf(stderr, "bootstrap_register(): %s\n", mach_error_string(kr));
|
fprintf(stderr, "bootstrap_register(): %s\n", mach_error_string(kr));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
|
@ -625,6 +625,10 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato
|
||||||
/* TODO add the NSPICTPboardType back again, once we have conversion
|
/* TODO add the NSPICTPboardType back again, once we have conversion
|
||||||
* functionality in send_image.
|
* functionality in send_image.
|
||||||
*/
|
*/
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // NSPICTPboardType
|
||||||
|
#endif
|
||||||
|
|
||||||
if ([pbtypes containsObject:NSPICTPboardType]
|
if ([pbtypes containsObject:NSPICTPboardType]
|
||||||
|| [pbtypes containsObject:NSTIFFPboardType])
|
|| [pbtypes containsObject:NSTIFFPboardType])
|
||||||
|
@ -637,6 +641,10 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato
|
||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
/* We have a list of ATOMs to send. */
|
/* We have a list of ATOMs to send. */
|
||||||
|
@ -925,7 +933,14 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato
|
||||||
if (NO == [self send_image_tiff_reply:e pasteboard:pb type:imagetype])
|
if (NO == [self send_image_tiff_reply:e pasteboard:pb type:imagetype])
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // NSPICTPboardType
|
||||||
|
#endif
|
||||||
else if ([pbtypes containsObject:NSPICTPboardType])
|
else if ([pbtypes containsObject:NSPICTPboardType])
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
if (NO == [self send_image_pict_reply:e pasteboard:pb type:imagetype])
|
if (NO == [self send_image_pict_reply:e pasteboard:pb type:imagetype])
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -684,6 +684,11 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // KLGetCurrentKeyboardLayout, KLGetKeyboardLayoutProperty
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||||
if (chr_data == NULL) {
|
if (chr_data == NULL) {
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||||
|
@ -717,6 +722,10 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||||
if(currentKeyLayoutRef)
|
if(currentKeyLayoutRef)
|
||||||
CFRelease(currentKeyLayoutRef);
|
CFRelease(currentKeyLayoutRef);
|
||||||
|
@ -773,10 +782,16 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
|
||||||
}
|
}
|
||||||
#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||||
} else { // kchr
|
} else { // kchr
|
||||||
UInt32 c, state = 0, state2 = 0;
|
UInt32 c, state = 0, state2 = 0;
|
||||||
UInt16 code;
|
UInt16 code;
|
||||||
|
|
||||||
code = i | mods[j];
|
code = i | mods[j];
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // KeyTranslate
|
||||||
|
#endif
|
||||||
|
|
||||||
c = KeyTranslate (chr_data, code, &state);
|
c = KeyTranslate (chr_data, code, &state);
|
||||||
|
|
||||||
/* Dead keys are only processed on key-down, so ask
|
/* Dead keys are only processed on key-down, so ask
|
||||||
|
@ -787,6 +802,10 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
|
||||||
if (state != 0)
|
if (state != 0)
|
||||||
c = KeyTranslate (chr_data, code | 128, &state2);
|
c = KeyTranslate (chr_data, code | 128, &state2);
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Characters seem to be in MacRoman encoding. */
|
/* Characters seem to be in MacRoman encoding. */
|
||||||
|
|
||||||
if (c != 0 && c != 0x0010) {
|
if (c != 0 && c != 0x0010) {
|
||||||
|
|
Loading…
Reference in New Issue