i965: silence incompatible pointer type warning
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 17 Oct 2015 22:42:13 +0000 (23:42 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 20 Oct 2015 17:37:22 +0000 (18:37 +0100)
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@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_program.c

index b547d07f0cae819f4a41198c4e81d57bd7021914..1ccfa1b6a1d9c02d60f76b8772a7148ac0a69975 100644 (file)
@@ -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;
       }