Add -Wshadow to compiler warnings
This commit is contained in:
parent
54a798ad2e
commit
3d8979f769
|
|
@ -11,7 +11,7 @@ set(ASM_SOURCES
|
|||
${SOURCE_DIR}/asm/snapvector.c
|
||||
)
|
||||
|
||||
add_compile_options(-Wall -Wimplicit
|
||||
add_compile_options(-Wall -Wimplicit -Wshadow
|
||||
-Wstrict-prototypes -Wformat=2 -Wformat-security
|
||||
-Wstrict-aliasing=2 -Wmissing-format-attribute
|
||||
-Wdisabled-optimization -Werror-implicit-function-declaration)
|
||||
|
|
|
|||
|
|
@ -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 ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user