added some casts for mallocs (bug 630379)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: fxdd.c,v 1.92 2002/10/04 19:10:10 brianp Exp $ */
|
/* $Id: fxdd.c,v 1.93 2002/10/29 15:03:16 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -721,7 +721,7 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fxMesa->state = malloc(FX_grGetInteger(FX_GLIDE_STATE_SIZE));
|
fxMesa->state = malloc(FX_grGetInteger(FX_GLIDE_STATE_SIZE));
|
||||||
fxMesa->fogTable = malloc(FX_grGetInteger(FX_FOG_TABLE_ENTRIES) *
|
fxMesa->fogTable = (GrFog_t *) malloc(FX_grGetInteger(FX_FOG_TABLE_ENTRIES) *
|
||||||
sizeof(GrFog_t));
|
sizeof(GrFog_t));
|
||||||
|
|
||||||
if (!fxMesa->state || !fxMesa->fogTable) {
|
if (!fxMesa->state || !fxMesa->fogTable) {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: glapi.c,v 1.66 2002/10/17 16:29:17 brianp Exp $ */
|
/* $Id: glapi.c,v 1.67 2002/10/29 15:03:14 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -546,7 +546,7 @@ generate_entrypoint(GLuint functionOffset)
|
|||||||
0xe8, 0x00, 0x00, 0x00, 0x00,
|
0xe8, 0x00, 0x00, 0x00, 0x00,
|
||||||
0xff, 0xa0, 0x00, 0x00, 0x00, 0x00
|
0xff, 0xa0, 0x00, 0x00, 0x00, 0x00
|
||||||
};
|
};
|
||||||
unsigned char *code = malloc(sizeof(insn_template));
|
unsigned char *code = (unsigned char *) malloc(sizeof(insn_template));
|
||||||
unsigned int next_insn;
|
unsigned int next_insn;
|
||||||
if (code) {
|
if (code) {
|
||||||
memcpy(code, insn_template, sizeof(insn_template));
|
memcpy(code, insn_template, sizeof(insn_template));
|
||||||
@@ -583,7 +583,7 @@ generate_entrypoint(GLuint functionOffset)
|
|||||||
0x01000000 /* nop */
|
0x01000000 /* nop */
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
unsigned int *code = malloc(sizeof(insn_template));
|
unsigned int *code = (unsigned int *) malloc(sizeof(insn_template));
|
||||||
unsigned long glapi_addr = (unsigned long) &_glapi_Dispatch;
|
unsigned long glapi_addr = (unsigned long) &_glapi_Dispatch;
|
||||||
if (code) {
|
if (code) {
|
||||||
memcpy(code, insn_template, sizeof(insn_template));
|
memcpy(code, insn_template, sizeof(insn_template));
|
||||||
|
Reference in New Issue
Block a user