]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
model_shared: Fix compile warning and error with gcc
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 Dec 2020 18:55:24 +0000 (18:55 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 20 Dec 2020 18:55:24 +0000 (18:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13075 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index f43229ca3d48837c8387cab79e1a634bee237651..15e9fd9895c6e7e5e0fa54083b39587c3dccd9d3 100644 (file)
@@ -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