diff options
author | Spp <none@none> | 2010-05-13 00:15:21 +0200 |
---|---|---|
committer | Spp <none@none> | 2010-05-13 00:15:21 +0200 |
commit | a3a8e6da2c6380de7f04bdb0f3f6939e20d493c4 (patch) | |
tree | ed9a57e9c72287b1544f39cfe1bff09492e2a2ce | |
parent | 4a448eca37a5a5409d39d4036db3793cfa27edf8 (diff) |
Some warning fix
Tab to spaces
Remove trailing spaces
--HG--
branch : trunk
-rw-r--r-- | src/game/ItemHandler.cpp | 2 | ||||
-rw-r--r-- | src/scripts/kalimdor/ashenvale.cpp | 6 | ||||
-rw-r--r-- | src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp | 4 | ||||
-rw-r--r-- | src/scripts/northrend/zuldrak.cpp | 17 | ||||
-rw-r--r-- | src/scripts/outland/blades_edge_mountains.cpp | 4 | ||||
-rw-r--r-- | src/scripts/world/areatrigger_scripts.cpp | 2 | ||||
-rw-r--r-- | src/shared/Database/Field.cpp | 16 | ||||
-rw-r--r-- | src/shared/Util.cpp | 2 | ||||
-rw-r--r-- | src/trinitycore/CliRunnable.cpp | 2 | ||||
-rw-r--r-- | src/trinitycore/Master.cpp | 4 | ||||
-rw-r--r-- | src/trinityrealm/Main.cpp | 2 | ||||
-rw-r--r-- | src/trinityrealm/RealmSocket.cpp | 14 |
12 files changed, 42 insertions, 33 deletions
diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index b2cdd67556f..9532a923052 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -772,7 +772,7 @@ void WorldSession::SendListInventory(uint64 vendorguid) // reputation discount int32 price = uint32(floor(pProto->BuyPrice * discountMod)); - data << uint32(vendorslot+1); // client expects counting to start at 1 + data << uint32(vendorslot+1); // client expects counting to start at 1 data << uint32(crItem->item); data << uint32(pProto->DisplayInfoID); data << int32(crItem->maxcount <= 0 ? 0xFFFFFFFF : pCreature->GetVendorItemCurrentCount(crItem)); diff --git a/src/scripts/kalimdor/ashenvale.cpp b/src/scripts/kalimdor/ashenvale.cpp index 654e7ed3146..13e8f442048 100644 --- a/src/scripts/kalimdor/ashenvale.cpp +++ b/src/scripts/kalimdor/ashenvale.cpp @@ -323,7 +323,7 @@ struct npc_muglashAI : public npc_escortAI } } - void Aggro(Unit* pWho) + void Aggro(Unit* /*pWho*/) { if (HasEscortState(STATE_ESCORT_PAUSED)) { @@ -340,7 +340,7 @@ struct npc_muglashAI : public npc_escortAI m_bIsBrazierExtinguished = false; } - void JustDied(Unit* pKiller) + void JustDied(Unit* /*pKiller*/) { Player* pPlayer = GetPlayerForEscort(); if (HasEscortState(STATE_ESCORT_ESCORTING)) @@ -420,7 +420,7 @@ bool QuestAccept_npc_muglash(Player* pPlayer, Creature* pCreature, const Quest* } -bool GOHello_go_naga_brazier(Player* pPlayer, GameObject* pGo) +bool GOHello_go_naga_brazier(Player* /*pPlayer*/, GameObject* pGo) { if (Creature* pCreature = GetClosestCreatureWithEntry(pGo, NPC_MUGLASH, INTERACTION_DISTANCE*2)) { diff --git a/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp b/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp index 3feef804d3b..6de6578f7bb 100644 --- a/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp +++ b/src/scripts/northrend/azjol_nerub/azjol_nerub/boss_anubarak.cpp @@ -157,7 +157,7 @@ struct boss_anub_arakAI : public ScriptedAI return NULL; } - void EnterCombat(Unit *pWho) + void EnterCombat(Unit * /*pWho*/) { DoScriptText(SAY_AGGRO, me); if (pInstance) @@ -323,7 +323,7 @@ struct boss_anub_arakAI : public ScriptedAI } } - void JustDied(Unit *pKiller) + void JustDied(Unit * /*pKiller*/) { DoScriptText(SAY_DEATH, me); lSummons.DespawnAll(); diff --git a/src/scripts/northrend/zuldrak.cpp b/src/scripts/northrend/zuldrak.cpp index 29b293154c9..129f0be7c6a 100644 --- a/src/scripts/northrend/zuldrak.cpp +++ b/src/scripts/northrend/zuldrak.cpp @@ -1021,15 +1021,18 @@ enum eScourgeEnclosure bool GOHello_go_scourge_enclosure(Player *pPlayer, GameObject *pGO) { - Creature *pGymerDummy; - if (pPlayer->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE && - (pGymerDummy = pGO->FindNearestCreature(NPC_GYMER_DUMMY,20.0f))) + + if (pPlayer->GetQuestStatus(QUEST_OUR_ONLY_HOPE) == QUEST_STATUS_INCOMPLETE) + { + Creature *pGymerDummy = pGO->FindNearestCreature(NPC_GYMER_DUMMY,20.0f); + if (pGymerDummy) { - pGO->UseDoorOrButton(); - pPlayer->KilledMonsterCredit(pGymerDummy->GetEntry(),pGymerDummy->GetGUID()); - pGymerDummy->CastSpell(pGymerDummy, 55529, true); - pGymerDummy->DisappearAndDie(); + pGO->UseDoorOrButton(); + pPlayer->KilledMonsterCredit(pGymerDummy->GetEntry(),pGymerDummy->GetGUID()); + pGymerDummy->CastSpell(pGymerDummy, 55529, true); + pGymerDummy->DisappearAndDie(); } + } return true; } diff --git a/src/scripts/outland/blades_edge_mountains.cpp b/src/scripts/outland/blades_edge_mountains.cpp index 7d2b56d872d..f5b4539edaf 100644 --- a/src/scripts/outland/blades_edge_mountains.cpp +++ b/src/scripts/outland/blades_edge_mountains.cpp @@ -442,7 +442,7 @@ struct npc_ogre_bruteAI : public ScriptedAI } } - void MovementInform(uint32 type, uint32 id) + void MovementInform(uint32 /*type*/, uint32 id) { Player* pPlayer = Unit::GetPlayer(PlayerGUID); if (id == 1) @@ -459,7 +459,7 @@ struct npc_ogre_bruteAI : public ScriptedAI } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 /*diff*/) { if (!UpdateVictim()) return; diff --git a/src/scripts/world/areatrigger_scripts.cpp b/src/scripts/world/areatrigger_scripts.cpp index 05764a18ad3..9a75263d35c 100644 --- a/src/scripts/world/areatrigger_scripts.cpp +++ b/src/scripts/world/areatrigger_scripts.cpp @@ -191,7 +191,7 @@ enum eScentLarkorwi NPC_LARKORWI_MATE = 9683 }; -bool AreaTrigger_at_scent_larkorwi(Player* pPlayer, const AreaTriggerEntry* pAt) +bool AreaTrigger_at_scent_larkorwi(Player* pPlayer, const AreaTriggerEntry* /*pAt*/) { if (!pPlayer->isDead() && pPlayer->GetQuestStatus(QUEST_SCENT_OF_LARKORWI) == QUEST_STATUS_INCOMPLETE) { diff --git a/src/shared/Database/Field.cpp b/src/shared/Database/Field.cpp index 8a02ec716e3..191a2884aac 100644 --- a/src/shared/Database/Field.cpp +++ b/src/shared/Database/Field.cpp @@ -31,8 +31,12 @@ Field::Field(Field &f) value = f.GetString(); - if (value && (mValue = new char[strlen(value) + 1])) - strcpy(mValue, value); + if (value) + { + mValue = new char[strlen(value) + 1]; + if (mValue) + strcpy(mValue, value); + } else mValue = NULL; @@ -42,8 +46,12 @@ Field::Field(Field &f) Field::Field(const char *value, enum Field::DataTypes type) : mType(type) { - if (value && (mValue = new char[strlen(value) + 1])) - strcpy(mValue, value); + if (value) + { + mValue = new char[strlen(value) + 1]; + if (mValue) + strcpy(mValue, value); + } else mValue = NULL; } diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp index 3c5e365b749..a3c017fdbfd 100644 --- a/src/shared/Util.cpp +++ b/src/shared/Util.cpp @@ -425,7 +425,7 @@ void utf8printf(FILE *out, const char *str, ...) { va_list ap; va_start(ap, str); - vutf8printf(stdout, str, &ap); + vutf8printf(out, str, &ap); va_end(ap); } diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp index 688b9556874..b39faf694db 100644 --- a/src/trinitycore/CliRunnable.cpp +++ b/src/trinitycore/CliRunnable.cpp @@ -375,7 +375,7 @@ void CliRunnable::run() WorldDatabase.ThreadStart(); // let thread do safe mySQL requests char commandbuf[256]; - bool canflush = true; + ///- Display the list of available CLI functions then beep sLog.outString(""); #if PLATFORM != WINDOWS diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index 81e31c0ca30..ff9085a62ab 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -304,8 +304,6 @@ int Master::Run() uint32 realCurrTime, realPrevTime; realCurrTime = realPrevTime = getMSTime(); - uint32 socketSelecttime = sWorld.getConfig(CONFIG_SOCKET_SELECTTIME); - ///- Start up freeze catcher thread if(uint32 freeze_delay = sConfig.GetIntDefault("MaxCoreStuckTime", 0)) { @@ -386,7 +384,7 @@ int Master::Run() b[3].Event.KeyEvent.wVirtualScanCode = 0x1c; b[3].Event.KeyEvent.wRepeatCount = 1; DWORD numb; - BOOL ret = WriteConsoleInput(hStdIn, b, 4, &numb); + WriteConsoleInput(hStdIn, b, 4, &numb); cliThread->wait(); diff --git a/src/trinityrealm/Main.cpp b/src/trinityrealm/Main.cpp index 9d7669864d9..ebd232c465c 100644 --- a/src/trinityrealm/Main.cpp +++ b/src/trinityrealm/Main.cpp @@ -202,7 +202,7 @@ extern int main(int argc, char **argv) ///- Launch the listening network socket RealmAcceptor acceptor; - + uint16 rmport = sConfig.GetIntDefault("RealmServerPort", DEFAULT_REALMSERVER_PORT); std::string bind_ip = sConfig.GetStringDefault("BindIP", "0.0.0.0"); diff --git a/src/trinityrealm/RealmSocket.cpp b/src/trinityrealm/RealmSocket.cpp index 2792d7fb914..581e2c0a659 100644 --- a/src/trinityrealm/RealmSocket.cpp +++ b/src/trinityrealm/RealmSocket.cpp @@ -52,7 +52,7 @@ RealmSocket::RealmSocket(void): msg_queue()->high_water_mark(8*1024*1024); msg_queue()->low_water_mark(8*1024*1024); - + } RealmSocket::~RealmSocket(void) @@ -62,13 +62,13 @@ RealmSocket::~RealmSocket(void) if (input_buffer_.length() != 0) input_buffer_.release(); - + // delete RealmSocketObject must never be called from our code. closing_ = true; if (session_) delete session_; - + peer().close(); } @@ -83,7 +83,7 @@ int RealmSocket::open(void * arg) } remote_address_ = addr.get_host_addr(); - + // Register with ACE Reactor if (Base::open(arg) == -1) return -1; @@ -102,7 +102,7 @@ int RealmSocket::open(void * arg) int RealmSocket::close(int) { shutdown(); - + closing_ = true; remove_reference(); @@ -267,7 +267,7 @@ int RealmSocket::handle_output(ACE_HANDLE /*= ACE_INVALID_HANDLE*/) ACE_NOTREACHED(return -1); } -int RealmSocket::handle_close(ACE_HANDLE h, ACE_Reactor_Mask m) +int RealmSocket::handle_close(ACE_HANDLE h, ACE_Reactor_Mask /*m*/) { // As opposed to WorldSocket::handle_close, we don't need locks here. @@ -275,7 +275,7 @@ int RealmSocket::handle_close(ACE_HANDLE h, ACE_Reactor_Mask m) if (h == ACE_INVALID_HANDLE) peer ().close_writer (); - + if (session_ != NULL) { session_->OnClose(); |