From 9580179dfb42d5b81ff6ec9704b82a556c7f1229 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 6 Dec 2005 15:41:43 +0000 Subject: C++ fixes, mostly casts (Stephane Conversy) --- src/mesa/tnl/t_vp_build.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mesa/tnl/t_vp_build.c') diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 77e105115c..7e28bbbc3c 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -514,7 +514,7 @@ static void emit_op3fn(struct tnl_program *p, return; } - inst->Opcode = op; + inst->Opcode = (enum prog_opcode) op; inst->StringPos = 0; inst->Data = 0; @@ -1406,7 +1406,7 @@ create_new_program( const struct state_key *key, p.temp_reserved = ~((1<Base.Instructions - = MALLOC(sizeof(struct prog_instruction) * MAX_INSN); + = (struct prog_instruction*) MALLOC(sizeof(struct prog_instruction) * MAX_INSN); p.program->Base.String = 0; p.program->Base.NumInstructions = p.program->Base.NumTemporaries = @@ -1441,7 +1441,7 @@ static void rehash( struct tnl_cache *cache ) GLuint size, i; size = cache->size * 3; - items = MALLOC(size * sizeof(*items)); + items = (struct tnl_cache_item**) _mesa_malloc(size * sizeof(*items)); _mesa_memset(items, 0, size * sizeof(*items)); for (i = 0; i < cache->size; i++) @@ -1461,7 +1461,7 @@ static void cache_item( struct tnl_cache *cache, void *key, void *data ) { - struct tnl_cache_item *c = MALLOC(sizeof(*c)); + struct tnl_cache_item *c = (struct tnl_cache_item*) _mesa_malloc(sizeof(*c)); c->hash = hash; c->key = key; c->data = data; -- cgit v1.2.3