diff --git a/src/pike_search.c b/src/pike_search.c
index 5bf909e38690c29bfeea531416699bc631ef574a..9fa21c1261189f8b94d363f65981bfc00cff9a50 100644
--- a/src/pike_search.c
+++ b/src/pike_search.c
@@ -16,7 +16,7 @@
 
 ptrdiff_t pike_search_struct_offset;
 #define OB2MSEARCH(O) ((struct pike_mem_searcher *)((O)->storage+pike_search_struct_offset))
-#define THIS ((struct pike_mem_searcher *)(Pike_fp->current_storage))
+#define THIS_MSEARCH ((struct pike_mem_searcher *)(Pike_fp->current_storage))
 
 static struct mapping *memsearch_cache;
 struct program *pike_search_program;
@@ -201,9 +201,9 @@ static void f_pike_search(INT32 args)
   }
 
   in=MKPCHARP_STR(s);
-  ret=THIS->mojt.vtab->funcN(THIS->mojt.data,
-			     ADD_PCHARP(in,start),
-			     s->len - start);
+  ret=THIS_MSEARCH->mojt.vtab->funcN(THIS_MSEARCH->mojt.data,
+				     ADD_PCHARP(in,start),
+				     s->len - start);
 
   pop_n_elems(args);
   push_int64( SUBTRACT_PCHARP(in, ret) );  
diff --git a/src/pike_search_engine2.c b/src/pike_search_engine2.c
index 88febf6a0d8f9c93686f82656b997bb26f81e467..ce0470c95cb0e572c2c413be9988cc7ac4fc626a 100644
--- a/src/pike_search_engine2.c
+++ b/src/pike_search_engine2.c
@@ -34,7 +34,7 @@ INLINE HCHAR *NameNH(memchr_search)(void *data,
 				    HCHAR *haystack,
 				    ptrdiff_t haystacklen)
 {
-  return NameNH(MEMCHR)(haystack, (NCHAR)(ptrdiff_t)data, haystacklen);
+  return NameNH(MEMCHR)(haystack, DO_NOT_WARN((NCHAR)(ptrdiff_t)data), haystacklen);
 }