Remove the “len” defaulted parameter from CommandReturnObject::AppendMessage, AppendWarning and AppendError. Nobody was using them, and it meant if you accidentally used the AppendWarning when you meant AppendWarningWithFormat with an integer in the format string, it would compile and then return your string plus some unknown amount of junk.

llvm-svn: 170266
This commit is contained in:
Jim Ingham
2012-12-15 02:40:54 +00:00
parent 2e1f745da7
commit 17fafa155c
4 changed files with 26 additions and 23 deletions

View File

@@ -876,7 +876,7 @@ protected:
comp_unit->GetDirectory().GetCString(),
comp_unit->GetFilename().GetCString());
else
result.AppendError ("no debug information for frame %u\n", frame->GetFrameIndex());
result.AppendErrorWithFormat ("no debug information for frame %u\n", frame->GetFrameIndex());
}
else
result.AppendError ("'target variable' takes one or more global variable names as arguments\n");
@@ -3152,13 +3152,13 @@ protected:
}
else
{
result.AppendError ("Couldn't find module matching address: 0x%" PRIx64 ".", m_options.m_module_addr);
result.AppendErrorWithFormat ("Couldn't find module matching address: 0x%" PRIx64 ".", m_options.m_module_addr);
result.SetStatus (eReturnStatusFailed);
}
}
else
{
result.AppendError ("Couldn't find module containing address: 0x%" PRIx64 ".", m_options.m_module_addr);
result.AppendErrorWithFormat ("Couldn't find module containing address: 0x%" PRIx64 ".", m_options.m_module_addr);
result.SetStatus (eReturnStatusFailed);
}
}