From 0ca1dde560aeb3b193c8b6a3dea040a3e25880f1 Mon Sep 17 00:00:00 2001 From: Taras Tsugrii Date: Thu, 24 Nov 2016 01:34:43 +0000 Subject: [PATCH] Fix a comparison of integers of different signs warning. source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp:403:21: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare] for (int i = 0; i < llvm::array_lengthof (magicks); i++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Differential Revision: https://reviews.llvm.org/D27081 llvm-svn: 287848 --- .../Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index e85f31f..bc58d2a 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -400,7 +400,7 @@ DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress(lldb::addr_t addr, const uint32_t magicks[] = { llvm::MachO::MH_MAGIC_64, llvm::MachO::MH_MAGIC, llvm::MachO::MH_CIGAM, llvm::MachO::MH_CIGAM_64}; bool found_matching_pattern = false; - for (int i = 0; i < llvm::array_lengthof (magicks); i++) + for (size_t i = 0; i < llvm::array_lengthof (magicks); i++) if (::memcmp (magicbuf, &magicks[i], sizeof (magicbuf)) == 0) found_matching_pattern = true; -- 2.7.4