Skip to content

Commit

Permalink
[lldb] Fix initialization of LazyBool/bool variables m_overwrite/m_ov…
Browse files Browse the repository at this point in the history
…erwrite_lazy. NFCI.

This silences a GCC warning after
1f7b58f / D122680:

lldb/source/Commands/CommandObjectCommands.cpp:1650:22: warning: enum constant in boolean context [-Wint-in-bool-context]
 1650 |   bool m_overwrite = eLazyBoolCalculate;
      |                      ^~~~~~~~~~~~~~~~~~

Differential Revision: https://reviews.llvm.org/D123204
  • Loading branch information
mstorsjo committed Apr 29, 2022
1 parent 268089b commit 2a84a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lldb/source/Commands/CommandObjectCommands.cpp
Expand Up @@ -1480,7 +1480,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
std::string m_class_name;
std::string m_funct_name;
std::string m_short_help;
LazyBool m_overwrite_lazy;
LazyBool m_overwrite_lazy = eLazyBoolCalculate;
ScriptedCommandSynchronicity m_synchronicity =
eScriptedCommandSynchronicitySynchronous;
};
Expand Down Expand Up @@ -1647,7 +1647,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
std::string m_cmd_name;
CommandObjectMultiword *m_container = nullptr;
std::string m_short_help;
bool m_overwrite = eLazyBoolCalculate;
bool m_overwrite = false;
ScriptedCommandSynchronicity m_synchronicity =
eScriptedCommandSynchronicitySynchronous;
};
Expand Down

0 comments on commit 2a84a86

Please sign in to comment.