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>
This commit is contained in:
parent
50b1097643
commit
2c9800f915
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user