From: cloudwalk Date: Sun, 20 Dec 2020 18:55:24 +0000 (+0000) Subject: model_shared: Fix compile warning and error with gcc X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b0eed6836380693b544f871309e8530ae90dc526;p=xonotic%2Fdarkplaces.git model_shared: Fix compile warning and error with gcc git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13075 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_shared.c b/model_shared.c index f43229ca..15e9fd98 100644 --- a/model_shared.c +++ b/model_shared.c @@ -2891,7 +2891,7 @@ typedef struct Mod_MakeSortedSurfaces_qsortsurface_s } Mod_MakeSortedSurfaces_qsortsurface_t; -int Mod_MakeSortedSurfaces_qsortfunc(const void *a, const void *b) +static int Mod_MakeSortedSurfaces_qsortfunc(const void *a, const void *b) { const Mod_MakeSortedSurfaces_qsortsurface_t* l = (Mod_MakeSortedSurfaces_qsortsurface_t*)a; const Mod_MakeSortedSurfaces_qsortsurface_t* r = (Mod_MakeSortedSurfaces_qsortsurface_t*)b; @@ -4658,7 +4658,7 @@ static void Mod_Mesh_MakeSortedSurfaces(model_t *mod) { int i, j; texture_t *tex; - unsigned char* included = R_FrameData_Alloc(mod->num_surfaces * sizeof(unsigned char)); + unsigned char* included = (unsigned char *)R_FrameData_Alloc(mod->num_surfaces * sizeof(unsigned char)); // build the sorted surfaces list properly to reduce material setup // this is easy because we're just sorting on texture and don't care about the order of textures