mapi: Fix compiler warnings.
authorChia-I Wu <olv@lunarg.com>
Thu, 30 Sep 2010 09:09:59 +0000 (17:09 +0800)
committerChia-I Wu <olv@lunarg.com>
Thu, 30 Sep 2010 09:09:59 +0000 (17:09 +0800)
Do not use "void *" in arithmetics.

src/mapi/mapi/entry_x86-64_tls.h
src/mapi/mapi/entry_x86_tls.h
src/mapi/mapi/entry_x86_tsd.h

index 0f6e812..2fbe73b 100644 (file)
@@ -61,7 +61,7 @@ entry_patch_public(void)
 void
 entry_patch(mapi_func entry, int slot)
 {
-   void *code = (void *) entry;
+   char *code = (char *) entry;
    *((unsigned int *) (code + 12)) = slot * sizeof(mapi_func);
 }
 
index ff2b957..d4f7d98 100644 (file)
@@ -91,7 +91,7 @@ entry_patch_public(void)
 void
 entry_patch(mapi_func entry, int slot)
 {
-   void *code = (void *) entry;
+   char *code = (char *) entry;
    *((unsigned long *) (code + 8)) = slot * sizeof(mapi_func);
 }
 
index fbf4ec5..f37c747 100644 (file)
@@ -63,7 +63,7 @@ entry_patch_public(void)
 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);