diff --git a/code/ui/ui_atoms.c b/code/ui/ui_atoms.c index 4b4406a..ad6eb30 100644 --- a/code/ui/ui_atoms.c +++ b/code/ui/ui_atoms.c @@ -1716,7 +1716,6 @@ rankset to that new data void UI_InitRanksData( char* ranksName ) { char filePath[MAX_QPATH]; - int i; if ( !Q_stricmp( uis.rankSet.rankSetName, ranksName ) ) goto refreshRank; @@ -1745,7 +1744,8 @@ void UI_InitRanksData( char* ranksName ) { refreshRank: /* using our current cvar'd rank, do a compare. if we find a match, set our player to that rank in the menu */ - for ( i=0, uis.currentRank=0; i < MAX_RANKS; i++ ) { + int i; + for ( int i=0, uis.currentRank=0; i < MAX_RANKS; i++ ) { if ( !Q_stricmp( uis.rankSet.rankNames[i].consoleName, UI_Cvar_VariableString( "ui_playerRank" ) ) ) { uis.currentRank = i; break; @@ -2929,7 +2929,6 @@ void UI_SecurityCodeSetup ( void ) int fileLen; rpgxSecurityFile_t *code; rpgxSecurityFile_t wCode; - unsigned long bit=0; static qboolean ui_SecuritySetup=qfalse; /* QVM Hack */ @@ -2997,6 +2996,7 @@ void UI_SecurityCodeSetup ( void ) /* generate our player hash */ while ( code->hash == 0 || code->hash == SECURITY_HASH ) { + unsigned long bit=0; /* set a pretty good random seed */ srand( trap_Milliseconds() ); /*code->hash = (int)(rand() / (((double)RAND_MAX + 1)/ SECURITY_HASH));*/ diff --git a/code/ui/ui_cdkey.c b/code/ui/ui_cdkey.c index 2a0f820..d868202 100644 --- a/code/ui/ui_cdkey.c +++ b/code/ui/ui_cdkey.c @@ -129,7 +129,6 @@ static void UI_CDKeyMenu_DrawKey( void *self ) menufield_s *f; qboolean focus; int style; - char c; float *color; int x, y; @@ -157,6 +156,7 @@ static void UI_CDKeyMenu_DrawKey( void *self ) // draw cursor if we have focus if( focus ) { + char c; if ( trap_Key_GetOverstrikeMode() ) { c = 11; diff --git a/code/ui/ui_connect.c b/code/ui/ui_connect.c index 12372a3..baa6384 100644 --- a/code/ui/ui_connect.c +++ b/code/ui/ui_connect.c @@ -63,7 +63,6 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { int downloadSize, downloadCount, downloadTime; char dlSizeBuf[64], totalSizeBuf[64], xferRateBuf[64], dlTimeBuf[64]; - int xferRate; int width, leftWidth; int style = UI_LEFT|UI_SMALLFONT|UI_DROPSHADOW; const char *s; @@ -100,6 +99,7 @@ static void UI_DisplayDownloadInfo( const char *downloadName ) { UI_DrawProportionalString( leftWidth, etaYpos, estimating, style, color_white ); UI_DrawProportionalString( leftWidth, copiedYpos, va(XofXcopied, dlSizeBuf, totalSizeBuf), style, color_white ); } else { + int xferRate; if ((uis.realtime - downloadTime) / 1000) { xferRate = downloadCount / ((uis.realtime - downloadTime) / 1000); } else { diff --git a/code/ui/ui_controls2.c b/code/ui/ui_controls2.c index 07129da..8fa1075 100644 --- a/code/ui/ui_controls2.c +++ b/code/ui/ui_controls2.c @@ -942,7 +942,6 @@ static void Controls_DrawKeyBinding( void *self ) int x,bindingX; int y; int b1; - int b2; qboolean c; char name[32]; char name2[32]; @@ -970,7 +969,7 @@ static void Controls_DrawKeyBinding( void *self ) trap_Key_KeynumToStringBuf( b1, name, 32 ); Q_strupr(name); - b2 = g_bindings[a->generic.id].bind2; + int b2 = g_bindings[a->generic.id].bind2; if (b2 != -1) { trap_Key_KeynumToStringBuf( b2, name2, 32 ); diff --git a/code/ui/ui_emotes.c b/code/ui/ui_emotes.c index a11000b..2809d68 100644 --- a/code/ui/ui_emotes.c +++ b/code/ui/ui_emotes.c @@ -1065,7 +1065,6 @@ static sfxHandle_t PlayerEmotes_KeyEvent ( int key ) { menucommon_s *s; int i; char command[256]; - int emoteId; s = (menucommon_s *)Menu_ItemAtCursor( &s_playerEmotes.menu ); @@ -1134,7 +1133,7 @@ static sfxHandle_t PlayerEmotes_KeyEvent ( int key ) { if ( key == K_MOUSE2 && ( s->id >= ID_EMOTELIST1 && s->id <= ID_EMOTELIST12 ) ) { PlayerEmotes_ExecuteOffset(); - emoteId = s_playerEmotes.mainEmotesList[ ((s->id - 100)-1)+s_playerEmotes.emoteListOffset ]; + int emoteId = s_playerEmotes.mainEmotesList[ ((s->id - 100)-1)+s_playerEmotes.emoteListOffset ]; if ( emoteId >= 0 && emoteId < bg_numEmotes ) { trap_Cmd_ExecuteText( EXEC_APPEND, va( "wait 5;emote %s\n", bg_emoteList[emoteId].name ) ); diff --git a/code/ui/ui_fonts.c b/code/ui/ui_fonts.c index 0c2e744..dc4741c 100644 --- a/code/ui/ui_fonts.c +++ b/code/ui/ui_fonts.c @@ -39,13 +39,13 @@ M_GridFont_Graphics */ void M_GridFont_Graphics (void) { - int x,y,color; + int x,y; int i,i2,xInc; char character[2]; character[1] = 0; y = 190; - color = CT_LTORANGE; + int color = CT_LTORANGE; for (i=32;i<256;) { x = 100; @@ -236,12 +236,10 @@ Fonts_MenuEvent */ static void Fonts_MenuEvent( void* ptr, int notification ) { - menuframework_s* m; - if (notification != QM_ACTIVATED) return; - m = ((menucommon_s*)ptr)->parent; + menuframework_s* m = ((menucommon_s*)ptr)->parent; switch (((menucommon_s*)ptr)->id) { diff --git a/crashtestdummie.txt b/crashtestdummie.txt deleted file mode 100644 index 9a36bec..0000000 --- a/crashtestdummie.txt +++ /dev/null @@ -1 +0,0 @@ -Just a test file to make sure I understand the branching in git \ No newline at end of file