[Xquartz-changes] xserver: Branch 'master' - 6 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Sat Apr 23 21:25:31 PDT 2011
Xext/xvmain.c | 7 +------
fb/fbbltone.c | 5 +++++
fb/fbpict.c | 2 +-
glx/glapi.c | 9 +++++++++
glx/glapi.h | 9 +++++++++
glx/glthread.h | 9 +++++++++
hw/xquartz/mach-startup/bundle-main.c | 8 ++++++++
hw/xquartz/pbproxy/x-selection.m | 15 +++++++++++++++
hw/xquartz/quartzKeyboard.c | 21 ++++++++++++++++++++-
os/access.c | 2 +-
os/connection.c | 11 +++++++++++
os/log.c | 10 ++++++++++
os/xstrans.c | 5 +++++
render/picture.c | 5 +++++
14 files changed, 109 insertions(+), 9 deletions(-)
New commits:
commit 020d1002e46edd748b29421d1ac03527c4ca8d0c
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Apr 23 21:24:27 2011 -0700
glx: Silence warnings when building with clang
In file included from glapi.c:46:
In file included from ./glapi.h:51:
./glthread.h:237:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
In file included from glapi.c:46:
./glapi.h:92:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
glapi.c:82:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec"))) = NULL;
^
glapi.c:85:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
4 errors generated.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/glx/glapi.c b/glx/glapi.c
index 7cb8495..b0e32f9 100644
--- a/glx/glapi.c
+++ b/glx/glapi.c
@@ -78,12 +78,21 @@ static void init_glapi_relocs(void);
/*@{*/
#if defined(GLX_USE_TLS)
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunknown-attributes"
+#endif
+
PUBLIC TLS struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec"))) = NULL;
PUBLIC TLS void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
PUBLIC const void *_glapi_Context = NULL;
diff --git a/glx/glapi.h b/glx/glapi.h
index 6521f31..72f6ff5 100644
--- a/glx/glapi.h
+++ b/glx/glapi.h
@@ -83,9 +83,18 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
const extern void *_glapi_Context;
const extern struct _glapi_table *_glapi_Dispatch;
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunknown-attributes"
+#endif
+
extern TLS void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
#else
diff --git a/glx/glthread.h b/glx/glthread.h
index 140e2aa..5b1eeb9 100644
--- a/glx/glthread.h
+++ b/glx/glthread.h
@@ -233,9 +233,18 @@ _glthread_SetTSD(_glthread_TSD *, void *);
#if defined(GLX_USE_TLS)
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunknown-attributes"
+#endif
+
extern TLS struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")));
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#define GET_DISPATCH() _glapi_tls_Dispatch
#elif !defined(GL_CALL)
commit b8ce467f86bfd67831857703e686576fb71c2ae3
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Apr 23 20:55:53 2011 -0700
render: Silence warnings when building with clang
picture.c:351:37: error: implicit conversion from 'unsigned int' to 'CARD16' (aka 'unsigned short') changes value from 4294967295 to 65535
[-Werror,-Wconstant-conversion]
pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/render/picture.c b/render/picture.c
index e7e1f2b..59f2c68 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -42,6 +42,11 @@
#include "picturestr.h"
#include "xace.h"
+#ifdef __clang__
+/* Many implicit conversions from int to CARD16 which look intentional */
+#pragma clang diagnostic ignored "-Wconstant-conversion"
+#endif
+
DevPrivateKeyRec PictureScreenPrivateKeyRec;
DevPrivateKeyRec PictureWindowPrivateKeyRec;
static int PictureGeneration;
commit 2eccce871465cd43a83e4a4678de3508c1c435d5
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Apr 23 20:49:27 2011 -0700
os: Silence warnings when building with clang
access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses]
if ((host->family == FamilyServerInterpreted)) {
~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
access.c:1492:20: note: use '=' to turn this equality comparison into an assignment
if ((host->family == FamilyServerInterpreted)) {
^~
=
access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning
if ((host->family == FamilyServerInterpreted)) {
~ ^ ~
In file included from connection.c:77:
/usr/X11/include/X11/Xtrans/Xtransint.h:349:12: error: unused function 'is_numeric' [-Werror,-Wunused-function]
static int is_numeric (
^
/usr/X11/include/X11/Xtrans/Xtransint.h:354:12: error: unused function 'trans_mkdir' [-Werror,-Wunused-function]
static int trans_mkdir (
^
In file included from xstrans.c:8:
In file included from /usr/X11/include/X11/Xtrans/transport.c:67:
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
if (asprintf(&logFileName, fname, display) == -1)
^~~~~
log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
if ((asprintf(&suffix, backup, display) == -1) ||
^~~~~~
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/os/access.c b/os/access.c
index 3856e60..b7b1927 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1489,7 +1489,7 @@ InvalidHost (
}
for (host = validhosts; host; host = host->next)
{
- if ((host->family == FamilyServerInterpreted)) {
+ if (host->family == FamilyServerInterpreted) {
if (siAddrMatch (family, addr, len, host, client)) {
return 0;
}
diff --git a/os/connection.c b/os/connection.c
index 0c580ab..c0f1d83 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -73,8 +73,19 @@ SOFTWARE.
#define XSERV_t
#define TRANS_SERVER
#define TRANS_REOPEN
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+
#include <X11/Xtrans/Xtrans.h>
#include <X11/Xtrans/Xtransint.h>
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#include <errno.h>
#include <signal.h>
#include <stdio.h>
diff --git a/os/log.c b/os/log.c
index 65195ba..795d8f0 100644
--- a/os/log.c
+++ b/os/log.c
@@ -171,6 +171,12 @@ asm (".desc ___crashreporter_info__, 0x10");
* string.
*/
+
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
+#endif
+
const char *
LogInit(const char *fname, const char *backup)
{
@@ -226,6 +232,10 @@ LogInit(const char *fname, const char *backup)
return logFileName;
}
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
void
LogClose(void)
{
diff --git a/os/xstrans.c b/os/xstrans.c
index c086e22..5c3dda2 100644
--- a/os/xstrans.c
+++ b/os/xstrans.c
@@ -2,6 +2,11 @@
#include <dix-config.h>
#endif
+#ifdef __clang__
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
#define TRANS_REOPEN
#define TRANS_SERVER
#define XSERV_t
commit e574a0d6a3fbc12085063c7b55dff0180c980fda
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Apr 23 20:39:25 2011 -0700
Xext: Silence warnings when building with clang
xvmain.c:1113:22: warning: equality comparison with extraneous parentheses [-Wparentheses]
if ((pf->depth == pDraw->depth)
~~~~~~~~~~^~~~~~~~~~~~~~~
xvmain.c:1113:22: note: use '=' to turn this equality comparison into an assignment
if ((pf->depth == pDraw->depth)
^~
=
xvmain.c:1113:22: note: remove extraneous parentheses around the comparison to silence this warning
if ((pf->depth == pDraw->depth)
~ ^ ~
1 warning generated.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/Xext/xvmain.c b/Xext/xvmain.c
index cd6f097..d21a56c 100644
--- a/Xext/xvmain.c
+++ b/Xext/xvmain.c
@@ -1110,12 +1110,7 @@ XvdiMatchPort(
while (nf--)
{
- if ((pf->depth == pDraw->depth)
-#if 0
- && ((pDraw->type == DRAWABLE_PIXMAP) ||
- (wVisual(((WindowPtr)pDraw)) == pf->visual))
-#endif
- )
+ if (pf->depth == pDraw->depth)
return Success;
pf++;
}
commit 4da41bc0c54e2ce26756742881106267fa91ff19
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Apr 23 20:36:53 2011 -0700
fb: Silence warnings when building with clang
fbpict.c:163:8: warning: implicit conversion from enumeration type 'PictFormatShort' (aka 'enum _PictFormatShort') to different enumeration
type 'pixman_format_code_t' [-Wconversion]
pict->format,
~~~~~~^~~~~~
fbbltone.c:486:2: warning: shift result (281474959933440) requires 49 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0),
^~~~~~~~~~~~
fbbltone.c:474:6: note: instantiated from:
SelMask24(b,1,r))
^
fbbltone.c:429:46: note: instantiated from:
^
fbbltone.c:427:18: note: instantiated from:
0xffffff << Mask24Check(x,r)) : 0)
~~~~~~~~ ^
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index 629b13a..0a91575 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -26,6 +26,11 @@
#include "fb.h"
+#ifdef __clang__
+/* shift overflow is intentional */
+#pragma clang diagnostic ignored "-Wshift-overflow"
+#endif
+
/*
* Example: srcX = 13 dstX = 8 (FB unit 32 dstBpp 8)
*
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 133f422..d1fd0cb 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -160,7 +160,7 @@ create_bits_picture (PicturePtr pict,
fbGetPixmapBitsData(pixmap, bits, stride, bpp);
image = pixman_image_create_bits (
- pict->format,
+ (pixman_format_code_t)pict->format,
pixmap->drawable.width, pixmap->drawable.height,
(uint32_t *)bits, stride * sizeof (FbStride));
commit d849361fc35fa15352559eb8dd5aef446d065dca
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Apr 23 20:12:38 2011 -0700
XQuartz: Silence warnings about deprecated functionality where it is an intended fallback
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/xquartz/mach-startup/bundle-main.c b/hw/xquartz/mach-startup/bundle-main.c
index 6a6c01c..d70cfd4 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 ef84f8b..e3d5113 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 3ab5d52..af12de4 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) {
More information about the Xquartz-changes
mailing list