remove some warnings
diff --git a/sample/memfunc.cpp b/sample/memfunc.cpp
index 3e69220..b97630b 100644
--- a/sample/memfunc.cpp
+++ b/sample/memfunc.cpp
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <memory.h>
 #define XBYAK_NO_OP_NAMES
 #include <xbyak/xbyak.h>
 
@@ -90,17 +91,8 @@
 	try {
 		Code code;
 		int (A::*p)(int, int, int, int, int) const = 0;
-#if defined(XBYAK32) && !defined(_WIN32)
-		// avoid breaking strict-aliasing rules for 32bit gcc
-		union {
-			int (A::*p)(int, int, int, int, int) const;
-			const Xbyak::uint8 *code;
-		} u;
-		u.code = code.getCode();
-		p = u.p;
-#else
-		*(void**)&p = code.getCode<void*>();
-#endif
+		const void *addr = code.getCode<void*>();
+		memcpy(&p, &addr, sizeof(void*));
 		for (int i = 0; i < 10; i++) {
 			A a;
 			int t1, t2, t3, t4, t5, x, y;
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index f931156..f581f21 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -639,7 +639,7 @@
 	enum {
 		es, cs, ss, ds, fs, gs
 	};
-	Segment(int idx) : idx_(idx) { assert(0 <= idx_ && idx_ < 6); }
+	explicit Segment(int idx) : idx_(idx) { assert(0 <= idx_ && idx_ < 6); }
 	int getIdx() const { return idx_; }
 	const char *toString() const
 	{
@@ -882,7 +882,7 @@
 			}
 			putchar('\n');
 			remain -= disp;
-			if (remain <= 0) {
+			if (remain == 0) {
 				break;
 			}
 		}
@@ -1990,12 +1990,6 @@
 		addr.permitVsib();
 		opVex(x, 0, addr, type, code);
 	}
-	void opClass(const Opmask& k, const Operand& op, int type, uint8 code, uint8 imm)
-	{
-		if (!op.isBit(128|256|512)) throw Error(ERR_BAD_MEM_SIZE);
-		Reg x = k; x.setBit(op.getBit());
-		opVex(x, 0, op, type, code, imm);
-	}
 public:
 	unsigned int getVersion() const { return VERSION; }
 	using CodeArray::db;