gst/gstelement.h: gcc versions prior to gcc 3.3 apparently complain about a NULL...
authorTim-Philipp Müller <tim@centricular.net>
Sun, 8 Oct 2006 13:27:17 +0000 (13:27 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Sun, 8 Oct 2006 13:27:17 +0000 (13:27 +0000)
Original commit message from CVS:
* gst/gstelement.h:
gcc versions prior to gcc 3.3 apparently complain about a NULL printf
format string, so don't use G_GNUC_PRINTF for those versions.

ChangeLog
gst/gstelement.h

index 150e0ad..6e4cca9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-08  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst/gstelement.h:
+         gcc versions prior to gcc 3.3 apparently complain about a NULL printf
+         format string, so don't use G_GNUC_PRINTF for those versions.
+
 2006-10-07  Tim-Philipp Müller  <tim at centricular dot net>
 
        * gst/gsttaglist.c: (gst_is_tag_list):
index ca87fbc..879605b 100644 (file)
@@ -570,7 +570,8 @@ gboolean            gst_element_query               (GstElement *element, GstQuery *query);
 gboolean               gst_element_post_message        (GstElement * element, GstMessage * message);
 
 /* error handling */
-#ifdef GST_USING_PRINTF_EXTENSION
+/* gcc versions < 3.3 warn about NULL being passed as format to printf */
+#if (defined(GST_USING_PRINTF_EXTENSION) || !defined(__GNUC__) || (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 3))
 gchar *                        _gst_element_error_printf       (const gchar *format, ...);
 #else
 gchar *                        _gst_element_error_printf       (const gchar *format, ...) G_GNUC_PRINTF (1, 2);