add some missing casts
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 May 2009 19:43:13 +0000 (19:43 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 May 2009 19:43:13 +0000 (19:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8982 d7cf8633-e32d-0410-b094-e92efae38249

console.c
keys.c
model_shared.c

index ad220a3..8f23f32 100644 (file)
--- 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 2d7431f..bfe77d2 100644 (file)
--- 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) )
index 6b06ead..842d2b7 100644 (file)
@@ -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++)
        {