summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-13 11:24:00 -0800
committerKeith Packard <keithp@keithp.com>2014-01-22 19:56:31 -0800
commit1ad8d12e7fcd7d55a37099d7426e3290297ba6d3 (patch)
treed61ab3df6f09d03e0f87a9e789ee00af194d242f /os
parent9ef53e2267ea3dd60651961f66c65e8b00b7d823 (diff)
Ignore a couple of format-nonliteral warnings
These are generated in code which uses sprintf as a convenient way to construct strings from various pieces. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'os')
-rw-r--r--os/log.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/os/log.c b/os/log.c
index 792b79e93..8deb81040 100644
--- a/os/log.c
+++ b/os/log.c
@@ -195,6 +195,7 @@ LogInit(const char *fname, const char *backup)
char *logFileName = NULL;
if (fname && *fname) {
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
if (asprintf(&logFileName, fname, display) == -1)
FatalError("Cannot allocate space for the log file name\n");
@@ -205,6 +206,7 @@ LogInit(const char *fname, const char *backup)
char *suffix;
char *oldLog;
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
if ((asprintf(&suffix, backup, display) == -1) ||
(asprintf(&oldLog, "%s%s", logFileName, suffix) == -1))
FatalError("Cannot allocate space for the log file name\n");