VirtGL: Fix compilation warning in opengl_strtok
authorFrédéric Dalleau <frederic.dalleau@linux.intel.com>
Thu, 29 Aug 2013 09:32:16 +0000 (11:32 +0200)
committerjinhyung.jo <jinhyung.jo@samsung.com>
Wed, 11 Sep 2013 09:13:24 +0000 (18:13 +0900)
This is the first of a long series to fix compilation warning of VirtGL.
opengl_exec and serverstub first.

Conflicts:

tizen/src/hw/opengl_exec.c

Change-Id: I6aee1309337b27392fc4733cccb7190ac4045ef4

tizen/src/hw/opengl_exec.c

index 3551b0b..33e22d0 100644 (file)
@@ -1297,9 +1297,9 @@ void vmgl_context_switch(ProcessStruct *p, int switch_gl_context)
     }
 }
 
-static const char *opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf)
+static const char *opengl_strtok(const char *s, int *n, char const **saveptr, char *prevbuf)
 {
-       char *start;
+       const char *start;
        char *ret;
        char *p;
        int retlen;
@@ -1353,7 +1353,7 @@ static const char *opengl_strtok(const char *s, int *n, char **saveptr, char *pr
 
        if (retlen == 0) {
                *p = 0;
-               return NULL;
+               return ret;
        }
 
        while (retlen > 0) {
@@ -1381,7 +1381,7 @@ static const char *opengl_strtok(const char *s, int *n, char **saveptr, char *pr
 
 static char *do_eglShaderPatch(const char *source, int length, int *patched_len)
 {
-       char *saveptr = NULL;
+       const char *saveptr = NULL;
        char *sp;
        char *p = NULL;