Do not use "void *" in arithmetics.
void
entry_patch(mapi_func entry, int slot)
{
- void *code = (void *) entry;
+ char *code = (char *) entry;
*((unsigned int *) (code + 12)) = slot * sizeof(mapi_func);
}
void
entry_patch(mapi_func entry, int slot)
{
- void *code = (void *) entry;
+ char *code = (char *) entry;
*((unsigned long *) (code + 8)) = slot * sizeof(mapi_func);
}
void
entry_patch(mapi_func entry, int slot)
{
- void *code = (void *) entry;
+ char *code = (char *) entry;
*((unsigned long *) (code + 11)) = slot * sizeof(mapi_func);
*((unsigned long *) (code + 22)) = slot * sizeof(mapi_func);