Mesa (master): i965: silence incompatible pointer type warning

Emil Velikov evelikov at kemper.freedesktop.org
Tue Oct 20 17:38:52 UTC 2015


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

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Sat Oct 17 23:42:13 2015 +0100

i965: silence incompatible pointer type warning

src/mesa/drivers/dri/i965/brw_program.c:94:39:
warning: passing argument 1 of ‘_mesa_init_gl_program’ from incompatible
pointer type [-Wincompatible-pointer-types]
          return _mesa_init_gl_program(&prog->program, target, id);

                                       ^

Runtime was unaffected as brw_geometry_program is subclassed from
gl_geometry_program, thus the address passed was the same.

Fixes: bcb56c2c69d (program: convert _mesa_init_gl_program() to take
struct gl_program *)
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/mesa/drivers/dri/i965/brw_program.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index b547d07..1ccfa1b 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -91,7 +91,7 @@ static struct gl_program *brwNewProgram( struct gl_context *ctx,
       if (prog) {
          prog->id = get_new_program_id(brw->intelScreen);
 
-         return _mesa_init_gl_program(&prog->program, target, id);
+         return _mesa_init_gl_program(&prog->program.Base, target, id);
       } else {
          return NULL;
       }




More information about the mesa-commit mailing list