From 74487a8805ad9bbd9f38aaa64f43ed79b15c420f Mon Sep 17 00:00:00 2001 From: Mathias Hasselmann Date: Thu, 10 Apr 2008 21:40:48 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20519137=20=E2=80=93=20g=5Fslice=5Fdup=20ma?= =?UTF-8?q?cro=20needs=20cast=20for=2064-bit=20platform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * glib/gslice.h (g_slice_copy): Apply type casts needed for proper compilation on 64-bit platforms. svn path=/trunk/; revision=6848 --- ChangeLog | 7 +++++++ glib/gslice.h | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 72ad4b383..243b09331 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-10 Mathias Hasselmann + + Bug 519137 – g_slice_dup macro needs cast for 64-bit platform + + * glib/gslice.h (g_slice_copy): Apply type casts needed + for proper compilation on 64-bit platforms. + 2008-04-09 Federico Mena Quintero * glib/gbookmarkfile.c (bookmark_metadata_free): Don't leak diff --git a/glib/gslice.h b/glib/gslice.h index 835d12476..12f797622 100644 --- a/glib/gslice.h +++ b/glib/gslice.h @@ -59,7 +59,8 @@ void g_slice_free_chain_with_offset (gsize block_size, /* we go through extra hoops to ensure type safety */ #define g_slice_dup(type, mem) \ - (1 ? g_slice_copy (sizeof (type), (mem)) : (type*) ((type*) 0 == (mem))) + (1 ? (type*) g_slice_copy (sizeof (type), (mem)) \ + : ((void) ((type*) 0 == (mem)), (type*) 0)) #define g_slice_free(type, mem) do { \ if (1) g_slice_free1 (sizeof (type), (mem)); \ else (void) ((type*) 0 == (mem)); \