diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-09-12 14:10:14 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-09-12 14:10:14 +0000 |
commit | 4787d0fbeff57cdf7bcd25e9b727dd2b2c424afa (patch) | |
tree | 3abf57f7f914def295df6ce08fa87ffc5e630f59 | |
parent | 85e2bbc3f8c751584871537e72caffc2bffb9613 (diff) | |
download | bcm5719-llvm-4787d0fbeff57cdf7bcd25e9b727dd2b2c424afa.tar.gz bcm5719-llvm-4787d0fbeff57cdf7bcd25e9b727dd2b2c424afa.zip |
[ASan] more macro/casting magic to suppress warnings
llvm-svn: 163706
-rw-r--r-- | compiler-rt/lib/asan/asan_mac.cc | 4 | ||||
-rw-r--r-- | compiler-rt/lib/asan/asan_malloc_mac.cc | 2 | ||||
-rw-r--r-- | compiler-rt/lib/interception/interception_mac.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/asan/asan_mac.cc b/compiler-rt/lib/asan/asan_mac.cc index d4963710855..cecd5bd47b7 100644 --- a/compiler-rt/lib/asan/asan_mac.cc +++ b/compiler-rt/lib/asan/asan_mac.cc @@ -96,7 +96,7 @@ void MaybeReexec() { // the library is preloaded so that the wrappers work. If it is not, set // DYLD_INSERT_LIBRARIES and re-exec ourselves. Dl_info info; - CHECK(dladdr((void*)__asan_init, &info)); + CHECK(dladdr((void*)((uptr)__asan_init), &info)); const char *dyld_insert_libraries = GetEnv(kDyldInsertLibraries); if (!dyld_insert_libraries || !REAL(strstr)(dyld_insert_libraries, info.dli_fname)) { @@ -491,7 +491,7 @@ INTERCEPTOR(CFStringRef, CFStringCreateCopy, CFAllocatorRef alloc, DECLARE_REAL_AND_INTERCEPTOR(void, free, void *ptr) -DECLARE_REAL_AND_INTERCEPTOR(void, __CFInitialize) +DECLARE_REAL_AND_INTERCEPTOR(void, __CFInitialize, void) namespace __asan { diff --git a/compiler-rt/lib/asan/asan_malloc_mac.cc b/compiler-rt/lib/asan/asan_malloc_mac.cc index ef7fce7327c..0243bf99149 100644 --- a/compiler-rt/lib/asan/asan_malloc_mac.cc +++ b/compiler-rt/lib/asan/asan_malloc_mac.cc @@ -108,7 +108,7 @@ namespace __asan { // // See http://code.google.com/p/address-sanitizer/issues/detail?id=87 // and http://opensource.apple.com/source/CF/CF-550.43/CFRuntime.c -INTERCEPTOR(void, __CFInitialize) { +INTERCEPTOR(void, __CFInitialize, void) { // If the runtime is built as dynamic library, __CFInitialize wrapper may be // called before __asan_init. #if !MAC_INTERPOSE_FUNCTIONS diff --git a/compiler-rt/lib/interception/interception_mac.h b/compiler-rt/lib/interception/interception_mac.h index 31fd7b399c8..6e9e80817cb 100644 --- a/compiler-rt/lib/interception/interception_mac.h +++ b/compiler-rt/lib/interception/interception_mac.h @@ -42,7 +42,7 @@ bool OverrideFunction(uptr old_func, uptr new_func, uptr *orig_old_func); ::__interception::OverrideFunction( \ (::__interception::uptr)old_func, \ (::__interception::uptr)new_func, \ - (::__interception::uptr*)&REAL(old_func)) + (::__interception::uptr*)((::__interception::uptr)&REAL(old_func))) # define INTERCEPT_FUNCTION_MAC(func) OVERRIDE_FUNCTION_MAC(func, WRAP(func)) #endif // INTERCEPTION_MAC_H |