Fix compiler warnings.

Refs #5823
This commit is contained in:
Gunnar Beutner 2014-05-23 11:05:25 +02:00
parent eed3a60c75
commit 215f500b0e
2 changed files with 3 additions and 3 deletions

View File

@ -191,7 +191,7 @@ void DbConnection::CleanUpHandler(void)
{ "systemcommands", "start_time" }
};
for (int i = 0; i < sizeof(tables) / sizeof(tables[0]); i++) {
for (size_t i = 0; i < sizeof(tables) / sizeof(tables[0]); i++) {
double max_age = GetCleanup()->Get(tables[i].name + "_age");
if (max_age == 0)

View File

@ -82,13 +82,13 @@ static Value ExternalCommandAPIWrapper(const String& command, const Dictionary::
return true;
}
static void RegisterCommand(const String& command, const ExternalCommandCallback& callback, size_t minArgs = 0, size_t maxArgs = -1)
static void RegisterCommand(const String& command, const ExternalCommandCallback& callback, size_t minArgs = 0, size_t maxArgs = UINT_MAX)
{
boost::mutex::scoped_lock lock(GetMutex());
ExternalCommandInfo eci;
eci.Callback = callback;
eci.MinArgs = minArgs;
eci.MaxArgs = (maxArgs == -1) ? minArgs : maxArgs;
eci.MaxArgs = (maxArgs == UINT_MAX) ? minArgs : maxArgs;
GetCommands()[command] = eci;
ApiFunction::Ptr afunc = make_shared<ApiFunction>(boost::bind(&ExternalCommandAPIWrapper, command, _2));