From b0eed6836380693b544f871309e8530ae90dc526 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Sun, 20 Dec 2020 18:55:24 +0000 Subject: [PATCH] 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 --- model_shared.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2