mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Some warning fixes, unreferenced local variables.
This commit is contained in:
parent
7c706d9871
commit
15dc9cfaf4
@ -216,8 +216,6 @@ void HttpdSocket::OnData(const char *p,size_t l)
|
||||
|
||||
void HttpdSocket::Send64(const std::string& str64, const std::string& type)
|
||||
{
|
||||
Base64 bb;
|
||||
|
||||
if (!strcasecmp(m_start.c_str(), m_if_modified_since.c_str()))
|
||||
{
|
||||
SetStatus("304");
|
||||
@ -226,7 +224,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t len = bb.decode_length(str64);
|
||||
size_t len = Base64::decode_length(str64);
|
||||
unsigned char *buf = new unsigned char[len];
|
||||
|
||||
SetStatus("200");
|
||||
@ -237,7 +235,7 @@ void HttpdSocket::Send64(const std::string& str64, const std::string& type)
|
||||
AddResponseHeader("Last-modified", m_start);
|
||||
SendResponse();
|
||||
|
||||
bb.decode(str64, buf, len);
|
||||
Base64::decode(str64, buf, len);
|
||||
SendBuf( (char *)buf, len);
|
||||
delete[] buf;
|
||||
}
|
||||
|
||||
@ -37,8 +37,7 @@ namespace SOCKETS_NAMESPACE {
|
||||
std::string Utility::base64(const std::string& str_in)
|
||||
{
|
||||
std::string str;
|
||||
Base64 m_b;
|
||||
m_b.encode(str_in, str, false); // , false == do not add cr/lf
|
||||
Base64::encode(str_in, str, false); // , false == do not add cr/lf
|
||||
return str;
|
||||
}
|
||||
|
||||
@ -46,8 +45,7 @@ std::string Utility::base64(const std::string& str_in)
|
||||
std::string Utility::base64d(const std::string& str_in)
|
||||
{
|
||||
std::string str;
|
||||
Base64 m_b;
|
||||
m_b.decode(str_in, str);
|
||||
Base64::decode(str_in, str);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
@ -1318,7 +1318,6 @@ uint32 BaseGuildManager::DoesAccountContainAGuildLeader(uint32 AccountID)
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char *query = 0;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (!m_db->RunQuery(query,
|
||||
MakeAnyLenString(&query,
|
||||
|
||||
@ -447,7 +447,6 @@ void EQW::ResolveBug(const char *id) {
|
||||
vector<string> res;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
char* query = 0;
|
||||
MYSQL_ROW row;
|
||||
if(database.RunQuery(query, MakeAnyLenString(&query, "UPDATE bugs SET status=1 WHERE id=%s", id), errbuf)) {
|
||||
safe_delete_array(query);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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()) {
|
||||
|
||||
@ -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")) {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user