[compiler-rt] r175285 - [ASan] make variables unsigned to silence warnings - attempt 2
Alexey Samsonov
samsonov at google.com
Fri Feb 15 11:22:49 PST 2013
Author: samsonov
Date: Fri Feb 15 13:22:49 2013
New Revision: 175285
URL: http://llvm.org/viewvc/llvm-project?rev=175285&view=rev
Log:
[ASan] make variables unsigned to silence warnings - attempt 2
Modified:
compiler-rt/trunk/lib/asan/asan_mac.cc
Modified: compiler-rt/trunk/lib/asan/asan_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_mac.cc?rev=175285&r1=175284&r2=175285&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_mac.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_mac.cc Fri Feb 15 13:22:49 2013
@@ -131,7 +131,7 @@ void MaybeReexec() {
CHECK(dladdr((void*)((uptr)__asan_init), &info));
char *dyld_insert_libraries =
const_cast<char*>(GetEnv(kDyldInsertLibraries));
- sptr old_env_len = dyld_insert_libraries ?
+ uptr old_env_len = dyld_insert_libraries ?
internal_strlen(dyld_insert_libraries) : 0;
uptr fname_len = internal_strlen(info.dli_fname);
if (!dyld_insert_libraries ||
@@ -171,7 +171,7 @@ void MaybeReexec() {
// It's just the runtime library name - fine to unset the variable.
LeakyResetEnv(kDyldInsertLibraries, NULL);
} else {
- sptr env_name_len = internal_strlen(kDyldInsertLibraries);
+ uptr env_name_len = internal_strlen(kDyldInsertLibraries);
// Allocate memory to hold the previous env var name, its value, the '='
// sign and the '\0' char.
char *new_env = (char*)allocator_for_env.Allocate(
@@ -190,7 +190,7 @@ void MaybeReexec() {
if (piece_start[0] == ':') piece_start++;
piece_end = REAL(strchr)(piece_start, ':');
if (!piece_end) piece_end = dyld_insert_libraries + old_env_len;
- if (piece_start - dyld_insert_libraries > old_env_len) break;
+ if ((uptr)(piece_start - dyld_insert_libraries) > old_env_len) break;
uptr piece_len = piece_end - piece_start;
// If the current piece isn't the runtime library name, append it to new_env.
More information about the llvm-commits
mailing list