[Lldb-commits] [lldb] r341340 - [NFC] Fixed enum constant in boolean context error
David Bolvansky via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 3 15:09:08 PDT 2018
Author: xbolva00
Date: Mon Sep 3 15:09:08 2018
New Revision: 341340
URL: http://llvm.org/viewvc/llvm-project?rev=341340&view=rev
Log:
[NFC] Fixed enum constant in boolean context error
Summary:
/home/xbolva00/LLVM/llvm/tools/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:656:59: warning: enum constant in boolean context [-Wint-in-bool-context]
if (mh.magic == llvm::MachO::MH_CIGAM || llvm::MachO::MH_MAGIC)
^~~~~~~~
/home/xbolva00/LLVM/llvm/tools/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:658:62: warning: enum constant in boolean context [-Wint-in-bool-context]
if (mh.magic == llvm::MachO::MH_CIGAM_64 || llvm::MachO::MH_MAGIC_64)
Reviewers: JDevlieghere, teemperor
Reviewed By: teemperor
Subscribers: abidh, lldb-commits
Differential Revision: https://reviews.llvm.org/D51600
Modified:
lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=341340&r1=341339&r2=341340&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Mon Sep 3 15:09:08 2018
@@ -652,11 +652,12 @@ bool DynamicLoaderDarwinKernel::KextImag
llvm::MachO::mach_header mh;
size_t size_to_read = 512;
- if (ReadMachHeader (m_load_address, process, mh)) {
- if (mh.magic == llvm::MachO::MH_CIGAM || llvm::MachO::MH_MAGIC)
- size_to_read = sizeof (llvm::MachO::mach_header) + mh.sizeofcmds;
- if (mh.magic == llvm::MachO::MH_CIGAM_64 || llvm::MachO::MH_MAGIC_64)
- size_to_read = sizeof (llvm::MachO::mach_header_64) + mh.sizeofcmds;
+ if (ReadMachHeader(m_load_address, process, mh)) {
+ if (mh.magic == llvm::MachO::MH_CIGAM || mh.magic == llvm::MachO::MH_MAGIC)
+ size_to_read = sizeof(llvm::MachO::mach_header) + mh.sizeofcmds;
+ if (mh.magic == llvm::MachO::MH_CIGAM_64 ||
+ mh.magic == llvm::MachO::MH_MAGIC_64)
+ size_to_read = sizeof(llvm::MachO::mach_header_64) + mh.sizeofcmds;
}
ModuleSP memory_module_sp =
More information about the lldb-commits
mailing list