[gst-cvs] gstreamer: caps: Use G_GNUC_WARN_UNUSED_RESULT for make_writable()
Benjamin Otte
company at kemper.freedesktop.org
Thu Apr 29 13:41:57 PDT 2010
Module: gstreamer
Branch: master
Commit: 31832d3c217ab1930e05f614ef7c1ccc4042606b
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=31832d3c217ab1930e05f614ef7c1ccc4042606b
Author: Benjamin Otte <otte at redhat.com>
Date: Mon Apr 26 21:52:07 2010 +0200
caps: Use G_GNUC_WARN_UNUSED_RESULT for make_writable()
People often call
gst_caps_make_writable (caps);
instead of
caps = gst_caps_make_writable (caps);
and cause a bug. Warning about an unused return value helps here.
See https://bugzilla.gnome.org/show_bug.cgi?id=616541#c2 for an example.
---
gst/gstcaps.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gst/gstcaps.h b/gst/gstcaps.h
index e0a2aae..35a1fde 100644
--- a/gst/gstcaps.h
+++ b/gst/gstcaps.h
@@ -186,7 +186,7 @@ GstCaps * gst_caps_new_full_valist (GstStructure *structure,
/* reference counting */
GstCaps * gst_caps_ref (GstCaps *caps);
GstCaps * gst_caps_copy (const GstCaps *caps);
-GstCaps * gst_caps_make_writable (GstCaps *caps);
+GstCaps * gst_caps_make_writable (GstCaps *caps) G_GNUC_WARN_UNUSED_RESULT;
void gst_caps_unref (GstCaps *caps);
GType gst_static_caps_get_type (void);
More information about the Gstreamer-commits
mailing list