Misc: Fix warnings and build

Closes #10396
This commit is contained in:
Nay
2013-07-29 14:24:33 +01:00
parent 3b78023100
commit 1bb3c4a2b4
7 changed files with 19 additions and 12 deletions

View File

@@ -223,7 +223,7 @@ extern int main(int argc, char** argv)
if (affinity & (1 << i))
CPU_SET(i, &mask);
if (int err = sched_setaffinity(0, sizeof(mask), &mask))
if (sched_setaffinity(0, sizeof(mask), &mask))
TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
else
{
@@ -235,7 +235,7 @@ extern int main(int argc, char** argv)
if (highPriority)
{
if (int err = setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
if (setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
TC_LOG_ERROR(LOG_FILTER_AUTHSERVER, "Can't set authserver process priority class, error: %s", strerror(errno));
else
TC_LOG_INFO(LOG_FILTER_AUTHSERVER, "authserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));

View File

@@ -930,7 +930,7 @@ class spell_dk_presence : public SpellScriptLoader
{
AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedBloodPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedFrostPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedUnholyPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply += AuraEffectApplyFn(spell_dk_presence_AuraScript::HandleImprovedUnholyPresence, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_dk_presence_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -985,7 +985,7 @@ class spell_dk_scent_of_blood : public SpellScriptLoader
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_DK_SCENT_OF_BLOOD, true, NULL, aurEff);

View File

@@ -95,7 +95,7 @@ class spell_item_aegis_of_preservation : public SpellScriptLoader
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_AEGIS_HEAL, true, NULL, aurEff);
@@ -279,7 +279,7 @@ class spell_item_desperate_defense : public SpellScriptLoader
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_DESPERATE_RAGE, true, NULL, aurEff);

View File

@@ -215,7 +215,7 @@ class spell_pri_item_greater_heal_refund : public SpellScriptLoader
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ITEM_EFFICIENCY, true, NULL, aurEff);

View File

@@ -50,6 +50,12 @@
extern int m_ServiceStatus;
#endif
#ifdef __linux__
#include <sched.h>
#include <sys/resource.h>
#define PROCESS_HIGH_PRIORITY -15 // [-20, 19], default is 0
#endif
/// Handle worldservers's termination signals
class WorldServerSignalHandler : public Trinity::SignalHandler
{
@@ -231,7 +237,7 @@ int Master::Run()
if (affinity & (1 << i))
CPU_SET(i, &mask);
if (int err = sched_setaffinity(0, sizeof(mask), &mask))
if (sched_setaffinity(0, sizeof(mask), &mask))
TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Can't set used processors (hex): %x, error: %s", affinity, strerror(errno));
else
{
@@ -243,7 +249,7 @@ int Master::Run()
if (highPriority)
{
if (int err = setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
if (setpriority(PRIO_PROCESS, 0, PROCESS_HIGH_PRIORITY))
TC_LOG_ERROR(LOG_FILTER_WORLDSERVER, "Can't set worldserver process priority class, error: %s", strerror(errno));
else
TC_LOG_INFO(LOG_FILTER_WORLDSERVER, "worldserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));

View File

@@ -75,7 +75,8 @@ void RARunnable::run()
while (!World::IsStopped())
{
if (m_Reactor->run_reactor_event_loop(ACE_Time_Value(0, 100000)) == -1)
ACE_Time_Value interval(0, 100000);
if (m_Reactor->run_reactor_event_loop(interval) == -1)
break;
}

View File

@@ -716,8 +716,8 @@ namespace MMAP
params.cs = config.cs;
params.ch = config.ch;
params.tileLayer = 0;
params.buildBvTree = true;
params.buildBvTree = true;
// will hold final navmesh
unsigned char* navData = NULL;
int navDataSize = 0;