diff --git a/core/systems/PluginSys.cpp b/core/systems/PluginSys.cpp index 9e2a52db..1a7b5520 100644 --- a/core/systems/PluginSys.cpp +++ b/core/systems/PluginSys.cpp @@ -1328,7 +1328,6 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng void CPluginManager::AddCoreNativesToPlugin(CPlugin *pPlugin) { IPluginContext *pContext = pPlugin->GetBaseContext(); - sp_context_t *ctx = pContext->GetContext(); uint32_t natives = pContext->GetNativesNum(); diff --git a/core/vm/sp_vm_basecontext.cpp b/core/vm/sp_vm_basecontext.cpp index 9b2efa26..e47da310 100644 --- a/core/vm/sp_vm_basecontext.cpp +++ b/core/vm/sp_vm_basecontext.cpp @@ -642,7 +642,7 @@ int BaseContext::BindNative(const sp_nativeinfo_t *native) return SP_ERROR_NONE; } -int BaseContext::BindNativeToIndex(uint32_t index, SPVM_NATIVE_FUNC native) +int BaseContext::BindNativeToIndex(uint32_t index, SPVM_NATIVE_FUNC func) { int err; sp_native_t *native; @@ -652,7 +652,7 @@ int BaseContext::BindNativeToIndex(uint32_t index, SPVM_NATIVE_FUNC native) return err; } - ctx->natives[index].pfn = native; + ctx->natives[index].pfn = func; ctx->natives[index].status = SP_NATIVE_BOUND; return SP_ERROR_NONE;