Skip to content

Commit

Permalink
Fix signed/unsigned mismatch warning (#428)
Browse files Browse the repository at this point in the history
* Fix signed/unsigned mismatch warning

* Fix GCC type warnings
  • Loading branch information
IgnacioFDM authored and Arkshine committed Apr 4, 2017
1 parent 2863455 commit 2d049b7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion amxmodx/CLang.cpp
Expand Up @@ -589,7 +589,7 @@ const char *CLangMngr::GetLangName(int langId)
{
for (size_t iter = 0; iter < m_Languages.length(); ++iter)
{
if (iter == langId)
if ((int)iter == langId)
{
return m_Languages[iter]->GetName();
}
Expand Down
2 changes: 1 addition & 1 deletion amxmodx/amxmodx.cpp
Expand Up @@ -3166,7 +3166,7 @@ static cell AMX_NATIVE_CALL register_logevent(AMX *amx, cell *params)
auto logevent = LogEventHandles.lookup(handle)->m_logevent;
auto numparam = *params / sizeof(cell);

for (auto i = 3; i <= numparam; ++i)
for (auto i = 3U; i <= numparam; ++i)
{
logevent->registerFilter(get_amxstring(amx, params[i], 0, length));
}
Expand Down
2 changes: 1 addition & 1 deletion amxmodx/file.cpp
Expand Up @@ -601,7 +601,7 @@ static cell AMX_NATIVE_CALL amx_fputs(AMX *amx, cell *params)
++length;
}

if (fp->Write(string, length) != length)
if (fp->Write(string, length) != (size_t)length)
{
return -1;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/cstrike/cstrike/CstrikeItemsInfos.cpp
Expand Up @@ -103,7 +103,7 @@ SMCResult CsItemInfo::ReadSMC_KeyValue(const SMCStates *states, const char *key,
CSI_NONE, CSI_VEST, CSI_VESTHELM, CSI_FLASHBANG, CSI_HEGRENADE, CSI_SMOKEGRENADE, CSI_NVGS, CSI_DEFUSER
};

for (int i = 0; i < ARRAY_LENGTH(equipmentsList); ++i)
for (size_t i = 0; i < ARRAY_LENGTH(equipmentsList); ++i)
{
if (m_AliasInfo.itemid == equipmentsList[i])
{
Expand Down Expand Up @@ -173,7 +173,7 @@ bool CsItemInfo::GetAliasFromId(size_t id, ke::AString &name, ke::AString &altna
{
for (auto iter = m_BuyAliasesList.iter(); !iter.empty(); iter.next())
{
if (iter->value.itemid == id)
if (iter->value.itemid == (int)id)
{
name = iter->key;
altname = iter->value.alt_alias;
Expand Down

0 comments on commit 2d049b7

Please sign in to comment.