more warnings

This commit is contained in:
Denis Pauk 2018-07-23 17:02:24 +03:00
parent 789cd0128a
commit ad771fdd99

View file

@ -69,7 +69,7 @@ qboolean r_dowarp;
mvertex_t *r_pcurrentvertbase;
int c_surf;
static int r_maxsurfsseen, r_maxedgesseen, r_cnumsurfs;
static int r_cnumsurfs;
int r_clipflags;
//
@ -407,7 +407,6 @@ void R_NewMap (void)
if (r_cnumsurfs <= NUMSTACKSURFACES)
r_cnumsurfs = NUMSTACKSURFACES;
{
surfaces = malloc (r_cnumsurfs * sizeof(surf_t));
if (!surfaces)
{
@ -421,10 +420,6 @@ void R_NewMap (void)
// surface 0 doesn't really exist; it's just a dummy because index 0
// is used to indicate no edge attached to surface
surfaces--;
}
r_maxedgesseen = 0;
r_maxsurfsseen = 0;
r_numallocatededges = sw_maxedges->value;
@ -432,9 +427,21 @@ void R_NewMap (void)
r_numallocatededges = NUMSTACKEDGES;
r_edges = malloc (r_numallocatededges * sizeof(edge_t));
if (!r_edges)
{
R_Printf(PRINT_ALL, "%s: Couldn't malloc %d bytes\n",
__func__, (int)(r_numallocatededges * sizeof(edge_t)));
return;
}
r_numallocatedverts = MAXALIASVERTS;
finalverts = malloc(r_numallocatedverts * sizeof(finalvert_t));
if (!finalverts)
{
R_Printf(PRINT_ALL, "%s: Couldn't malloc %d bytes\n",
__func__, (int)(r_numallocatedverts * sizeof(finalvert_t)));
return;
}
finalverts_max = &finalverts[r_numallocatedverts];
R_Printf(PRINT_ALL, "%s: Allocated %d edges\n",