Explorar el Código

added a cast to malloc call

tags/mesa_3_2_beta_1
Brian Paul hace 26 años
padre
commit
320c2cdb0f
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5
    2
      progs/demos/stex3d.c

+ 5
- 2
progs/demos/stex3d.c Ver fichero

@@ -1,4 +1,4 @@
/* $Id: stex3d.c,v 1.2 1999/09/17 12:27:01 brianp Exp $ */
/* $Id: stex3d.c,v 1.2.2.1 1999/12/16 08:53:51 brianp Exp $ */

/*-----------------------------
* stex3d.c GL example of the mesa 3d-texture extention to simulate procedural
@@ -17,6 +17,9 @@

/*
* $Log: stex3d.c,v $
* Revision 1.2.2.1 1999/12/16 08:53:51 brianp
* added a cast to malloc call
*
* Revision 1.2 1999/09/17 12:27:01 brianp
* silenced some warnings
*
@@ -230,7 +233,7 @@ void create3Dtexture()
int tmp;

printf("creating 3d textures...\n");
voxels = (unsigned char *) malloc((4*tex_width*tex_height*tex_depth));
voxels = (unsigned char *) malloc((size_t) (4*tex_width*tex_height*tex_depth));
vp=voxels;
for (i=0;i<tex_width;i++){
vec[0]=i;

Cargando…
Cancelar
Guardar