Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings

This commit is contained in:
Thilo Schulz 2011-07-29 12:27:00 +00:00
parent 1ea7ab1f42
commit 23f6fd1633
85 changed files with 246 additions and 496 deletions

View file

@ -82,7 +82,7 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) {
downloadCount = trap_Cvar_VariableValue( "cl_downloadCount" );
downloadTime = trap_Cvar_VariableValue( "cl_downloadTime" );
leftWidth = width = UI_ProportionalStringWidth( dlText ) * UI_ProportionalSizeScale( style );
leftWidth = UI_ProportionalStringWidth( dlText ) * UI_ProportionalSizeScale( style );
width = UI_ProportionalStringWidth( etaText ) * UI_ProportionalSizeScale( style );
if (width > leftWidth) leftWidth = width;
width = UI_ProportionalStringWidth( xferText ) * UI_ProportionalSizeScale( style );

View file

@ -111,20 +111,6 @@ static void Demos_MenuEvent( void *ptr, int event ) {
}
/*
=================
UI_DemosMenu_Key
=================
*/
static sfxHandle_t UI_DemosMenu_Key( int key ) {
menucommon_s *item;
item = Menu_ItemAtCursor( &s_demos.menu );
return Menu_DefaultKey( &s_demos.menu, key );
}
/*
===============
Demos_MenuInit
@ -137,7 +123,6 @@ static void Demos_MenuInit( void ) {
int protocol, protocolLegacy;
memset( &s_demos, 0 ,sizeof(demos_t) );
s_demos.menu.key = UI_DemosMenu_Key;
Demos_Cache();

View file

@ -623,7 +623,7 @@ void UI_SPSkillMenu_Cache( void );
// ui_syscalls.c
//
void trap_Print( const char *string );
void trap_Error( const char *string );
void trap_Error( const char *string ) __attribute__((noreturn));
int trap_Milliseconds( void );
void trap_Cvar_Register( vmCvar_t *vmCvar, const char *varName, const char *defaultValue, int flags );
void trap_Cvar_Update( vmCvar_t *vmCvar );

View file

@ -334,7 +334,6 @@ void MenuField_Draw( menufield_s *f )
int x;
int y;
int w;
int h;
int style;
qboolean focus;
float *color;
@ -345,13 +344,11 @@ void MenuField_Draw( menufield_s *f )
if (f->generic.flags & QMF_SMALLFONT)
{
w = SMALLCHAR_WIDTH;
h = SMALLCHAR_HEIGHT;
style = UI_SMALLFONT;
}
else
{
w = BIGCHAR_WIDTH;
h = BIGCHAR_HEIGHT;
style = UI_BIGFONT;
}

View file

@ -739,13 +739,11 @@ void ArenaServers_LoadFavorites( void )
int i;
int j;
int numtempitems;
char emptyinfo[MAX_INFO_STRING];
char adrstr[MAX_ADDRESSLENGTH];
servernode_t templist[MAX_FAVORITESERVERS];
qboolean found;
found = qfalse;
emptyinfo[0] = '\0';
// copy the old
memcpy( templist, g_favoriteserverlist, sizeof(servernode_t)*MAX_FAVORITESERVERS );

View file

@ -725,7 +725,6 @@ static void UI_SPLevelMenu_Init( void ) {
skill = (int)trap_Cvar_VariableValue( "g_spSkill" );
if( skill < 1 || skill > 5 ) {
trap_Cvar_Set( "g_spSkill", "2" );
skill = 2;
}
memset( &levelMenuInfo, 0, sizeof(levelMenuInfo) );