From f203c01af2f441ebbbb91b4d8797e39dda42c371 Mon Sep 17 00:00:00 2001 From: Scott D Phillips Date: Thu, 17 Nov 2016 10:39:01 -0800 Subject: [PATCH] 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=774641 --- ges/ges-formatter.c | 2 +- ges/ges-validate.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ges/ges-formatter.c b/ges/ges-formatter.c index 07fa4eb53e..b0e8837332 100644 --- a/ges/ges-formatter.c +++ b/ges/ges-formatter.c @@ -417,7 +417,7 @@ ges_formatter_get_default (void) { GList *assets, *tmp; GESAsset *ret = NULL; - GstRank tmprank, rank = GST_RANK_NONE; + guint tmprank, rank = GST_RANK_NONE; assets = ges_list_assets (GES_TYPE_FORMATTER); for (tmp = assets; tmp; tmp = tmp->next) { diff --git a/ges/ges-validate.c b/ges/ges-validate.c index d31980aab6..86e5a946e8 100644 --- a/ges/ges-validate.c +++ b/ges/ges-validate.c @@ -234,8 +234,8 @@ _edit_container (GstValidateScenario * scenario, GstValidateAction * action) gboolean res = FALSE; gint new_layer_priority = -1; - GESEdge edge = GES_EDGE_NONE; - GESEditMode mode = GES_EDIT_MODE_NORMAL; + guint edge = GES_EDGE_NONE; + guint mode = GES_EDIT_MODE_NORMAL; const gchar *edit_mode_str = NULL, *edge_str = NULL; const gchar *clip_name; @@ -487,7 +487,7 @@ _set_control_source (GstValidateScenario * scenario, GstValidateAction * action) binding_type = g_strdup ("direct"); if (source_type == NULL || !g_strcmp0 (source_type, "interpolation")) { - GstInterpolationMode mode; + guint mode; source = gst_interpolation_control_source_new ();