[compiler-rt] r334686 - [Sanitizer] fix compilation warning
David Carlier via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 13 21:51:27 PDT 2018
Author: devnexen
Date: Wed Jun 13 21:51:26 2018
New Revision: 334686
URL: http://llvm.org/viewvc/llvm-project?rev=334686&view=rev
Log:
[Sanitizer] fix compilation warning
In most of systems, this field is a signed type but in some it is an unsigned.
Reviewers: vitalybuka
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D48118
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=334686&r1=334685&r2=334686&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Wed Jun 13 21:51:26 2018
@@ -522,7 +522,7 @@ static int dl_iterate_phdr_cb(dl_phdr_in
return 0;
LoadedModule cur_module;
cur_module.set(module_name.data(), info->dlpi_addr);
- for (int i = 0; i < info->dlpi_phnum; i++) {
+ for (int i = 0; i < (int)info->dlpi_phnum; i++) {
const Elf_Phdr *phdr = &info->dlpi_phdr[i];
if (phdr->p_type == PT_LOAD) {
uptr cur_beg = info->dlpi_addr + phdr->p_vaddr;
More information about the llvm-commits
mailing list