mapi: Don't rely on GNU void pointer arithmetic.

Commit 79daa510c added -Werror=pointer-arith to CFLAGS, which makes
arithmetic on void pointers an error.

See https://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Matt Turner 2015-02-27 11:42:43 -08:00
parent 982723dfa2
commit 76cd0f00f4
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ entry_generate(int slot)
0x41, 0xff, 0xa3, 0x34, 0x12, 0x00, 0x00,
};
unsigned long addr;
void *code;
char *code;
mapi_func entry;
addr = x86_64_current_tls();

View File

@ -113,7 +113,7 @@ entry_generate(int slot)
0xff, 0xa0, 0x34, 0x12, 0x00, 0x00, /* jmp *0x1234(%eax) */
0x90, 0x90, 0x90, 0x90 /* nop's */
};
void *code;
char *code;
mapi_func entry;
code = u_execmem_alloc(sizeof(code_templ));