configure.ac: make GST_ERROR_CFLAGS overridable and re-enable Werror

Original commit message from CVS:
* configure.ac:
make GST_ERROR_CFLAGS overridable and re-enable Werror
* docs/faq/cvs.xml:
add a note about error CFLAGS
* docs/gst/tmpl/gstfakesrc.sgml:
* gst/elements/gstfakesrc.c:
comment out some unused code
* gst/gst.c: (split_and_iterate):
* gst/registries/gstlibxmlregistry.c: (load_pad_template),
(load_feature):
plug some memleaks
This commit is contained in:
Thomas Vander Stichele 2005-07-08 14:01:31 +00:00
parent 854b4bb560
commit f627c78fa6
9 changed files with 62 additions and 19 deletions

View file

@ -1,3 +1,17 @@
2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:
make GST_ERROR_CFLAGS overridable and re-enable Werror
* docs/faq/cvs.xml:
add a note about error CFLAGS
* docs/gst/tmpl/gstfakesrc.sgml:
* gst/elements/gstfakesrc.c:
comment out some unused code
* gst/gst.c: (split_and_iterate):
* gst/registries/gstlibxmlregistry.c: (load_pad_template),
(load_feature):
plug some memleaks
2005-07-07 Thomas Vander Stichele <thomas at apestaart dot org> 2005-07-07 Thomas Vander Stichele <thomas at apestaart dot org>
* common/Makefile.am: * common/Makefile.am:

2
common

@ -1 +1 @@
Subproject commit c40d6ab2d62f885c52650db2438e099d3f369f8f Subproject commit 221ac8abacb46858382a9f8c924152ae588f4a2e

View file

@ -62,10 +62,11 @@ AS_COMPILER_FLAG(-Wall,
GST_ERROR_CFLAGS="-Wall", GST_ERROR_CFLAGS="-Wall",
GST_ERROR_CFLAGS="") GST_ERROR_CFLAGS="")
dnl if we're in nano >= 1, add -Werror if supported dnl if we're in nano >= 1, add -Werror if supported
dnl if test "x$GST_CVS" = "xyes" if test "x$GST_CVS" = "xyes"
dnl then then
dnl AS_COMPILER_FLAG(-Werror, GST_ERROR_CFLAGS="$GST_ERROR_CFLAGS -Werror") AS_COMPILER_FLAG(-Werror, GST_ERROR_CFLAGS="$GST_ERROR_CFLAGS -Werror")
dnl fi fi
AC_SUBST(GST_ERROR_CFLAGS)
dnl We disable static building for development, for time savings dnl We disable static building for development, for time savings
dnl *NOTE*: dnl this line before release, so release does static too dnl *NOTE*: dnl this line before release, so release does static too
@ -588,7 +589,7 @@ dnl we disable deprecated internally
dnl XML, GLib, popt, GST_INT, VALGRIND, and the right include for CFLAGS dnl XML, GLib, popt, GST_INT, VALGRIND, and the right include for CFLAGS
dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in
GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \ GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \
$GST_INT_CFLAGS $GST_ERROR_CFLAGS -DGST_DISABLE_DEPRECATED" $GST_INT_CFLAGS \$(GST_ERROR_CFLAGS) -DGST_DISABLE_DEPRECATED"
dnl Private vars for libgst only dnl Private vars for libgst only
GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS \ GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS \

View file

@ -102,5 +102,34 @@ where you replace prefix with the prefix where libtool was installed.
</para> </para>
</answer> </answer>
</qandaentry> </qandaentry>
<qandaentry>
<question id="werror">
<para>
Why is "-Wall -Werror" being used ?
</para>
</question>
<answer>
<para>
"-Wall" is being used because it finds a lot of possible problems with code.
Not all of them are necessarily a problem, but it's better to have the compiler
report some false positives and find a work-around than to spend time
chasing a bug for days that the compiler was giving you hints about.
</para>
<para>
"-Werror" is turned off for actual releases. It's turned on by default for
CVS and prereleases so that people actually notice and fix problems found by
"-Wall". We want people to actively hit and report or fix them.
</para>
<para>
If for any reason you want to bypass these flags and you are certain it's the
right thing to do, you can run
<programlisting>make GST_ERROR_CFLAGS="</programlisting>
to clear the CFLAGS for error checking.
</para>
</answer>
</qandaentry>
</qandaset> </qandaset>
</sect1> </sect1>

View file

@ -43,11 +43,6 @@ GstFakeSrc
</para> </para>
<!-- ##### ARG GstFakeSrc:eos ##### -->
<para>
</para>
<!-- ##### ARG GstFakeSrc:filltype ##### --> <!-- ##### ARG GstFakeSrc:filltype ##### -->
<para> <para>
@ -78,11 +73,6 @@ GstFakeSrc
</para> </para>
<!-- ##### ARG GstFakeSrc:output ##### -->
<para>
</para>
<!-- ##### ARG GstFakeSrc:parentsize ##### --> <!-- ##### ARG GstFakeSrc:parentsize ##### -->
<para> <para>

View file

@ -94,6 +94,7 @@ enum
PROP_IS_LIVE PROP_IS_LIVE
}; };
/* not implemented
#define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type()) #define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type())
static GType static GType
gst_fakesrc_output_get_type (void) gst_fakesrc_output_get_type (void)
@ -117,6 +118,7 @@ gst_fakesrc_output_get_type (void)
} }
return fakesrc_output_type; return fakesrc_output_type;
} }
*/
#define GST_TYPE_FAKESRC_DATA (gst_fakesrc_data_get_type()) #define GST_TYPE_FAKESRC_DATA (gst_fakesrc_data_get_type())
static GType static GType

View file

@ -448,6 +448,7 @@ split_and_iterate (const gchar * stringlist, gchar * separator, GFunc iterator,
break; break;
} }
} }
g_strfreev (strings);
} }
} }

View file

@ -661,6 +661,8 @@ load_pad_template (xmlTextReaderPtr reader)
guint direction = 0, presence = 0; guint direction = 0, presence = 0;
while ((ret = xmlTextReaderRead (reader)) == 1) { while ((ret = xmlTextReaderRead (reader)) == 1) {
/* if we're back at our depth, we have all info, and can return
* the completely parsed template */
if (xmlTextReaderDepth (reader) == depth) { if (xmlTextReaderDepth (reader) == depth) {
GstStaticPadTemplate *template; GstStaticPadTemplate *template;
@ -684,6 +686,7 @@ load_pad_template (xmlTextReaderPtr reader)
read_enum (reader, GST_TYPE_PAD_PRESENCE, &presence); read_enum (reader, GST_TYPE_PAD_PRESENCE, &presence);
} else if (!strncmp (tag, "caps", 4)) { } else if (!strncmp (tag, "caps", 4)) {
read_string (reader, &caps_str); read_string (reader, &caps_str);
g_print ("THOMAS: read caps string %s\n", caps_str);
} }
} }
} }
@ -698,14 +701,15 @@ load_feature (xmlTextReaderPtr reader)
{ {
int ret; int ret;
int depth = xmlTextReaderDepth (reader); int depth = xmlTextReaderDepth (reader);
const gchar *feature_name = xmlChar *feature_name =
(const gchar *) xmlTextReaderGetAttribute (reader, BAD_CAST "typename"); xmlTextReaderGetAttribute (reader, BAD_CAST "typename");
GstPluginFeature *feature; GstPluginFeature *feature;
GType type; GType type;
if (!feature_name) if (!feature_name)
return NULL; return NULL;
type = g_type_from_name (feature_name); type = g_type_from_name ((gchar *) feature_name);
xmlFree (feature_name);
if (!type) if (!type)
return NULL; return NULL;
feature = g_object_new (type, NULL); feature = g_object_new (type, NULL);

View file

@ -94,6 +94,7 @@ enum
PROP_IS_LIVE PROP_IS_LIVE
}; };
/* not implemented
#define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type()) #define GST_TYPE_FAKESRC_OUTPUT (gst_fakesrc_output_get_type())
static GType static GType
gst_fakesrc_output_get_type (void) gst_fakesrc_output_get_type (void)
@ -117,6 +118,7 @@ gst_fakesrc_output_get_type (void)
} }
return fakesrc_output_type; return fakesrc_output_type;
} }
*/
#define GST_TYPE_FAKESRC_DATA (gst_fakesrc_data_get_type()) #define GST_TYPE_FAKESRC_DATA (gst_fakesrc_data_get_type())
static GType static GType