xserver: Branch 'server-1.10-branch'

Jeremy Huddleston jeremyhu at kemper.freedesktop.org
Wed May 11 12:27:16 PDT 2011


 os/access.c  |    2 +-
 os/log.c     |    4 ++++
 os/xstrans.c |    5 +++++
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 277e18894492fdf6e5446bb90e8503c9cbc28b3b
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 xstrans.c:8:
    In file included from /usr/X11/include/X11/Xtrans/transport.c:62:
    /usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99
          [-Werror,-Wimplicit-function-declaration]
        PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0);
        ^
    
    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) ||
                                           ^~~~~~
    log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
            LogVWrite(verb, tmpBuf, args);
                            ^~~~~~
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>
    (cherry picked from commit c524f8bb768f886d413839bc22184098394c2559)

diff --git a/os/access.c b/os/access.c
index eb1a21d..be9c0d5 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1508,7 +1508,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/log.c b/os/log.c
index 65195ba..9579e58 100644
--- a/os/log.c
+++ b/os/log.c
@@ -102,6 +102,10 @@ OR PERFORMANCE OF THIS SOFTWARE.
 #include "xf86bigfontsrv.h"
 #endif
 
+#ifdef __clang__
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
+#endif
+
 #ifdef DDXOSVERRORF
 void (*OsVendorVErrorFProc)(const char *, va_list args) = NULL;
 #endif
diff --git a/os/xstrans.c b/os/xstrans.c
index c086e22..44ff976 100644
--- a/os/xstrans.c
+++ b/os/xstrans.c
@@ -2,6 +2,11 @@
 #include <dix-config.h>
 #endif
 
+#include <X11/Xfuncproto.h>
+
+/* ErrorF is used by xtrans */
+extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2);
+
 #define TRANS_REOPEN
 #define TRANS_SERVER
 #define XSERV_t


More information about the xorg-commit mailing list