From 3ce5b77a315fbd58b7c0be72b1f8f0b516e9a6a0 Mon Sep 17 00:00:00 2001
From: Martin Nilsson <nilsson@opera.com>
Date: Wed, 3 Sep 2014 22:58:11 +0200
Subject: [PATCH] Don't cast memcmp void* arguments.

---
 src/port.h     | 2 +-
 src/stralloc.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/port.h b/src/port.h
index 82540248ee..2333dfa926 100644
--- a/src/port.h
+++ b/src/port.h
@@ -180,7 +180,7 @@ PMOD_EXPORT int STRCASECMP(const char *a,const char *b);
 #define MEMMOVE memmove
 
 #define HAVE_MEMCMP 1
-#define MEMCMP(X,Y,Z) memcmp((char*)(X),(char*)(Y),(Z))
+#define MEMCMP(X,Y,Z) memcmp((X),(Y),(Z))
 
 #ifndef HAVE_MEMCHR
 PMOD_EXPORT void *MEMCHR(const void *p,char c,size_t e);
diff --git a/src/stralloc.h b/src/stralloc.h
index d3c687fa25..2ddc9d7943 100644
--- a/src/stralloc.h
+++ b/src/stralloc.h
@@ -263,9 +263,9 @@ PMOD_EXPORT extern struct shared_string_location *all_shared_string_locations;
 #define convert_1_to_1(X,Y,Z) memcpy((X),(Y),(Z)<<1)
 #define convert_2_to_2(X,Y,Z) memcpy((X),(Y),(Z)<<2)
 
-#define compare_0_to_0(X,Y,Z) memcmp((char *)(X),(char *)(Y),(Z))
-#define compare_1_to_1(X,Y,Z) memcmp((char *)(X),(char *)(Y),(Z)<<1)
-#define compare_2_to_2(X,Y,Z) memcmp((char *)(X),(char *)(Y),(Z)<<2)
+#define compare_0_to_0(X,Y,Z) memcmp((X),(Y),(Z))
+#define compare_1_to_1(X,Y,Z) memcmp((X),(Y),(Z)<<1)
+#define compare_2_to_2(X,Y,Z) memcmp((X),(Y),(Z)<<2)
 
 #define CONVERT(FROM,TO) \
 void PIKE_CONCAT4(convert_,FROM,_to_,TO)(PIKE_CONCAT(p_wchar,TO) *to, const PIKE_CONCAT(p_wchar,FROM) *from, ptrdiff_t len); \
-- 
GitLab