Pass gint/guint pointers instead of enum pointers

The underlying integer type for enums are implementation defined and may
not be the same size as gint/guint. So implicitly casting from pointers-
to-enum-types to pointers-to-int-types is unsafe. MSVC warns on these.

https://bugzilla.gnome.org/show_bug.cgi?id=774638
This commit is contained in:
Scott D Phillips 2016-11-17 10:19:22 -08:00 committed by Thibault Saunier
parent e3731ba839
commit 4e45b76c09
2 changed files with 5 additions and 5 deletions

View file

@ -414,7 +414,7 @@ _bus_handler (GstBus * bus, GstMessage * message,
GError *err = NULL; GError *err = NULL;
gchar *debug = NULL; gchar *debug = NULL;
const GstStructure *details = NULL; const GstStructure *details = NULL;
GstFlowReturn error_flow = GST_FLOW_OK; gint error_flow = GST_FLOW_OK;
switch (GST_MESSAGE_TYPE (message)) { switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ERROR: case GST_MESSAGE_ERROR:

View file

@ -598,11 +598,11 @@ _execute_seek (GstValidateScenario * scenario, GstValidateAction * action)
const char *str_format, *str_flags, *str_start_type, *str_stop_type; const char *str_format, *str_flags, *str_start_type, *str_stop_type;
gdouble rate = 1.0; gdouble rate = 1.0;
GstFormat format = GST_FORMAT_TIME; guint format = GST_FORMAT_TIME;
GstSeekFlags flags = 0; GstSeekFlags flags = 0;
GstSeekType start_type = GST_SEEK_TYPE_SET; guint start_type = GST_SEEK_TYPE_SET;
GstClockTime start; GstClockTime start;
GstSeekType stop_type = GST_SEEK_TYPE_SET; guint stop_type = GST_SEEK_TYPE_SET;
GstClockTime stop = GST_CLOCK_TIME_NONE; GstClockTime stop = GST_CLOCK_TIME_NONE;
if (!gst_validate_action_get_clocktime (scenario, action, "start", &start)) if (!gst_validate_action_get_clocktime (scenario, action, "start", &start))
@ -651,7 +651,7 @@ _pause_action_restore_playing (GstValidateScenario * scenario)
static GstValidateExecuteActionReturn static GstValidateExecuteActionReturn
_execute_set_state (GstValidateScenario * scenario, GstValidateAction * action) _execute_set_state (GstValidateScenario * scenario, GstValidateAction * action)
{ {
GstState state; guint state;
const gchar *str_state; const gchar *str_state;
GstStateChangeReturn ret; GstStateChangeReturn ret;