Silence -Wpointer-bool-conversion warning after r276324
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Sun, 24 Jul 2016 01:09:03 +0000 (01:09 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Sun, 24 Jul 2016 01:09:03 +0000 (01:09 +0000)
sanitizer_common_interceptors.inc:667:12: warning: address of function 'memchr' will always evaluate to 'true' [-Wpointer-bool-conversion]
  if (REAL(memchr)) {
  ~~       ^~~~~~

llvm-svn: 276539

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

index 3660f6b..d425659 100644 (file)
@@ -664,7 +664,7 @@ INTERCEPTOR(void*, memchr, const void *s, int c, SIZE_T n) {
   void *ctx;
   COMMON_INTERCEPTOR_ENTER(ctx, memchr, s, c, n);
   void *res;
-  if (REAL(memchr)) {
+  if (REAL(&memchr)) {
     res = REAL(memchr)(s, c, n);
   } else {
     res = internal_memchr(s, c, n);