Some warning fixes, unreferenced local variables.

This commit is contained in:
KimLS
2013-02-16 22:07:32 -08:00
parent 7c706d9871
commit 15dc9cfaf4
10 changed files with 5 additions and 22 deletions
+1 -3
View File
@@ -2542,7 +2542,7 @@ void Client::Handle_OP_ConsiderCorpse(const EQApplicationPacket *app)
}
}
else if (tcorpse && tcorpse->IsPlayerCorpse()) {
uint32 day, hour, min, sec, ttime, restime;
uint32 day, hour, min, sec, ttime;
if ((ttime = tcorpse->GetDecayTime()) != 0) {
sec = (ttime/1000)%60; // Total seconds
min = (ttime/60000)%60; // Total seconds
@@ -13536,8 +13536,6 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
if(tar) {
int mercTypeCount = 0;
int mercCount = 0;
//int mercStanceCount = 2; // Temporarily Hard Set
int packetSize;
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
-2
View File
@@ -9626,9 +9626,7 @@ void command_object(Client *c, const Seperator *sep)
char errbuf[MYSQL_ERRMSG_SIZE];
char query[512];
char line[256];
uint32 col;
uint32 lastid;
MYSQL_RES *result;
MYSQL_ROW row;
int iObjectsFound = 0;
-3
View File
@@ -2281,7 +2281,6 @@ bool Merc::AICastSpell(int8 iChance, int16 iSpellTypes) {
for( int i = 0; i < MAX_GROUP_MEMBERS; i++) {
if(g->members[i]) {
int32 oDontDoAgainBefore;
Mob* tar = g->members[i];
if( !tar->IsImmuneToSpell(selectedMercSpell.spellid, this)
@@ -3715,8 +3714,6 @@ bool Merc::LoadMercSpells() {
}
Merc* Merc::LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id) {
Merc* merc;
if(c)
{
if(c->GetMercID()) {
-2
View File
@@ -787,7 +787,6 @@ XS(XS_Object_Repop)
Perl_croak(aTHX_ "Usage: Object::Repop(THIS)");
{
Object * THIS;
Const_char * RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "Object")) {
@@ -811,7 +810,6 @@ XS(XS_Object_Depop)
Perl_croak(aTHX_ "Usage: Object::Depop(THIS)");
{
Object * THIS;
Const_char * RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "Object")) {
-1
View File
@@ -395,7 +395,6 @@ bool Client::CheckTitle(int titleset) {
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
MYSQL_RES *result;
MYSQL_ROW row;
if (database.RunQuery(query, MakeAnyLenString(&query, "SELECT `id` FROM player_titlesets WHERE `title_set`=%i AND `char_id`=%i LIMIT 1", titleset, CharacterID()), errbuf, &result)) {
safe_delete_array(query);
-1
View File
@@ -2213,7 +2213,6 @@ void ZoneDatabase::QGlobalPurge()
void ZoneDatabase::InsertDoor(uint32 ddoordbid, uint16 ddoorid, const char* ddoor_name, float dxpos, float dypos, float dzpos, float dheading, uint8 dopentype, uint16 dguildid, uint32 dlockpick, uint32 dkeyitem, uint8 ddoor_param, uint8 dinvert, int dincline, uint16 dsize){
char errbuf[MYSQL_ERRMSG_SIZE];
char *query = 0;
uint32 maxid;
if (!RunQuery(query, MakeAnyLenString(&query, "replace into doors (id, doorid,zone,version,name,pos_x,pos_y,pos_z,heading,opentype,guild,lockpick,keyitem,door_param,invert_state,incline,size) values('%i','%i','%s','%i', '%s','%f','%f','%f','%f','%i','%i','%i', '%i','%i','%i','%i','%i')", ddoordbid ,ddoorid ,zone->GetShortName(), zone->GetInstanceVersion(), ddoor_name, dxpos, dypos, dzpos, dheading, dopentype, dguildid, dlockpick, dkeyitem, ddoor_param, dinvert, dincline, dsize), errbuf)) {
cerr << "Error in InsertDoor" << query << "' " << errbuf << endl;
}