From 2c9800f91559fbb12dd276cf0536631104092f67 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 12 Dec 2011 16:49:33 -0800 Subject: [PATCH] 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 Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer --- os/osinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {