aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/linux/lnx_init.c')
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
index 85709c629..94853070d 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
@@ -76,6 +76,9 @@ switch_to(int vt, const char *from)
FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+
void
xf86OpenConsole(void)
{
@@ -166,7 +169,6 @@ xf86OpenConsole(void)
i = 0;
while (vcs[i] != NULL) {
-#pragma GCC diagnostic ignored "-Wformat-nonliteral"
snprintf(vtname, sizeof(vtname), vcs[i], xf86Info.vtno); /* /dev/tty1-64 */
if ((xf86Info.consoleFd = open(vtname, O_RDWR | O_NDELAY, 0)) >= 0)
break;
@@ -272,6 +274,8 @@ xf86OpenConsole(void)
}
}
+#pragma GCC diagnostic pop
+
void
xf86CloseConsole(void)
{