Fixed some warnings, like sprintf %i warnings (converted to %lu), fals vs NULL, etc

This commit is contained in:
Arthur Ice 2013-03-03 16:17:06 -08:00
parent d8628170b5
commit 950f00fae6
6 changed files with 306 additions and 306 deletions

View File

@ -20,7 +20,7 @@ public:
EmuTCPConnection *FindConnection(uint32 iID);
//exposed for some crap we pull. Do not call from outside this object.
TCPServer<EmuTCPConnection>::AddConnection;
using TCPServer<EmuTCPConnection>::AddConnection;
protected:
virtual void Process();

View File

@ -554,7 +554,7 @@ void build_hex_line(const char *buffer, unsigned long length, unsigned long offs
char *ptr=out_buffer;
int i;
char printable[17];
ptr+=sprintf(ptr,"%0*i:",padding,offset);
ptr+=sprintf(ptr,"%0*lu:",padding,offset);
for(i=0;i<16; i++) {
if (i==8) {
strcpy(ptr," -");

View File

@ -347,7 +347,7 @@ bool PTimerList::Load(Database *db) {
//if it expired allready, dont bother.
cur = new PersistentTimer(_char_id, type, start_time, timer_time, enabled);
if(!cur->Expired(false))
if(!cur->Expired(NULL, false))
_list[type] = cur;
else
delete cur;

View File

@ -292,7 +292,7 @@ bool RuleManager::LoadRules(Database *db, const char *ruleset) {
{
safe_delete_array(query);
while((row = mysql_fetch_row(result))) {
if(!SetRule(row[0], row[1], false))
if(!SetRule(row[0], row[1],NULL, false))
_log(RULES__ERROR, "Unable to interpret rule record for %s", row[0]);
}
mysql_free_result(result);

View File

@ -215,7 +215,7 @@ bool QTBuilder::build(const char *shortname) {
AddFace(v1, v2, v3);
}
printf("There are %u vertices and %u faces.\n", _FaceList.size()*3, _FaceList.size());
printf("There are %lu vertices and %lu faces.\n", _FaceList.size()*3, _FaceList.size());
if(fileloader->model_data.plac_count)
{
@ -232,7 +232,7 @@ bool QTBuilder::build(const char *shortname) {
else
printf("No placeable objects (or perhaps %s_obj.s3d not present).\n", shortname);
printf("After processing placeable objects, there are %u vertices and %u faces.\n", _FaceList.size()*3, _FaceList.size());
printf("After processing placeable objects, there are %lu vertices and %lu faces.\n", _FaceList.size()*3, _FaceList.size());
unsigned long r;
@ -1262,7 +1262,7 @@ void QTBuilder::AddPlaceableV4(FileLoader *fileloader, char *ZoneFileName, bool
//return;
printf("EQG V4 Placeable Zone Support\n");
printf("ObjectGroupCount = %i\n", fileloader->model_data.ObjectGroups.size());
printf("ObjectGroupCount = %lu\n", fileloader->model_data.ObjectGroups.size());
vector<ObjectGroupEntry>::iterator Iterator;

View File

@ -88,7 +88,7 @@ EQLConfig *EQLConfig::CreateLauncher(const char *name, uint8 dynamic_count) {
namebuf, dynamic_count), errbuf)) {
LogFile->write(EQEMuLog::Error, "Error in CreateLauncher query: %s", errbuf);
safe_delete_array(query);
return false;
return NULL;
}
safe_delete_array(query);