mapi: Don't rely on GNU void pointer arithmetic.
authorMatt Turner <mattst88@gmail.com>
Fri, 27 Feb 2015 19:42:43 +0000 (11:42 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 28 Feb 2015 00:57:10 +0000 (16:57 -0800)
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>
src/mapi/entry_x86-64_tls.h
src/mapi/entry_x86_tls.h

index 71e9d60630594a88c15158cf736ea1ac33519c73..d571df97433a1dce12f103233de3260441248fd6 100644 (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();
index fa7bc15b890f9b21a8262fc435c72333f9140778..df31dce55f1ba385d7c5f6ef9454ca62f57662c0 100644 (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));