mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user