From 6bea95dbfa2955fce9ab8d85ba32e976e785bfd1 Mon Sep 17 00:00:00 2001 From: oy Date: Sat, 27 Oct 2018 17:48:47 +0200 Subject: [PATCH] fixed some warnings --- src/game/client/components/chat.cpp | 2 +- src/game/client/components/menus_browser.cpp | 2 +- src/game/client/components/menus_settings.cpp | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp index f133769c4..5123ef1ae 100644 --- a/src/game/client/components/chat.cpp +++ b/src/game/client/components/chat.cpp @@ -430,7 +430,7 @@ void CChat::AddLine(int ClientID, int Mode, const char *pLine) { int Length = str_length(m_pClient->m_aClients[m_pClient->m_LocalClientID].m_aName); if((pLine == pHL || pHL[-1] == ' ') // space or nothing before - && ((pHL[Length] == 0 || pHL[Length] == ' ') || pHL[Length] == ':' && (pHL[Length+1] == 0) || pHL[Length+1] == ' ')) // space or nothing after, allowing a colon + && (((pHL[Length] == 0 || pHL[Length] == ' ') || pHL[Length] == ':') && (pHL[Length+1] == 0 || pHL[Length+1] == ' '))) // space or nothing after, allowing a colon { Highlighted = true; } diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index cd6093a7e..f081f9800 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -135,7 +135,7 @@ void CMenus::CBrowserFilter::SetFilter(const CServerFilterInfo *pFilterInfo) void CMenus::LoadFilters() { // read file data into buffer - char *pFilename = "ui_settings.json"; + const char *pFilename = "ui_settings.json"; IOHANDLE File = Storage()->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL); if(!File) return; diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 49838e8ed..4c0b69aa2 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -1236,7 +1236,6 @@ bool CMenus::DoResolutionList(CUIRect* pRect, CListBoxState* pListBoxState, void CMenus::RenderSettingsGraphics(CUIRect MainView) { - char aBuf[128]; bool CheckSettings = false; static int s_GfxScreenWidth = g_Config.m_GfxScreenWidth;