Fixed format strings warnings reported by GCC/Clang

See https://forum.zdoom.org/viewtopic.php?t=54541 and https://forum.zdoom.org/viewtopic.php?t=54709
This commit is contained in:
alexey.lysiuk 2016-12-24 14:33:50 +02:00 committed by Christoph Oelckers
commit e825918451
6 changed files with 11 additions and 11 deletions

View file

@ -7493,7 +7493,7 @@ isresolved:
else
{
// Todo: If this is a qualified call to a parent class function, let it through (but this needs to disable virtual calls later.)
ScriptPosition.Message(MSG_ERROR, "Qualified member call to parent class not yet implemented\n", cls->TypeName.GetChars(), MethodName.GetChars());
ScriptPosition.Message(MSG_ERROR, "Qualified member call to parent class %s::%s is not yet implemented\n", cls->TypeName.GetChars(), MethodName.GetChars());
delete this;
return nullptr;
}
@ -7897,7 +7897,7 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx)
// For a reference argument the types must match 100%.
if (type != ArgList[i]->ValueType)
{
ScriptPosition.Message(MSG_ERROR, "Type mismatch in reference argument", Function->SymbolName.GetChars());
ScriptPosition.Message(MSG_ERROR, "Type mismatch in reference argument %s", Function->SymbolName.GetChars());
x = nullptr;
}
else
@ -8346,7 +8346,7 @@ FxExpression *FxGetDefaultByType::Resolve(FCompileContext &ctx)
{
// this is the ugly case. We do not know what we have and cannot do proper type casting.
// For now error out and let this case require explicit handling on the user side.
ScriptPosition.Message(MSG_ERROR, "GetDefaultByType() requires an actor class type", static_cast<FxConstant *>(Self)->GetValue().GetString().GetChars());
ScriptPosition.Message(MSG_ERROR, "GetDefaultByType() requires an actor class type, but got %s", static_cast<FxConstant *>(Self)->GetValue().GetString().GetChars());
delete this;
return nullptr;
}