Mesa (master): st/mesa: fix incorrect pointer type arguments in st_new_program()

Brian Paul brianp at kemper.freedesktop.org
Fri Oct 16 15:15:21 UTC 2015


Module: Mesa
Branch: master
Commit: afff809fea373f849b648983bff8390c090b7145
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=afff809fea373f849b648983bff8390c090b7145

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Oct 15 07:25:51 2015 -0600

st/mesa: fix incorrect pointer type arguments in st_new_program()

Silences 5 warnings of the type:
state_tracker/st_cb_program.c: In function 'st_new_program':
state_tracker/st_cb_program.c:108:7: warning: passing argument 1 of
'_mesa_init_gl_program' from incompatible pointer type [enabled by default]
       return _mesa_init_gl_program(&prog->Base, target, id);
       ^
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 src/mesa/state_tracker/st_cb_program.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index 26d128a..708bdf5 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -105,23 +105,23 @@ st_new_program(struct gl_context *ctx, GLenum target, GLuint id)
    switch (target) {
    case GL_VERTEX_PROGRAM_ARB: {
       struct st_vertex_program *prog = ST_CALLOC_STRUCT(st_vertex_program);
-      return _mesa_init_gl_program(&prog->Base, target, id);
+      return _mesa_init_gl_program(&prog->Base.Base, target, id);
    }
    case GL_FRAGMENT_PROGRAM_ARB: {
       struct st_fragment_program *prog = ST_CALLOC_STRUCT(st_fragment_program);
-      return _mesa_init_gl_program(&prog->Base, target, id);
+      return _mesa_init_gl_program(&prog->Base.Base, target, id);
    }
    case GL_GEOMETRY_PROGRAM_NV: {
       struct st_geometry_program *prog = ST_CALLOC_STRUCT(st_geometry_program);
-      return _mesa_init_gl_program(&prog->Base, target, id);
+      return _mesa_init_gl_program(&prog->Base.Base, target, id);
    }
    case GL_TESS_CONTROL_PROGRAM_NV: {
       struct st_tessctrl_program *prog = ST_CALLOC_STRUCT(st_tessctrl_program);
-      return _mesa_init_gl_program(&prog->Base, target, id);
+      return _mesa_init_gl_program(&prog->Base.Base, target, id);
    }
    case GL_TESS_EVALUATION_PROGRAM_NV: {
       struct st_tesseval_program *prog = ST_CALLOC_STRUCT(st_tesseval_program);
-      return _mesa_init_gl_program(&prog->Base, target, id);
+      return _mesa_init_gl_program(&prog->Base.Base, target, id);
    }
    default:
       assert(0);




More information about the mesa-commit mailing list