Add -Wshadow to compiler warnings

This commit is contained in:
Tim Angus committed 2025-09-08 21:22:31 +01:00
1 parent 54a798ad2e
commit 3d8979f769
3 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -1044,7 +1044,7 @@ DRAWSURF SORTING
R_Radix
===============
*/
static ID_INLINE void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_t *dest )
static ID_INLINE void R_Radix( int offset, int size, drawSurf_t *source, drawSurf_t *dest )
{
int count[ 256 ] = { 0 };
int index[ 256 ];
@@ -1052,7 +1052,7 @@ static ID_INLINE void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_
unsigned char *sortKey = NULL;
unsigned char *end = NULL;
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + byte;
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + offset;
end = sortKey + ( size * sizeof( drawSurf_t ) );
for( ; sortKey < end; sortKey += sizeof( drawSurf_t ) )
++count[ *sortKey ];
@@ -1062,7 +1062,7 @@ static ID_INLINE void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_
for( i = 1; i < 256; ++i )
index[ i ] = index[ i - 1 ] + count[ i - 1 ];
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + byte;
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + offset;
for( i = 0; i < size; ++i, sortKey += sizeof( drawSurf_t ) )
dest[ index[ *sortKey ]++ ] = source[ i ];
}
+3 -3
View File
@@ -1403,7 +1403,7 @@ DRAWSURF SORTING
R_Radix
===============
*/
static ID_INLINE void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_t *dest )
static ID_INLINE void R_Radix( int offset, int size, drawSurf_t *source, drawSurf_t *dest )
{
int count[ 256 ] = { 0 };
int index[ 256 ];
@@ -1411,7 +1411,7 @@ static ID_INLINE void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_
unsigned char *sortKey = NULL;
unsigned char *end = NULL;
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + byte;
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + offset;
end = sortKey + ( size * sizeof( drawSurf_t ) );
for( ; sortKey < end; sortKey += sizeof( drawSurf_t ) )
++count[ *sortKey ];
@@ -1421,7 +1421,7 @@ static ID_INLINE void R_Radix( int byte, int size, drawSurf_t *source, drawSurf_
for( i = 1; i < 256; ++i )
index[ i ] = index[ i - 1 ] + count[ i - 1 ];
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + byte;
sortKey = ( (unsigned char *)&source[ 0 ].sort ) + offset;
for( i = 0; i < size; ++i, sortKey += sizeof( drawSurf_t ) )
dest[ index[ *sortKey ]++ ] = source[ i ];
}