[Lldb-commits] [PATCH] D51600: [NFC] Fixed enum constant in boolean context error
Dávid Bolvanský via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 3 11:26:34 PDT 2018
xbolva00 created this revision.
xbolva00 added a reviewer: JDevlieghere.
Herald added subscribers: lldb-commits, abidh.
/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)
Repository:
rLLDB LLDB
https://reviews.llvm.org/D51600
Files:
source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
Index: source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
===================================================================
--- source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -652,11 +652,12 @@
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 =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51600.163740.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180903/8d98e910/attachment-0001.bin>
More information about the lldb-commits
mailing list