summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-12 16:49:33 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-12 17:03:10 -0800
commit2c9800f91559fbb12dd276cf0536631104092f67 (patch)
treebb76c320d9d972d2d3007171ac49412c58c39db4 /os
parent50b1097643934c8caec9530e5eda6ed6534aaf61 (diff)
OsInit: store "/dev/null" in a const char *
It's only passed as the input side of a strcpy and as the filename to fopen, so doesn't need to be non-const. Fixes gcc warning: osinit.c: In function 'OsInit': osinit.c:154:28: warning: initialization discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'os')
-rw-r--r--os/osinit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/osinit.c b/os/osinit.c
index acea682ce..ff3c45de0 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -151,7 +151,7 @@ void
OsInit(void)
{
static Bool been_here = FALSE;
- static char* devnull = "/dev/null";
+ static const char* devnull = "/dev/null";
char fname[PATH_MAX];
if (!been_here) {