From 525825c2158219b7eada30f1c4169906ec7301ac Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 3 Aug 2012 19:28:15 +0200 Subject: [PATCH] fixed some warnings with gcc --- src/engine/client/serverbrowser.cpp | 2 -- src/game/client/components/hud.cpp | 2 +- src/game/client/components/menus.h | 2 +- src/game/client/components/menus_browser.cpp | 1 - src/game/client/components/menus_settings.cpp | 4 +--- src/game/client/components/players.cpp | 1 - 6 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp index 5715d45df..152181cf3 100644 --- a/src/engine/client/serverbrowser.cpp +++ b/src/engine/client/serverbrowser.cpp @@ -315,8 +315,6 @@ int CServerBrowser::CServerFilter::SortHash() const void CServerBrowser::CServerFilter::Sort() { - int i; - // create filtered list Filter(); diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index 68e2a759b..d0cb0b34f 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -228,7 +228,7 @@ void CHud::RenderScoreHud() { int Local = -1; int aPos[2] = { 1, 2 }; - CGameClient::CPlayerInfoItem aPlayerInfo[2] = {0}; + CGameClient::CPlayerInfoItem aPlayerInfo[2] = {{0}}; int i = 0; for(int t = 0; t < 2 && i < MAX_CLIENTS && m_pClient->m_Snap.m_aInfoByScore[i].m_pPlayerInfo; ++i) { diff --git a/src/game/client/components/menus.h b/src/game/client/components/menus.h index 53673c214..1efe7016c 100644 --- a/src/game/client/components/menus.h +++ b/src/game/client/components/menus.h @@ -207,7 +207,7 @@ class CMenus : public CComponent char m_aSaveSkinName[24]; void SaveSkinfile(); - void WriteLineSkinfile(IOHANDLE File, char *pLine); + void WriteLineSkinfile(IOHANDLE File, const char *pLine); // bool m_EscapePressed; diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 44cea083f..dedafd890 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -375,7 +375,6 @@ bool CMenus::RenderFilterHeader(CUIRect View, int FilterIndex) View.VSplitLeft(50.0f, 0, &Label); Label.HMargin(2.0f, &Label); - char aBuf[256]; if(pFilter->Custom() <= CBrowserFilter::FILTER_ALL) UI()->DoLabel(&Label, pFilter->Name(), 12.0f, -1); else diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 321a67eee..520e4571d 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -115,7 +115,7 @@ void CMenus::SaveSkinfile() io_close(File); } -void CMenus::WriteLineSkinfile(IOHANDLE File, char *pLine) +void CMenus::WriteLineSkinfile(IOHANDLE File, const char *pLine) { io_write(File, pLine, str_length(pLine)); io_write_newline(File); @@ -1522,8 +1522,6 @@ void CMenus::RenderSettingsSound(CUIRect MainView) void CMenus::RenderSettings(CUIRect MainView) { - static int s_SettingsPage = 0; - CUIRect RestartWarning; MainView.HSplitBottom(15.0f, &MainView, &RestartWarning); RenderTools()->DrawUIRect(&MainView, ms_ColorTabbarActive, CUI::CORNER_ALL, 10.0f); diff --git a/src/game/client/components/players.cpp b/src/game/client/components/players.cpp index b98788b3a..54faea4f9 100644 --- a/src/game/client/components/players.cpp +++ b/src/game/client/components/players.cpp @@ -96,7 +96,6 @@ void CPlayers::RenderHook( Prev = *pPrevChar; Player = *pPlayerChar; - CNetObj_PlayerInfo pInfo = *pPlayerInfo; CTeeRenderInfo RenderInfo = m_aRenderInfo[ClientID]; float IntraTick = Client()->IntraGameTick();