Skip to content

Commit 2a84a86

Browse files
committed
[lldb] Fix initialization of LazyBool/bool variables m_overwrite/m_overwrite_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
1 parent 268089b commit 2a84a86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/source/Commands/CommandObjectCommands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
14801480
std::string m_class_name;
14811481
std::string m_funct_name;
14821482
std::string m_short_help;
1483-
LazyBool m_overwrite_lazy;
1483+
LazyBool m_overwrite_lazy = eLazyBoolCalculate;
14841484
ScriptedCommandSynchronicity m_synchronicity =
14851485
eScriptedCommandSynchronicitySynchronous;
14861486
};
@@ -1647,7 +1647,7 @@ class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
16471647
std::string m_cmd_name;
16481648
CommandObjectMultiword *m_container = nullptr;
16491649
std::string m_short_help;
1650-
bool m_overwrite = eLazyBoolCalculate;
1650+
bool m_overwrite = false;
16511651
ScriptedCommandSynchronicity m_synchronicity =
16521652
eScriptedCommandSynchronicitySynchronous;
16531653
};

0 commit comments

Comments
 (0)