summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-04-23 20:12:38 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-04-25 18:57:03 -0700
commitd0caa0e4cd255bea315757be2ff387cf57e8bdf7 (patch)
tree151a3d20297cad812fb34d22fc7486733c0b57ff
parent9244a3a24f63239ec12675f3df091583e06c8314 (diff)
XQuartz: Silence warnings about deprecated functionality where it is an intended fallback
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--hw/xquartz/mach-startup/bundle-main.c8
-rw-r--r--hw/xquartz/pbproxy/x-selection.m15
-rw-r--r--hw/xquartz/quartzKeyboard.c21
3 files changed, 43 insertions, 1 deletions
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 6a6c01c3b..d70cfd4fa 100644
--- a/hw/xquartz/mach-startup/bundle-main.c
+++ b/hw/xquartz/mach-startup/bundle-main.c
@@ -144,7 +144,15 @@ static mach_port_t checkin_or_register(char *bname) {
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);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
if (kr != KERN_SUCCESS) {
fprintf(stderr, "bootstrap_register(): %s\n", mach_error_string(kr));
exit(EXIT_FAILURE);
diff --git a/hw/xquartz/pbproxy/x-selection.m b/hw/xquartz/pbproxy/x-selection.m
index ef84f8bfb..e3d5113f6 100644
--- a/hw/xquartz/pbproxy/x-selection.m
+++ b/hw/xquartz/pbproxy/x-selection.m
@@ -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
* functionality in send_image.
*/
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations" // NSPICTPboardType
+#endif
if ([pbtypes containsObject:NSPICTPboardType]
|| [pbtypes containsObject:NSTIFFPboardType])
@@ -637,6 +641,10 @@ get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Ato
++count;
}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
if (count)
{
/* 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])
return;
}
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations" // NSPICTPboardType
+#endif
else if ([pbtypes containsObject:NSPICTPboardType])
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
{
if (NO == [self send_image_pict_reply:e pasteboard:pb type:imagetype])
return;
diff --git a/hw/xquartz/quartzKeyboard.c b/hw/xquartz/quartzKeyboard.c
index 3ab5d5251..af12de4ac 100644
--- a/hw/xquartz/quartzKeyboard.c
+++ b/hw/xquartz/quartzKeyboard.c
@@ -684,6 +684,11 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
}
#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 (chr_data == NULL) {
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
@@ -717,6 +722,10 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
}
#endif
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
if(currentKeyLayoutRef)
CFRelease(currentKeyLayoutRef);
@@ -773,10 +782,16 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
}
#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
} else { // kchr
- UInt32 c, state = 0, state2 = 0;
+ UInt32 c, state = 0, state2 = 0;
UInt16 code;
code = i | mods[j];
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations" // KeyTranslate
+#endif
+
c = KeyTranslate (chr_data, code, &state);
/* Dead keys are only processed on key-down, so ask
@@ -787,6 +802,10 @@ static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) {
if (state != 0)
c = KeyTranslate (chr_data, code | 128, &state2);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
/* Characters seem to be in MacRoman encoding. */
if (c != 0 && c != 0x0010) {