aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/authserver/Main.cpp4
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp4
-rw-r--r--src/server/scripts/Spells/spell_item.cpp4
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp2
-rw-r--r--src/server/worldserver/Master.cpp10
-rw-r--r--src/server/worldserver/RemoteAccess/RARunnable.cpp3
-rw-r--r--src/tools/mmaps_generator/MapBuilder.cpp4
7 files changed, 19 insertions, 12 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index ac2cf1a80a9..9a6cc89fdd4 100644
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -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));
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index eb7ccc54c37..e1305d71b73 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -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);
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 64fc835bff9..09be427d330 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -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);
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 8d43f8e01fc..0d3da30377a 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -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);
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index 88a69cf2eb2..6fd57179140 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -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));
diff --git a/src/server/worldserver/RemoteAccess/RARunnable.cpp b/src/server/worldserver/RemoteAccess/RARunnable.cpp
index c381c65e9e2..1493df7aa2f 100644
--- a/src/server/worldserver/RemoteAccess/RARunnable.cpp
+++ b/src/server/worldserver/RemoteAccess/RARunnable.cpp
@@ -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;
}
diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp
index 9dfdf95643d..06a764690ca 100644
--- a/src/tools/mmaps_generator/MapBuilder.cpp
+++ b/src/tools/mmaps_generator/MapBuilder.cpp
@@ -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;