diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2014-02-09 11:20:59 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-02-24 16:30:07 -0800 |
commit | e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 (patch) | |
tree | fd0412f0fb2c161925edb37e337ed6a94c3094f4 | |
parent | 1940508a4af33d44a7a8ef24bbdcd1e31e228dab (diff) |
gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | os/log.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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"); |