From c64c4fd000265c1af931a905af874d46ff5a7f94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 17 Oct 2006 10:30:27 +0000 Subject: [PATCH] gst/gstbuffer.h: Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related type-punned pointer warnings. Original commit message from CVS: * gst/gstbuffer.h: Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related type-punned pointer warnings. --- ChangeLog | 6 ++++++ gst/gstbuffer.h | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 638e50b..b719857 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-17 Tim-Philipp Müller + + * gst/gstbuffer.h: + Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related + type-punned pointer warnings. + 2006-10-16 Tim-Philipp Müller * gst/gstelement.h: diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index a7bf2d0..6fd8872 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -376,7 +376,12 @@ GstBuffer* gst_buffer_make_metadata_writable (GstBuffer *buf); * * Either @nbuf or the #GstBuffer pointed to by @obuf may be NULL. */ -#define gst_buffer_replace(obuf,nbuf) gst_mini_object_replace ((GstMiniObject **)(obuf), GST_MINI_OBJECT_CAST (nbuf)) +#define gst_buffer_replace(obuf,nbuf) \ +G_STMT_START { \ + GstBuffer **___obufaddr = (obuf); \ + gst_mini_object_replace ((GstMiniObject **)___obufaddr, \ + GST_MINI_OBJECT_CAST (nbuf)); \ +} G_STMT_END GstCaps* gst_buffer_get_caps (GstBuffer *buffer); void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps); -- 2.7.4