]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 ad220a3f1f9136ff192205add1a7297deb50a45b..8f23f324b152718dacb5263663eb88ba8fb7996c 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 2d7431fa2e79ea980e93079504a26e170ded1a63..bfe77d26a0ced1309d2a7e7e1bfa975a3b9a9a2b 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 6b06ead1b18ac63c8408b52c172c1dff87513c46..842d2b7ddaadada0ac3b4abf2324013e4e5b3920 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++)
        {