From 13a8959e4bc295066dfc2215741f78258382508e Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 20 May 2009 19:43:13 +0000 Subject: [PATCH] add some missing casts git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8982 d7cf8633-e32d-0410-b094-e92efae38249 --- console.c | 4 ++-- keys.c | 2 +- model_shared.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/console.c b/console.c index ad220a3f..8f23f324 100644 --- a/console.c +++ b/console.c @@ -95,9 +95,9 @@ char rcon_redirect_buffer[1400]; void ConBuffer_Init(conbuffer_t *buf, int textsize, int maxlines, mempool_t *mempool) { buf->textsize = textsize; - buf->text = Mem_Alloc(mempool, textsize); + buf->text = (char *) Mem_Alloc(mempool, textsize); buf->maxlines = maxlines; - buf->lines = Mem_Alloc(mempool, maxlines * sizeof(*buf->lines)); + buf->lines = (con_lineinfo_t *) Mem_Alloc(mempool, maxlines * sizeof(*buf->lines)); buf->lines_first = 0; buf->lines_count = 0; } diff --git a/keys.c b/keys.c index 2d7431fa..bfe77d26 100644 --- a/keys.c +++ b/keys.c @@ -418,7 +418,7 @@ Key_Console (int key, int ascii) if (i > 0) { // terencehill: insert the clipboard text between the characters of the line - char *temp = Z_Malloc(MAX_INPUTLINE); + char *temp = (char *) Z_Malloc(MAX_INPUTLINE); cbd[i]=0; temp[0]=0; if ( key_linepos < (int)strlen(key_line) ) diff --git a/model_shared.c b/model_shared.c index 6b06ead1..842d2b7d 100644 --- a/model_shared.c +++ b/model_shared.c @@ -2187,9 +2187,9 @@ void Mod_MakeSortedSurfaces(dp_model_t *mod) int *firstsurfacefortexture; int *numsurfacesfortexture; if (!mod->sortedmodelsurfaces) - mod->sortedmodelsurfaces = Mem_Alloc(loadmodel->mempool, mod->nummodelsurfaces * sizeof(*mod->sortedmodelsurfaces)); - firstsurfacefortexture = Mem_Alloc(tempmempool, mod->num_textures * sizeof(*firstsurfacefortexture)); - numsurfacesfortexture = Mem_Alloc(tempmempool, mod->num_textures * sizeof(*numsurfacesfortexture)); + mod->sortedmodelsurfaces = (int *) Mem_Alloc(loadmodel->mempool, mod->nummodelsurfaces * sizeof(*mod->sortedmodelsurfaces)); + firstsurfacefortexture = (int *) Mem_Alloc(tempmempool, mod->num_textures * sizeof(*firstsurfacefortexture)); + numsurfacesfortexture = (int *) Mem_Alloc(tempmempool, mod->num_textures * sizeof(*numsurfacesfortexture)); memset(numsurfacesfortexture, 0, mod->num_textures * sizeof(*numsurfacesfortexture)); for (j = 0;j < mod->nummodelsurfaces;j++) { -- 2.39.2