diff options
author | MITSUNARI Shigeo <[email protected]> | 2012-05-03 15:39:57 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2012-05-03 15:39:57 +0900 |
commit | ded892de007a3e3381052c9fc181d9a81a3317c5 (patch) | |
tree | c8c7c1aeaea61eb331d9d3d9659464effc66dc34 /sample/test0.cpp | |
parent | 2ad3c232a07b0feb7ee545a1b58e57fbc7a25d02 (diff) | |
download | xbyak-ded892de007a3e3381052c9fc181d9a81a3317c5.tar.gz xbyak-ded892de007a3e3381052c9fc181d9a81a3317c5.zip |
remove warning for clang++
Diffstat (limited to 'sample/test0.cpp')
-rw-r--r-- | sample/test0.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sample/test0.cpp b/sample/test0.cpp index cf3db88..04d616a 100644 --- a/sample/test0.cpp +++ b/sample/test0.cpp @@ -50,7 +50,7 @@ public: #endif ret(); } - int (*get() const)(int) { return (int (*)(int))getCode(); } + int (*get() const)(int) { return (int (*)(int))(void*)getCode(); } }; class CallAtoi : public Xbyak::CodeGenerator { @@ -75,7 +75,7 @@ public: #endif ret(); } - int (*get() const)(const char *) { return (int (*)(const char *))getCode(); } + int (*get() const)(const char *) { return (int (*)(const char *))(void*)getCode(); } }; class JmpAtoi : public Xbyak::CodeGenerator { @@ -91,7 +91,7 @@ public: jmp((void*)atoi); #endif } - int (*get() const)(const char *) { return (int (*)(const char *))getCode(); } + int (*get() const)(const char *) { return (int (*)(const char *))(void*)getCode(); } }; int main() @@ -106,7 +106,7 @@ int main() #else puts("32bit"); #endif - int (*func)(int) = (int (*)(int))s.getCode(); + int (*func)(int) = (int (*)(int))(void*)s.getCode(); for (int i = 0; i <= 10; i++) { printf("0 + ... + %d = %d\n", i, func(i)); } @@ -128,7 +128,7 @@ int main() uint8 *p = CodeArray::getAlignedAddress(buf); CodeArray::protect(p, codeSize, true); Sample s(p, codeSize); - int (*func)(int) = (int (*)(int))s.getCode(); + int (*func)(int) = (int (*)(int))(void*)s.getCode(); if ((uint8*)func != p) { fprintf(stderr, "internal error %p %p\n", p, func); return 1; |