mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
Unsigned/signed case, missing void in no-argument functions and other small fixes to compile 100% clean on GCC4 (#301...
Original commit message from CVS: Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> * gst/autoplug/spidertest.c: (property_change_callback): * gst/gstbin.c: (gst_bin_save_thyself), (gst_bin_restore_thyself): * gst/gstcaps.c: (gst_caps_do_simplify), (gst_caps_save_thyself), (gst_caps_load_thyself): * gst/gstelement.c: (gst_element_save_thyself), (gst_element_restore_thyself): * gst/gstpad.c: (gst_pad_load_and_link), (gst_pad_save_thyself), (gst_ghost_pad_save_thyself): * gst/registries/gstlibxmlregistry.c: (read_string), (read_uint), (read_enum), (load_pad_template), (load_feature), (load_plugin), (load_paths): * libs/gst/control/dparammanager.c: (_gst_dpman_initialize): * libs/gst/control/unitconvert.c: (gst_unitconv_new), (gst_unitconv_unit_spec): * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_buffer_from_header), (gst_dp_caps_from_packet), (gst_dp_event_from_packet): Unsigned/signed case, missing void in no-argument functions and other small fixes to compile 100% clean on GCC4 (#301166).
This commit is contained in:
parent
01e9e90d8d
commit
fc3f486636
10 changed files with 79 additions and 52 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,27 @@
|
|||
2005-04-22 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/autoplug/spidertest.c: (property_change_callback):
|
||||
* gst/gstbin.c: (gst_bin_save_thyself), (gst_bin_restore_thyself):
|
||||
* gst/gstcaps.c: (gst_caps_do_simplify), (gst_caps_save_thyself),
|
||||
(gst_caps_load_thyself):
|
||||
* gst/gstelement.c: (gst_element_save_thyself),
|
||||
(gst_element_restore_thyself):
|
||||
* gst/gstpad.c: (gst_pad_load_and_link), (gst_pad_save_thyself),
|
||||
(gst_ghost_pad_save_thyself):
|
||||
* gst/registries/gstlibxmlregistry.c: (read_string), (read_uint),
|
||||
(read_enum), (load_pad_template), (load_feature), (load_plugin),
|
||||
(load_paths):
|
||||
* libs/gst/control/dparammanager.c: (_gst_dpman_initialize):
|
||||
* libs/gst/control/unitconvert.c: (gst_unitconv_new),
|
||||
(gst_unitconv_unit_spec):
|
||||
* libs/gst/dataprotocol/dataprotocol.c:
|
||||
(gst_dp_buffer_from_header), (gst_dp_caps_from_packet),
|
||||
(gst_dp_event_from_packet):
|
||||
Unsigned/signed case, missing void in no-argument functions
|
||||
and other small fixes to compile 100% clean on GCC4 (#301166).
|
||||
|
||||
2005-04-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/elements/gstelements.c:
|
||||
|
@ -19,7 +43,6 @@
|
|||
* gst/elements/gsttypefindelement.c: (gst_type_find_element_init),
|
||||
(push_buffer_store), (gst_type_find_element_handle_event),
|
||||
(gst_type_find_element_change_state):
|
||||
Allow event caching while typefinding so we don't lose events.
|
||||
* gst/elements/gsttypefindelement.h:
|
||||
Allow event caching while typefinding so we don't lose events.
|
||||
* gst/gsttag.c: (_gst_tag_initialize):
|
||||
|
|
|
@ -34,7 +34,7 @@ property_change_callback (GObject * object, GstObject * orig,
|
|||
GParamSpec * pspec)
|
||||
{
|
||||
GValue value = { 0, }; /* the important thing is that value.type = 0 */
|
||||
gchar *str = 0;
|
||||
gchar *str = NULL;
|
||||
|
||||
if (pspec->flags & G_PARAM_READABLE) {
|
||||
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
|
|
|
@ -1215,7 +1215,7 @@ gst_bin_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
if (GST_OBJECT_CLASS (parent_class)->save_thyself)
|
||||
GST_OBJECT_CLASS (parent_class)->save_thyself (GST_OBJECT (bin), parent);
|
||||
|
||||
childlist = xmlNewChild (parent, NULL, "children", NULL);
|
||||
childlist = xmlNewChild (parent, NULL, (guchar *) "children", NULL);
|
||||
|
||||
GST_CAT_INFO (GST_CAT_XML, "[%s]: saving %d children",
|
||||
GST_ELEMENT_NAME (bin), bin->numchildren);
|
||||
|
@ -1223,7 +1223,7 @@ gst_bin_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
children = bin->children;
|
||||
while (children) {
|
||||
child = GST_ELEMENT (children->data);
|
||||
elementnode = xmlNewChild (childlist, NULL, "element", NULL);
|
||||
elementnode = xmlNewChild (childlist, NULL, (guchar *) "element", NULL);
|
||||
gst_object_save_thyself (GST_OBJECT (child), elementnode);
|
||||
children = g_list_next (children);
|
||||
}
|
||||
|
@ -1238,12 +1238,12 @@ gst_bin_restore_thyself (GstObject * object, xmlNodePtr self)
|
|||
xmlNodePtr childlist;
|
||||
|
||||
while (field) {
|
||||
if (!strcmp (field->name, "children")) {
|
||||
if (!strcmp ((char *) field->name, "children")) {
|
||||
GST_CAT_INFO (GST_CAT_XML, "[%s]: loading children",
|
||||
GST_ELEMENT_NAME (object));
|
||||
childlist = field->xmlChildrenNode;
|
||||
while (childlist) {
|
||||
if (!strcmp (childlist->name, "element")) {
|
||||
if (!strcmp ((char *) childlist->name, "element")) {
|
||||
GstElement *element =
|
||||
gst_xml_make_element (childlist, GST_OBJECT (bin));
|
||||
|
||||
|
|
|
@ -1228,7 +1228,7 @@ gst_caps_structure_simplify (GstStructure ** result,
|
|||
gboolean
|
||||
gst_caps_do_simplify (GstCaps * caps)
|
||||
{
|
||||
GstStructure *simplify, *compare, *result;
|
||||
GstStructure *simplify, *compare, *result = NULL;
|
||||
gint i, j, start;
|
||||
gboolean changed = FALSE;
|
||||
|
||||
|
@ -1296,7 +1296,7 @@ gst_caps_save_thyself (const GstCaps * caps, xmlNodePtr parent)
|
|||
{
|
||||
char *s = gst_caps_to_string (caps);
|
||||
|
||||
xmlNewChild (parent, NULL, "caps", s);
|
||||
xmlNewChild (parent, NULL, (guchar *) "caps", (guchar *) s);
|
||||
g_free (s);
|
||||
return parent;
|
||||
}
|
||||
|
@ -1312,8 +1312,8 @@ gst_caps_save_thyself (const GstCaps * caps, xmlNodePtr parent)
|
|||
GstCaps *
|
||||
gst_caps_load_thyself (xmlNodePtr parent)
|
||||
{
|
||||
if (strcmp ("caps", parent->name) == 0) {
|
||||
return gst_caps_from_string (xmlNodeGetContent (parent));
|
||||
if (strcmp ("caps", (char *) parent->name) == 0) {
|
||||
return gst_caps_from_string ((char *) xmlNodeGetContent (parent));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
|
@ -3148,7 +3148,7 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
GList *pads;
|
||||
GstElementClass *oclass;
|
||||
GParamSpec **specs, *spec;
|
||||
gint nspecs, i;
|
||||
guint nspecs, i;
|
||||
GValue value = { 0, };
|
||||
GstElement *element;
|
||||
|
||||
|
@ -3158,12 +3158,14 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
|
||||
oclass = GST_ELEMENT_GET_CLASS (element);
|
||||
|
||||
xmlNewChild (parent, NULL, "name", GST_ELEMENT_NAME (element));
|
||||
xmlNewChild (parent, NULL, (guchar *) "name",
|
||||
(guchar *) GST_ELEMENT_NAME (element));
|
||||
|
||||
if (oclass->elementfactory != NULL) {
|
||||
GstElementFactory *factory = (GstElementFactory *) oclass->elementfactory;
|
||||
|
||||
xmlNewChild (parent, NULL, "type", GST_PLUGIN_FEATURE (factory)->name);
|
||||
xmlNewChild (parent, NULL, (guchar *) "type",
|
||||
(guchar *) GST_PLUGIN_FEATURE (factory)->name);
|
||||
}
|
||||
|
||||
/* FIXME: what is this? */
|
||||
|
@ -3182,8 +3184,8 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (spec));
|
||||
|
||||
g_object_get_property (G_OBJECT (element), spec->name, &value);
|
||||
param = xmlNewChild (parent, NULL, "param", NULL);
|
||||
xmlNewChild (param, NULL, "name", spec->name);
|
||||
param = xmlNewChild (parent, NULL, (guchar *) "param", NULL);
|
||||
xmlNewChild (param, NULL, (guchar *) "name", (guchar *) spec->name);
|
||||
|
||||
if (G_IS_PARAM_SPEC_STRING (spec))
|
||||
contents = g_value_dup_string (&value);
|
||||
|
@ -3195,7 +3197,7 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
else
|
||||
contents = g_strdup_value_contents (&value);
|
||||
|
||||
xmlNewChild (param, NULL, "value", contents);
|
||||
xmlNewChild (param, NULL, (guchar *) "value", (guchar *) contents);
|
||||
g_free (contents);
|
||||
|
||||
g_value_unset (&value);
|
||||
|
@ -3209,7 +3211,7 @@ gst_element_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
|
||||
/* figure out if it's a direct pad or a ghostpad */
|
||||
if (GST_ELEMENT (GST_OBJECT_PARENT (pad)) == element) {
|
||||
xmlNodePtr padtag = xmlNewChild (parent, NULL, "pad", NULL);
|
||||
xmlNodePtr padtag = xmlNewChild (parent, NULL, (guchar *) "pad", NULL);
|
||||
|
||||
gst_object_save_thyself (GST_OBJECT (pad), padtag);
|
||||
}
|
||||
|
@ -3233,14 +3235,14 @@ gst_element_restore_thyself (GstObject * object, xmlNodePtr self)
|
|||
/* parameters */
|
||||
children = self->xmlChildrenNode;
|
||||
while (children) {
|
||||
if (!strcmp (children->name, "param")) {
|
||||
if (!strcmp ((char *) children->name, "param")) {
|
||||
xmlNodePtr child = children->xmlChildrenNode;
|
||||
|
||||
while (child) {
|
||||
if (!strcmp (child->name, "name")) {
|
||||
name = xmlNodeGetContent (child);
|
||||
} else if (!strcmp (child->name, "value")) {
|
||||
value = xmlNodeGetContent (child);
|
||||
if (!strcmp ((char *) child->name, "name")) {
|
||||
name = (char *) xmlNodeGetContent (child);
|
||||
} else if (!strcmp ((char *) child->name, "value")) {
|
||||
value = (char *) xmlNodeGetContent (child);
|
||||
}
|
||||
child = child->next;
|
||||
}
|
||||
|
@ -3256,7 +3258,7 @@ gst_element_restore_thyself (GstObject * object, xmlNodePtr self)
|
|||
/* pads */
|
||||
children = self->xmlChildrenNode;
|
||||
while (children) {
|
||||
if (!strcmp (children->name, "pad")) {
|
||||
if (!strcmp ((char *) children->name, "pad")) {
|
||||
gst_pad_load_and_link (children, GST_OBJECT (element));
|
||||
}
|
||||
children = children->next;
|
||||
|
|
22
gst/gstpad.c
22
gst/gstpad.c
|
@ -3079,12 +3079,12 @@ gst_pad_load_and_link (xmlNodePtr self, GstObject * parent)
|
|||
gchar *name = NULL;
|
||||
|
||||
while (field) {
|
||||
if (!strcmp (field->name, "name")) {
|
||||
name = xmlNodeGetContent (field);
|
||||
if (!strcmp ((char *) field->name, "name")) {
|
||||
name = (char *) xmlNodeGetContent (field);
|
||||
pad = gst_element_get_pad (GST_ELEMENT (parent), name);
|
||||
g_free (name);
|
||||
} else if (!strcmp (field->name, "peer")) {
|
||||
peer = xmlNodeGetContent (field);
|
||||
} else if (!strcmp ((char *) field->name, "peer")) {
|
||||
peer = (char *) xmlNodeGetContent (field);
|
||||
}
|
||||
field = field->next;
|
||||
}
|
||||
|
@ -3148,7 +3148,8 @@ gst_pad_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
|
||||
realpad = GST_REAL_PAD (object);
|
||||
|
||||
xmlNewChild (parent, NULL, "name", GST_PAD_NAME (realpad));
|
||||
xmlNewChild (parent, NULL, (guchar *) "name",
|
||||
(guchar *) GST_PAD_NAME (realpad));
|
||||
if (GST_RPAD_PEER (realpad) != NULL) {
|
||||
gchar *content;
|
||||
|
||||
|
@ -3157,10 +3158,10 @@ gst_pad_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
/* we just save it off */
|
||||
content = g_strdup_printf ("%s.%s",
|
||||
GST_OBJECT_NAME (GST_PAD_PARENT (peer)), GST_PAD_NAME (peer));
|
||||
xmlNewChild (parent, NULL, "peer", content);
|
||||
xmlNewChild (parent, NULL, (guchar *) "peer", (guchar *) content);
|
||||
g_free (content);
|
||||
} else
|
||||
xmlNewChild (parent, NULL, "peer", "");
|
||||
xmlNewChild (parent, NULL, (guchar *) "peer", (guchar *) "");
|
||||
|
||||
return parent;
|
||||
}
|
||||
|
@ -3184,9 +3185,10 @@ gst_ghost_pad_save_thyself (GstPad * pad, xmlNodePtr parent)
|
|||
|
||||
g_return_val_if_fail (GST_IS_GHOST_PAD (pad), NULL);
|
||||
|
||||
self = xmlNewChild (parent, NULL, "ghostpad", NULL);
|
||||
xmlNewChild (self, NULL, "name", GST_PAD_NAME (pad));
|
||||
xmlNewChild (self, NULL, "parent", GST_OBJECT_NAME (GST_PAD_PARENT (pad)));
|
||||
self = xmlNewChild (parent, NULL, (guchar *) "ghostpad", NULL);
|
||||
xmlNewChild (self, NULL, (guchar *) "name", (guchar *) GST_PAD_NAME (pad));
|
||||
xmlNewChild (self, NULL, (guchar *) "parent",
|
||||
(guchar *) GST_OBJECT_NAME (GST_PAD_PARENT (pad)));
|
||||
|
||||
/* FIXME FIXME FIXME! */
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ read_string (xmlTextReaderPtr reader, gchar ** write_to)
|
|||
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_TEXT) {
|
||||
if (found)
|
||||
return FALSE;
|
||||
*write_to = g_strdup (xmlTextReaderConstValue (reader));
|
||||
*write_to = g_strdup ((char *) xmlTextReaderConstValue (reader));
|
||||
found = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -610,7 +610,7 @@ read_uint (xmlTextReaderPtr reader, guint * write_to)
|
|||
|
||||
if (found)
|
||||
return FALSE;
|
||||
*write_to = strtol (xmlTextReaderConstValue (reader), &ret, 0);
|
||||
*write_to = strtol ((char *) xmlTextReaderConstValue (reader), &ret, 0);
|
||||
if (ret != NULL)
|
||||
return FALSE;
|
||||
found = TRUE;
|
||||
|
@ -641,7 +641,7 @@ read_enum (xmlTextReaderPtr reader, GType enum_type, guint * write_to)
|
|||
return FALSE;
|
||||
value =
|
||||
g_enum_get_value_by_nick (enum_class,
|
||||
xmlTextReaderConstValue (reader));
|
||||
(char *) xmlTextReaderConstValue (reader));
|
||||
if (value) {
|
||||
*write_to = value->value;
|
||||
found = TRUE;
|
||||
|
@ -671,7 +671,7 @@ load_pad_template (xmlTextReaderPtr reader)
|
|||
}
|
||||
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_ELEMENT &&
|
||||
xmlTextReaderDepth (reader) == depth + 1) {
|
||||
const gchar *tag = xmlTextReaderConstName (reader);
|
||||
const gchar *tag = (const gchar *) xmlTextReaderConstName (reader);
|
||||
|
||||
if (g_str_equal (tag, "nametemplate")) {
|
||||
read_string (reader, &name);
|
||||
|
@ -723,7 +723,7 @@ load_feature (xmlTextReaderPtr reader)
|
|||
return feature;
|
||||
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_ELEMENT &&
|
||||
xmlTextReaderDepth (reader) == depth + 1) {
|
||||
const gchar *tag = xmlTextReaderConstName (reader);
|
||||
const gchar *tag = (const gchar *) xmlTextReaderConstName (reader);
|
||||
|
||||
if (g_str_equal (tag, "name"))
|
||||
read_string (reader, &feature->name);
|
||||
|
@ -818,7 +818,7 @@ load_plugin (xmlTextReaderPtr reader)
|
|||
}
|
||||
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_ELEMENT &&
|
||||
xmlTextReaderDepth (reader) == 2) {
|
||||
const gchar *tag = xmlTextReaderConstName (reader);
|
||||
const gchar *tag = (const gchar *) xmlTextReaderConstName (reader);
|
||||
|
||||
if (g_str_equal (tag, "name")) {
|
||||
if (!read_string (reader, &plugin->desc.name))
|
||||
|
@ -865,7 +865,7 @@ load_paths (xmlTextReaderPtr reader, GstXMLRegistry * registry)
|
|||
}
|
||||
if (xmlTextReaderNodeType (reader) == XML_READER_TYPE_ELEMENT &&
|
||||
xmlTextReaderDepth (reader) == 2) {
|
||||
const gchar *tag = xmlTextReaderConstName (reader);
|
||||
const gchar *tag = (const gchar *) xmlTextReaderConstName (reader);
|
||||
|
||||
if (g_str_equal (tag, "path")) {
|
||||
gchar *s = NULL;
|
||||
|
|
|
@ -67,7 +67,7 @@ static GObjectClass *parent_class;
|
|||
static guint gst_dpman_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
void
|
||||
_gst_dpman_initialize ()
|
||||
_gst_dpman_initialize (void)
|
||||
{
|
||||
if (_gst_dpman_init_done)
|
||||
return;
|
||||
|
|
|
@ -98,7 +98,7 @@ gst_unitconv_init (GstUnitConvert * unitconv)
|
|||
}
|
||||
|
||||
GstUnitConvert *
|
||||
gst_unitconv_new ()
|
||||
gst_unitconv_new (void)
|
||||
{
|
||||
GstUnitConvert *unitconv;
|
||||
|
||||
|
@ -194,10 +194,10 @@ gst_unitconv_unit_spec (gchar * unit_name)
|
|||
{
|
||||
GstUnit *unit;
|
||||
|
||||
g_return_val_if_fail (unit_name != NULL, FALSE);
|
||||
g_return_val_if_fail (unit_name != NULL, NULL);
|
||||
|
||||
unit = g_hash_table_lookup (_gst_units, unit_name);
|
||||
g_return_val_if_fail (unit != NULL, FALSE);
|
||||
g_return_val_if_fail (unit != NULL, NULL);
|
||||
|
||||
return unit->unit_spec;
|
||||
}
|
||||
|
|
|
@ -423,7 +423,7 @@ gst_dp_buffer_from_header (guint header_length, const guint8 * header)
|
|||
GstBuffer *buffer;
|
||||
|
||||
g_return_val_if_fail (GST_DP_HEADER_PAYLOAD_TYPE (header) ==
|
||||
GST_DP_PAYLOAD_BUFFER, FALSE);
|
||||
GST_DP_PAYLOAD_BUFFER, NULL);
|
||||
buffer =
|
||||
gst_buffer_new_and_alloc ((guint) GST_DP_HEADER_PAYLOAD_LENGTH (header));
|
||||
GST_BUFFER_TIMESTAMP (buffer) = GST_DP_HEADER_TIMESTAMP (header);
|
||||
|
@ -452,10 +452,10 @@ gst_dp_caps_from_packet (guint header_length, const guint8 * header,
|
|||
GstCaps *caps;
|
||||
const gchar *string;
|
||||
|
||||
g_return_val_if_fail (header, FALSE);
|
||||
g_return_val_if_fail (payload, FALSE);
|
||||
g_return_val_if_fail (header, NULL);
|
||||
g_return_val_if_fail (payload, NULL);
|
||||
g_return_val_if_fail (GST_DP_HEADER_PAYLOAD_TYPE (header) ==
|
||||
GST_DP_PAYLOAD_CAPS, FALSE);
|
||||
GST_DP_PAYLOAD_CAPS, NULL);
|
||||
|
||||
string = payload;
|
||||
caps = gst_caps_from_string (string);
|
||||
|
@ -479,14 +479,14 @@ gst_dp_event_from_packet (guint header_length, const guint8 * header,
|
|||
GstEvent *event = NULL;
|
||||
GstEventType type;
|
||||
|
||||
g_return_val_if_fail (header, FALSE);
|
||||
g_return_val_if_fail (header, NULL);
|
||||
/* payload can be NULL, e.g. for an EOS event */
|
||||
|
||||
type = GST_DP_HEADER_PAYLOAD_TYPE (header) - GST_DP_PAYLOAD_EVENT_NONE;
|
||||
switch (type) {
|
||||
case GST_EVENT_UNKNOWN:
|
||||
g_warning ("Unknown event, ignoring");
|
||||
return FALSE;
|
||||
return NULL;
|
||||
case GST_EVENT_EOS:
|
||||
case GST_EVENT_FLUSH:
|
||||
case GST_EVENT_EMPTY:
|
||||
|
@ -533,10 +533,10 @@ gst_dp_event_from_packet (guint header_length, const guint8 * header,
|
|||
case GST_EVENT_NAVIGATION:
|
||||
case GST_EVENT_TAG:
|
||||
g_warning ("Unhandled event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
return FALSE;
|
||||
return NULL;
|
||||
default:
|
||||
g_warning ("Unknown event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
return FALSE;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return event;
|
||||
|
|
Loading…
Reference in a new issue