When the type is just char*, I get a lot of -Woverflow warnings from the compiler
main.cpp:22:
cpp-stub/stub.h: In instantiation of ‘void Stub::set(T, S) [with T = int (*)(int); S = int (*)(int)]’:
main.cpp:42:17: required from here
cpp-stub/stub.h:209:21: error: overflow in conversion from ‘int’ to ‘char’ changes value from ‘187’ to ‘-69’ [-Werror=overflow]
209 | *(fn + 1) = 0xbb;\
| ^~~~
cpp-stub/stub.h:327:13: note: in expansion of macro ‘REPLACE_FAR’
327 | REPLACE_FAR(this, fn, fn_stub);
| ^~~~~~~~~~~
When the type is just
char*
, I get a lot of -Woverflow warnings from the compiler