mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 04:37:02 +00:00
[10692] Fixed some GCC warnings and code errors.
Thanks to freghar for provide cleaned list of warning messages.
This commit is contained in:
parent
349719e520
commit
10d3d3ce24
33 changed files with 363 additions and 306 deletions
|
|
@ -237,11 +237,11 @@ bool Database::CheckRequiredField( char const* table_name, char const* required_
|
|||
if(!reqName.empty())
|
||||
{
|
||||
sLog.outErrorDb("The table `%s` in your [%s] database indicates that this database is out of date!",table_name,db_name);
|
||||
sLog.outErrorDb("");
|
||||
sLog.outErrorDb();
|
||||
sLog.outErrorDb(" [A] You have: --> `%s.sql`",cur_sql_update_name.c_str());
|
||||
sLog.outErrorDb("");
|
||||
sLog.outErrorDb();
|
||||
sLog.outErrorDb(" [B] You need: --> `%s.sql`",req_sql_update_name);
|
||||
sLog.outErrorDb("");
|
||||
sLog.outErrorDb();
|
||||
sLog.outErrorDb("You must apply all updates after [A] to [B] to use mangos with this database.");
|
||||
sLog.outErrorDb("These updates are included in the sql/updates folder.");
|
||||
sLog.outErrorDb("Please read the included [README] in sql/updates for instructions on updating.");
|
||||
|
|
@ -250,10 +250,10 @@ bool Database::CheckRequiredField( char const* table_name, char const* required_
|
|||
{
|
||||
sLog.outErrorDb("The table `%s` in your [%s] database is missing its version info.",table_name,db_name);
|
||||
sLog.outErrorDb("MaNGOS cannot find the version info needed to check that the db is up to date.",table_name,db_name);
|
||||
sLog.outErrorDb("");
|
||||
sLog.outErrorDb();
|
||||
sLog.outErrorDb("This revision of MaNGOS requires a database updated to:");
|
||||
sLog.outErrorDb("`%s.sql`",req_sql_update_name);
|
||||
sLog.outErrorDb("");
|
||||
sLog.outErrorDb();
|
||||
|
||||
if(!strcmp(db_name, "WORLD"))
|
||||
sLog.outErrorDb("Post this error to your database provider forum or find a solution there.");
|
||||
|
|
@ -265,10 +265,10 @@ bool Database::CheckRequiredField( char const* table_name, char const* required_
|
|||
{
|
||||
sLog.outErrorDb("The table `%s` in your [%s] database is missing or corrupt.",table_name,db_name);
|
||||
sLog.outErrorDb("MaNGOS cannot find the version info needed to check that the db is up to date.",table_name,db_name);
|
||||
sLog.outErrorDb("");
|
||||
sLog.outErrorDb();
|
||||
sLog.outErrorDb("This revision of mangos requires a database updated to:");
|
||||
sLog.outErrorDb("`%s.sql`",req_sql_update_name);
|
||||
sLog.outErrorDb("");
|
||||
sLog.outErrorDb();
|
||||
|
||||
if(!strcmp(db_name, "WORLD"))
|
||||
sLog.outErrorDb("Post this error to your database provider forum or find a solution there.");
|
||||
|
|
|
|||
|
|
@ -460,6 +460,30 @@ void Log::outError( const char * err, ... )
|
|||
fflush(stderr);
|
||||
}
|
||||
|
||||
void Log::outErrorDb()
|
||||
{
|
||||
if (m_includeTime)
|
||||
outTime();
|
||||
|
||||
fprintf( stderr, "\n" );
|
||||
|
||||
if (logfile)
|
||||
{
|
||||
outTimestamp(logfile);
|
||||
fprintf(logfile, "ERROR:\n" );
|
||||
fflush(logfile);
|
||||
}
|
||||
|
||||
if (dberLogfile)
|
||||
{
|
||||
outTimestamp(dberLogfile);
|
||||
fprintf(dberLogfile, "\n" );
|
||||
fflush(dberLogfile);
|
||||
}
|
||||
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
void Log::outErrorDb( const char * err, ... )
|
||||
{
|
||||
if (!err)
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ACE_Th
|
|||
void outDebug( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// any log level
|
||||
void outMenu( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
void outErrorDb(); // any log level
|
||||
// any log level
|
||||
void outErrorDb( const char * str, ... ) ATTR_PRINTF(2,3);
|
||||
// any log level
|
||||
|
|
|
|||
|
|
@ -101,12 +101,12 @@ int ThreadPriority::getPriority(Priority p) const
|
|||
# define THREADFLAG (THR_NEW_LWP | THR_JOINABLE)
|
||||
#endif
|
||||
|
||||
Thread::Thread() : m_task(0), m_iThreadId(0), m_hThreadHandle(0)
|
||||
Thread::Thread() : m_iThreadId(0), m_hThreadHandle(0), m_task(0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Thread::Thread(Runnable* instance) : m_task(instance), m_iThreadId(0), m_hThreadHandle(0)
|
||||
Thread::Thread(Runnable* instance) : m_iThreadId(0), m_hThreadHandle(0), m_task(instance)
|
||||
{
|
||||
// register reference to m_task to prevent it deeltion until destructor
|
||||
if (m_task)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10691"
|
||||
#define REVISION_NR "10692"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue