mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +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
|
|
@ -1238,7 +1238,7 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand *commandTable, const char
|
|||
{
|
||||
// command have subcommands, but not '' subcommand and then any data in `command` useless for it.
|
||||
if (cmdName.empty())
|
||||
sLog.outErrorDb("Table `command` have command '%s' that only used with some subcommand selection, it can't have help or overwritten access level, skip.", cmdName.c_str(), fullcommand.c_str());
|
||||
sLog.outErrorDb("Table `command` have command '%s' that only used with some subcommand selection, it can't have help or overwritten access level, skip.", cmdName.c_str());
|
||||
else
|
||||
sLog.outErrorDb("Table `command` have unexpected subcommand '%s' in command '%s', skip.", cmdName.c_str(), fullcommand.c_str());
|
||||
return false;
|
||||
|
|
@ -2303,7 +2303,7 @@ char* ChatHandler::ExtractQuotedArg( char** args, bool asis /*= false*/ )
|
|||
while (*tail && *tail != guard)
|
||||
++tail;
|
||||
|
||||
if (!*tail || tail[1] && !isWhiteSpace(tail[1])) // fail
|
||||
if (!*tail || (tail[1] && !isWhiteSpace(tail[1]))) // fail
|
||||
return NULL;
|
||||
|
||||
if (!tail[1]) // quote is last char in string
|
||||
|
|
@ -2521,7 +2521,7 @@ char* ChatHandler::ExtractLinkArg(char** args, char const* const* linkTypes /*=
|
|||
tail += 2; // skip h|
|
||||
|
||||
// r
|
||||
if (!*tail || *tail != 'r' || *(tail+1) && !isWhiteSpace(*(tail+1)))
|
||||
if (!*tail || *tail != 'r' || (*(tail+1) && !isWhiteSpace(*(tail+1))))
|
||||
return NULL;
|
||||
|
||||
++tail; // skip r
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue