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 <[email protected]> --- os/osinit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/os/osinit.c b/os/osinit.c index acea682..ff3c45d 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) { -- 1.7.3.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
