Remove -Wno-switch and fix up SDKHooks / SDKTools to compile.

This commit is contained in:
Asher Baker 2015-11-04 17:14:22 +00:00 committed by Nicholas Hastings
parent bf6f9624ee
commit a9465b1fa1
5 changed files with 10 additions and 4 deletions

View File

@ -201,8 +201,6 @@ class SMConfig(object):
'-Wall',
'-Werror',
'-Wno-unused',
'-Wno-switch',
'-Wno-array-bounds',
'-msse',
'-m32',
'-fvisibility=hidden',

View File

@ -724,6 +724,9 @@ HookReturn SDKHooks::Hook(int entity, SDKHookType type, IPluginFunction *callbac
case SDKHook_CanBeAutobalanced:
hookid = SH_ADD_MANUALVPHOOK(CanBeAutobalanced, pEnt, SH_MEMBER(&g_Interface, &SDKHooks::Hook_CanBeAutobalanced), false);
break;
case SDKHook_MAXHOOKS:
// This is checked up above.
break;
}
vhook.SetHookID(hookid);

View File

@ -47,6 +47,8 @@ cell_t Native_Hook(IPluginContext *pContext, const cell_t *params)
HookReturn ret = g_Interface.Hook(entity, type, callback);
switch (ret)
{
case HookRet_Successful:
break;
case HookRet_InvalidEntity:
pContext->ThrowNativeError("Entity %d is invalid", entity);
break;

View File

@ -364,6 +364,9 @@ static cell_t SDKCall(IPluginContext *pContext, const cell_t *params)
startparam++;
}
break;
case ValveCall_Static:
// This should never happen as we require a thisptr to get here.
return pContext->ThrowNativeError("Internal consistency error: static call with thisptr");
}
}

View File

@ -273,9 +273,9 @@ DataStatus EncodeValveParam(IPluginContext *pContext,
return Data_Okay;
}
default:
return Data_Fail;
}
return Data_Fail;
}
DataStatus DecodeValveParam(IPluginContext *pContext,