From 47aad1b3a352a2ec96d1bed99616ff871b27fb91 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 13 May 2026 10:46:59 +0500 Subject: [PATCH] ref: soft: cleanup unused variables --- ref/soft/r_main.c | 2 -- ref/soft/r_surf.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ref/soft/r_main.c b/ref/soft/r_main.c index 1c77ecf6..d2d8e20e 100644 --- a/ref/soft/r_main.c +++ b/ref/soft/r_main.c @@ -794,7 +794,6 @@ static void R_DrawBEntitiesOnList( void ) for( i = 0; i < tr.draw_list->num_edge_entities && !FBitSet( RI.rvp.flags, RF_ONLY_CLIENTDRAW ); i++ ) { - int k; RI.currententity = tr.draw_list->edge_entities[i]; RI.currentmodel = RI.currententity->model; if( !RI.currentmodel ) @@ -872,7 +871,6 @@ void R_DrawBrushModel( cl_entity_t *pent ) vec3_t mins, maxs; float minmaxs[6]; mnode_t *topnode; - int k; edge_t ledges[NUMSTACKEDGES + (( CACHE_SIZE - 1 ) / sizeof( edge_t )) + 1]; surf_t lsurfs[NUMSTACKSURFACES diff --git a/ref/soft/r_surf.c b/ref/soft/r_surf.c index c34f4995..3846f670 100644 --- a/ref/soft/r_surf.c +++ b/ref/soft/r_surf.c @@ -852,7 +852,7 @@ static surfcache_t *D_SCAlloc( int width, int size ) if(( size <= 0 ) || ( size > 0x10000000 )) gEngfuncs.Host_Error( "%s: bad cache size %d\n", __func__, size ); - size = (int)&((surfcache_t *)0 )->data[size]; + size = offsetof( surfcache_t, data ) + size; size = ( size + 3 ) & ~3; if( size > sc_size ) gEngfuncs.Host_Error( "%s: %i > cache size of %i", __func__, size, sc_size );