[glib] Don't do pointer arithmetics on void*
- From: Tor Lillqvist <tml src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib] Don't do pointer arithmetics on void*
- Date: Thu, 7 Jan 2010 08:14:43 +0000 (UTC)
commit 4c55b45162a3a76ca6c1d1c450ea667eeb7bae44
Author: Haakon Sporsheim <haakon sporsheim gmail com>
Date: Thu Jan 7 10:12:13 2010 +0200
Don't do pointer arithmetics on void*
For instance MSVC doesn't like that.
Signed-off-by: Tor Lillqvist <tml iki fi>
gobject/gatomicarray.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gatomicarray.c b/gobject/gatomicarray.c
index a7b53a0..2c2a09c 100644
--- a/gobject/gatomicarray.c
+++ b/gobject/gatomicarray.c
@@ -77,7 +77,7 @@ freelist_alloc (gsize size, gboolean reuse)
real_size = sizeof (gsize) + MAX (size, sizeof (FreeListNode));
mem = g_slice_alloc (real_size);
- mem += sizeof (gsize);
+ mem = ((char *) mem) + sizeof (gsize);
G_ATOMIC_ARRAY_DATA_SIZE (mem) = size;
return mem;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]