Patch by: Josep Torre Valles <josep@fluendo.com>
+ * gst/gst.c: (gst_init_get_option_group):
+ Fix empty declaration and type mismatch.
+ * gst/gstbin.c: (gst_bin_change_state_func):
+ Fix type mismatch.
+ * gst/gstelement.c: (gst_element_continue_state),
+ (gst_element_set_state_func), (gst_element_change_state),
+ (gst_element_change_state_func):
+ Fix type mismatches.
+ * gst/gstinfo.c: (gst_debug_compare_log_function_by_func),
+ (gst_debug_remove_log_function), (_gst_debug_nameof_funcptr):
+ Cast as appropriate.
+ * gst/gstobject.c: (gst_class_signal_connect):
+ Cast as appropriate. The function pointer parameter really
+ has the wrong type but would break API if we change it.
+ * gst/gstquery.c:
+ Fix redefinition of _FILE_OFFSET_BITS caused on Solaris wrt
+ order of including string.h.
+ * gst/gstutils.c: (gst_element_state_get_name):
+ Remove unreachable line.
+ * gst/gstxml.c: (gst_xml_parse_doc):
+ Fix type mismatch.
+ All these caught by Forte.
+
+2006-10-06 Zaheer Abbas Merali <zaheerabbas at merali dot org>
+
+ Patch by: Josep Torre Valles <josep@fluendo.com>
+
* common/m4/gst-error.m4:
Fixed bug #360151.
We need to disable warnings on Forte for empty declarations
/* defaults */
#ifdef HAVE_FORK
-#define DEFAULT_FORK TRUE;
+#define DEFAULT_FORK TRUE
#else
-#define DEFAULT_FORK FALSE;
+#define DEFAULT_FORK FALSE
#endif /* HAVE_FORK */
/* set to TRUE when segfaults need to be left as is, FIXME, this variable is
GOptionGroup *group;
const static GOptionEntry gst_args[] = {
{"gst-version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- parse_goption_arg, N_("Print the GStreamer version"), NULL},
+ (gpointer) parse_goption_arg, N_("Print the GStreamer version"), NULL},
{"gst-fatal-warnings", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- parse_goption_arg, N_("Make all warnings fatal"), NULL},
+ (gpointer) parse_goption_arg, N_("Make all warnings fatal"), NULL},
#ifndef GST_DISABLE_GST_DEBUG
{"gst-debug-help", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- parse_goption_arg, N_("Print available debug categories and exit"),
+ (gpointer) parse_goption_arg,
+ N_("Print available debug categories and exit"),
NULL},
- {"gst-debug-level", 0, 0, G_OPTION_ARG_CALLBACK, parse_goption_arg,
+ {"gst-debug-level", 0, 0, G_OPTION_ARG_CALLBACK,
+ (gpointer) parse_goption_arg,
N_("Default debug level from 1 (only error) to 5 (anything) or "
"0 for no output"),
N_("LEVEL")},
- {"gst-debug", 0, 0, G_OPTION_ARG_CALLBACK, parse_goption_arg,
+ {"gst-debug", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) parse_goption_arg,
N_("Comma-separated list of category_name:level pairs to set "
"specific levels for the individual categories. Example: "
"GST_AUTOPLUG:5,GST_ELEMENT_*:3"),
N_("LIST")},
{"gst-debug-no-color", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- parse_goption_arg, N_("Disable colored debugging output"), NULL},
+ (gpointer) parse_goption_arg, N_("Disable colored debugging output"),
+ NULL},
{"gst-debug-disable", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- parse_goption_arg, N_("Disable debugging"), NULL},
+ (gpointer) parse_goption_arg, N_("Disable debugging"), NULL},
#endif
{"gst-plugin-spew", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- parse_goption_arg, N_("Enable verbose plugin loading diagnostics"),
+ (gpointer) parse_goption_arg,
+ N_("Enable verbose plugin loading diagnostics"),
NULL},
- {"gst-plugin-path", 0, 0, G_OPTION_ARG_CALLBACK, parse_goption_arg,
+ {"gst-plugin-path", 0, 0, G_OPTION_ARG_CALLBACK,
+ (gpointer) parse_goption_arg,
N_("Colon-separated paths containing plugins"), N_("PATHS")},
- {"gst-plugin-load", 0, 0, G_OPTION_ARG_CALLBACK, parse_goption_arg,
+ {"gst-plugin-load", 0, 0, G_OPTION_ARG_CALLBACK,
+ (gpointer) parse_goption_arg,
N_("Comma-separated list of plugins to preload in addition to the "
"list stored in environment variable GST_PLUGIN_PATH"),
N_("PLUGINS")},
{"gst-disable-segtrap", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- parse_goption_arg,
+ (gpointer) parse_goption_arg,
N_("Disable trapping of segmentation faults during plugin loading"),
NULL},
{"gst-disable-registry-fork", 0, G_OPTION_FLAG_NO_ARG,
G_OPTION_ARG_CALLBACK,
- parse_goption_arg,
+ (gpointer) parse_goption_arg,
N_("Disable the use of fork() while scanning the registry"),
NULL},
{NULL}
gboolean done;
/* we don't need to take the STATE_LOCK, it is already taken */
- current = GST_STATE_TRANSITION_CURRENT (transition);
- next = GST_STATE_TRANSITION_NEXT (transition);
+ current = (GstState) GST_STATE_TRANSITION_CURRENT (transition);
+ next = (GstState) GST_STATE_TRANSITION_NEXT (transition);
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, element,
"changing state of children from %s to %s",
GstStateChange transition;
GST_OBJECT_LOCK (element);
- old_ret = GST_STATE_RETURN (element);
+ old_ret = (GstState) GST_STATE_RETURN (element);
GST_STATE_RETURN (element) = ret;
pending = GST_STATE_PENDING (element);
goto complete;
next = GST_STATE_GET_NEXT (current, pending);
- transition = GST_STATE_TRANSITION (current, next);
+ transition = (GstStateChange) GST_STATE_TRANSITION (current, next);
GST_STATE_NEXT (element) = next;
/* mark busy */
if (current != next)
GST_STATE_RETURN (element) = GST_STATE_CHANGE_ASYNC;
- transition = GST_STATE_TRANSITION (current, next);
+ transition = (GstStateChange) GST_STATE_TRANSITION (current, next);
GST_CAT_DEBUG_OBJECT (GST_CAT_STATES, element,
"%s: setting state from %s to %s",
oclass = GST_ELEMENT_GET_CLASS (element);
/* start with the current state. */
- current = GST_STATE_TRANSITION_CURRENT (transition);
+ current = (GstState) GST_STATE_TRANSITION_CURRENT (transition);
next = GST_STATE_TRANSITION_NEXT (transition);
/* call the state change function so it can set the state */
g_return_val_if_fail (GST_IS_ELEMENT (element), GST_STATE_CHANGE_FAILURE);
- state = GST_STATE_TRANSITION_CURRENT (transition);
+ state = (GstState) GST_STATE_TRANSITION_CURRENT (transition);
next = GST_STATE_TRANSITION_NEXT (transition);
/* if the element already is in the given state, we just return success */
static gint
gst_debug_compare_log_function_by_func (gconstpointer entry, gconstpointer func)
{
- gpointer entryfunc = ((LogFuncEntry *) entry)->func;
+ gpointer entryfunc = (gpointer) (((LogFuncEntry *) entry)->func);
return (entryfunc < func) ? -1 : (entryfunc > func) ? 1 : 0;
}
removals =
gst_debug_remove_with_compare_func
- (gst_debug_compare_log_function_by_func, func);
+ (gst_debug_compare_log_function_by_func, (gpointer) func);
GST_DEBUG ("removed log function %p %d times from log function list", func,
removals);
/* This function MUST NOT return NULL */
const gchar *_gst_debug_nameof_funcptr (GstDebugFuncPtr func)
{
- gpointer ptr = (gpointer) func;
gchar *ptrname;
#ifdef HAVE_DLADDR
g_static_mutex_lock (&__dbg_functions_mutex);
if (G_LIKELY (__gst_function_pointers)) {
- ptrname = g_hash_table_lookup (__gst_function_pointers, ptr);
+ ptrname = g_hash_table_lookup (__gst_function_pointers, (gpointer) func);
g_static_mutex_unlock (&__dbg_functions_mutex);
if (G_LIKELY (ptrname))
return ptrname;
/* we need to create an entry in the hash table for this one so we don't leak
* the name */
#ifdef HAVE_DLADDR
- if (dladdr (ptr, &dlinfo) && dlinfo.dli_sname) {
+ if (dladdr ((gpointer) func, &dlinfo) && dlinfo.dli_sname) {
gchar *name = g_strdup (dlinfo.dli_sname);
- _gst_debug_register_funcptr (ptr, name);
+ _gst_debug_register_funcptr (func, name);
return name;
} else
#endif
{
- gchar *name = g_strdup_printf ("%p", ptr);
+ gchar *name = g_strdup_printf ("%p", (gpointer) func);
- _gst_debug_register_funcptr (ptr, name);
+ _gst_debug_register_funcptr (func, name);
return name;
}
}
gst_class_signal_connect (GstObjectClass * klass,
const gchar * name, gpointer func, gpointer func_data)
{
- return g_signal_connect (klass->signal_object, name, func, func_data);
+ /* [0.11] func parameter needs to be changed to a GCallback *
+ * doing so now would be an API break. */
+ return g_signal_connect (klass->signal_object, name, G_CALLBACK (func),
+ func_data);
}
#ifndef GST_DISABLE_LOADSAVE_REGISTRY
* Last reviewed on 2006-02-14 (0.10.4)
*/
-#include <string.h>
-
#include "gst_private.h"
#include "gstinfo.h"
#include "gstquery.h"
return g_strdup_printf ("UNKNOWN!(%d)", state);
#endif
}
- return "";
}
/**
}
gst_class_signal_connect (GST_OBJECT_CLASS (G_OBJECT_GET_CLASS (xml)),
- "object_loaded", gst_xml_object_loaded, xml);
+ "object_loaded", (gpointer) gst_xml_object_loaded, xml);
xml->ns = ns;