xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Mon Feb 24 16:30:36 PST 2014


 os/log.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date:   Sun Feb 9 11:20:59 2014 +0100

    gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored
    
    Signed-off-by: Matthieu Herrb <matthieu at herrb.eu>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/os/log.c b/os/log.c
index 8deb810..38193ee 100644
--- a/os/log.c
+++ b/os/log.c
@@ -195,7 +195,9 @@ LogInit(const char *fname, const char *backup)
     char *logFileName = NULL;
 
     if (fname && *fname) {
+#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2
 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
         if (asprintf(&logFileName, fname, display) == -1)
             FatalError("Cannot allocate space for the log file name\n");
 
@@ -206,7 +208,9 @@ LogInit(const char *fname, const char *backup)
                 char *suffix;
                 char *oldLog;
 
+#if __GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2
 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
                 if ((asprintf(&suffix, backup, display) == -1) ||
                     (asprintf(&oldLog, "%s%s", logFileName, suffix) == -1))
                     FatalError("Cannot allocate space for the log file name\n");


More information about the xorg-commit mailing list