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
This commit is contained in:
Scott D Phillips 2016-11-17 10:39:01 -08:00 committed by Thibault Saunier
parent f1dd6f4226
commit f203c01af2
2 changed files with 4 additions and 4 deletions

View file

@ -417,7 +417,7 @@ ges_formatter_get_default (void)
{ {
GList *assets, *tmp; GList *assets, *tmp;
GESAsset *ret = NULL; GESAsset *ret = NULL;
GstRank tmprank, rank = GST_RANK_NONE; guint tmprank, rank = GST_RANK_NONE;
assets = ges_list_assets (GES_TYPE_FORMATTER); assets = ges_list_assets (GES_TYPE_FORMATTER);
for (tmp = assets; tmp; tmp = tmp->next) { for (tmp = assets; tmp; tmp = tmp->next) {

View file

@ -234,8 +234,8 @@ _edit_container (GstValidateScenario * scenario, GstValidateAction * action)
gboolean res = FALSE; gboolean res = FALSE;
gint new_layer_priority = -1; gint new_layer_priority = -1;
GESEdge edge = GES_EDGE_NONE; guint edge = GES_EDGE_NONE;
GESEditMode mode = GES_EDIT_MODE_NORMAL; guint mode = GES_EDIT_MODE_NORMAL;
const gchar *edit_mode_str = NULL, *edge_str = NULL; const gchar *edit_mode_str = NULL, *edge_str = NULL;
const gchar *clip_name; const gchar *clip_name;
@ -487,7 +487,7 @@ _set_control_source (GstValidateScenario * scenario, GstValidateAction * action)
binding_type = g_strdup ("direct"); binding_type = g_strdup ("direct");
if (source_type == NULL || !g_strcmp0 (source_type, "interpolation")) { if (source_type == NULL || !g_strcmp0 (source_type, "interpolation")) {
GstInterpolationMode mode; guint mode;
source = gst_interpolation_control_source_new (); source = gst_interpolation_control_source_new ();