Mesa (7.9): mapi: Fix compiler warnings.

Chia-I Wu olv at kemper.freedesktop.org
Thu Sep 30 09:12:59 UTC 2010


Module: Mesa
Branch: 7.9
Commit: f6eb5d991c0b93a89b970c15b9876ec3806a4e36
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f6eb5d991c0b93a89b970c15b9876ec3806a4e36

Author: Chia-I Wu <olv at lunarg.com>
Date:   Thu Sep 30 17:09:59 2010 +0800

mapi: Fix compiler warnings.

Do not use "void *" in arithmetics.
(cherry picked from commit ebeb4a7e8af9f59ce8f45f78654b611bb546979d)

---

 src/mapi/mapi/entry_x86-64_tls.h |    2 +-
 src/mapi/mapi/entry_x86_tls.h    |    2 +-
 src/mapi/mapi/entry_x86_tsd.h    |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mapi/mapi/entry_x86-64_tls.h b/src/mapi/mapi/entry_x86-64_tls.h
index 0f6e812..2fbe73b 100644
--- a/src/mapi/mapi/entry_x86-64_tls.h
+++ b/src/mapi/mapi/entry_x86-64_tls.h
@@ -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);
 }
 
diff --git a/src/mapi/mapi/entry_x86_tls.h b/src/mapi/mapi/entry_x86_tls.h
index ff2b957..d4f7d98 100644
--- a/src/mapi/mapi/entry_x86_tls.h
+++ b/src/mapi/mapi/entry_x86_tls.h
@@ -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);
 }
 
diff --git a/src/mapi/mapi/entry_x86_tsd.h b/src/mapi/mapi/entry_x86_tsd.h
index fbf4ec5..f37c747 100644
--- a/src/mapi/mapi/entry_x86_tsd.h
+++ b/src/mapi/mapi/entry_x86_tsd.h
@@ -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);




More information about the mesa-commit mailing list