Fix -Wnull-pointer-subtraction warning
Bug: 197230471
Test: build
Change-Id: If842f00819736bf6f111f44ec752ca2f815866b4
diff --git a/tests/simplecpu/jni/CpuNativeJni.cpp b/tests/simplecpu/jni/CpuNativeJni.cpp
index 4ea0dc0..54291c0 100644
--- a/tests/simplecpu/jni/CpuNativeJni.cpp
+++ b/tests/simplecpu/jni/CpuNativeJni.cpp
@@ -41,7 +41,7 @@
} while (--i > 0); \
}
-#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
+#define SWAPINIT(a, es) swaptype = ((uintptr_t) a) % sizeof(long) || \
es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
static __inline void