Mesa (master): mesa: fix void pointer arithmetic warning

Brian Paul brianp at kemper.freedesktop.org
Wed Apr 20 11:04:47 PDT 2011


Module: Mesa
Branch: master
Commit: 42d377224af0fcf5a21269958ce5f96c4306c4fa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=42d377224af0fcf5a21269958ce5f96c4306c4fa

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Apr 20 12:04:25 2011 -0600

mesa: fix void pointer arithmetic warning

---

 src/mesa/main/renderbuffer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 8b9033f..fa884c0 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -125,8 +125,8 @@ get_values_generic(struct gl_context *ctx, struct gl_renderbuffer *rb,
 
    for (i = 0; i < count; i++) {
       const void *src = rb->GetPointer(ctx, rb, x[i], y[i]);
-
-      memcpy(values + i * format_bytes, src, format_bytes);
+      char *dst = (char *) values + i * format_bytes;
+      memcpy(dst, src, format_bytes);
    }
 }
 



More information about the mesa-commit mailing list