From ce3cf63251b9d0de1de066f71d0c642360215f13 Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 5 Sep 2008 12:25:50 +0200 Subject: [PATCH] mesa: _mesa_program_state_string() returns char *, not const char *. --- src/mesa/shader/arbprogparse.c | 4 ++-- src/mesa/shader/prog_parameter.c | 4 ++-- src/mesa/shader/prog_statevars.c | 2 +- src/mesa/shader/prog_statevars.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 78cc6aa9cc0..26ccdc7395a 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -3354,11 +3354,11 @@ debug_variables (GLcontext * ctx, struct var_cache *vc_head, fprintf (stderr, "%s\n", Program->Base.Parameters->Parameters[a + b].Name); if (Program->Base.Parameters->Parameters[a + b].Type == PROGRAM_STATE_VAR) { - const char *s; + char *s; s = _mesa_program_state_string(Program->Base.Parameters->Parameters [a + b].StateIndexes); fprintf(stderr, "%s\n", s); - _mesa_free((char *) s); + _mesa_free(s); } else fprintf (stderr, "%f %f %f %f\n", diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 2dfd923a0f3..bfe27d2f638 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -420,7 +420,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, const gl_state_index stateTokens[STATE_LENGTH]) { const GLuint size = 4; /* XXX fix */ - const char *name; + char *name; GLint index; /* Check if the state reference is already in the list */ @@ -447,7 +447,7 @@ _mesa_add_state_reference(struct gl_program_parameter_list *paramList, paramList->StateFlags |= _mesa_program_state_flags(stateTokens); /* free name string here since we duplicated it in add_parameter() */ - _mesa_free((void *) name); + _mesa_free(name); return index; } diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index 819db25a001..8acf37c3c08 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -767,7 +767,7 @@ append_index(char *dst, GLint index) * For example, return "state.matrix.texture[2].inverse". * Use _mesa_free() to deallocate the string. */ -const char * +char * _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]) { char str[1000] = ""; diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h index 0a1c2358283..7b490e3d630 100644 --- a/src/mesa/shader/prog_statevars.h +++ b/src/mesa/shader/prog_statevars.h @@ -129,7 +129,7 @@ extern GLbitfield _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH]); -extern const char * +extern char * _mesa_program_state_string(const gl_state_index state[STATE_LENGTH]); -- 2.30.2