Skip to content

Fix gcc-9.3 compile errors (-Werror=format-security) #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lldb/source/API/SystemInitializerFull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ llvm::Error SystemInitializerFull::Initialize() {

void SystemInitializerFull::Terminate() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

Debugger::SettingsTerminate();

Expand Down
6 changes: 3 additions & 3 deletions lldb/source/Core/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ void Module::FindTypes_Impl(
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types) {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);
if (SymbolFile *symbols = GetSymbolFile())
symbols->FindTypes(name, parent_decl_ctx, max_matches,
searched_symbol_files, types);
Expand Down Expand Up @@ -1015,7 +1015,7 @@ void Module::FindTypes(
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types) {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);
if (SymbolFile *symbols = GetSymbolFile())
symbols->FindTypes(pattern, languages, searched_symbol_files, types);
}
Expand All @@ -1027,7 +1027,7 @@ SymbolFile *Module::GetSymbolFile(bool can_create, Stream *feedback_strm) {
ObjectFile *obj_file = GetObjectFile();
if (obj_file != nullptr) {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);
m_symfile_up.reset(
SymbolVendor::FindPlugin(shared_from_this(), feedback_strm));
m_did_load_symfile = true;
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Initialization/SystemInitializerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ llvm::Error SystemInitializerCommon::Initialize() {
return error;

static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

process_gdb_remote::ProcessGDBRemoteLog::Initialize();

Expand All @@ -122,7 +122,7 @@ llvm::Error SystemInitializerCommon::Initialize() {

void SystemInitializerCommon::Terminate() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

#if defined(_WIN32)
ProcessWindowsLog::Terminate();
Expand Down
4 changes: 2 additions & 2 deletions lldb/source/Interpreter/CommandInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ bool CommandInterpreter::GetSpaceReplPrompts() const {

void CommandInterpreter::Initialize() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

CommandReturnObject result;

Expand Down Expand Up @@ -452,7 +452,7 @@ const char *CommandInterpreter::ProcessEmbeddedScriptCommands(const char *arg) {

void CommandInterpreter::LoadCommandDictionary() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

lldb::ScriptLanguage script_language = m_debugger.GetScriptLanguage();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ void AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded() {
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_TYPES));

static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

// Else we need to check with our process to see when the map was updated.
Process *process = GetProcess();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bool ScriptInterpreterLua::ExecuteOneLine(llvm::StringRef command,

void ScriptInterpreterLua::ExecuteInterpreterLoop() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

Debugger &debugger = m_debugger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ bool ScriptInterpreterPythonImpl::ExecuteOneLine(

void ScriptInterpreterPythonImpl::ExecuteInterpreterLoop() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

Debugger &debugger = m_debugger;

Expand Down Expand Up @@ -2238,7 +2238,7 @@ bool ScriptInterpreterPythonImpl::GetScriptedSummary(
const TypeSummaryOptions &options, std::string &retval) {

static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

if (!valobj.get()) {
retval.assign("<no object>");
Expand Down Expand Up @@ -3237,7 +3237,7 @@ void ScriptInterpreterPythonImpl::InitializePrivate() {
g_initialized = true;

static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

// RAII-based initialization which correctly handles multiple-initialization,
// version- specific differences among Python 2 and Python 3, and saving and
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Symbol/Symtab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ void Symtab::SortSymbolIndexesByValue(std::vector<uint32_t> &indexes,
std::lock_guard<std::recursive_mutex> guard(m_mutex);

static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);
// No need to sort if we have zero or one items...
if (indexes.size() <= 1)
return;
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-test/SystemInitializerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ llvm::Error SystemInitializerTest::Initialize() {

void SystemInitializerTest::Terminate() {
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
Timer scoped_timer(func_cat, "%s", LLVM_PRETTY_FUNCTION);

Debugger::SettingsTerminate();

Expand Down