mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
Use G_VALUE_INIT instead of { 0, }
The macro avoids warnings from anal-retentive compilers.
This commit is contained in:
parent
be5921e6fb
commit
b3b1994c13
@ -12280,7 +12280,7 @@ parse_units (ClutterActor *self,
|
||||
ParseDimension dimension,
|
||||
JsonNode *node)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gfloat retval = 0;
|
||||
|
||||
if (JSON_NODE_TYPE (node) != JSON_NODE_VALUE)
|
||||
|
@ -434,8 +434,8 @@ clutter_alpha_get_alpha (ClutterAlpha *alpha)
|
||||
}
|
||||
else if (priv->closure)
|
||||
{
|
||||
GValue params = { 0, };
|
||||
GValue result_value = { 0, };
|
||||
GValue params = G_VALUE_INIT;
|
||||
GValue result_value = G_VALUE_INIT;
|
||||
|
||||
g_object_ref (alpha);
|
||||
|
||||
|
@ -822,8 +822,8 @@ clutter_animation_bind (ClutterAnimation *animation,
|
||||
GParamSpec *pspec;
|
||||
ClutterInterval *interval;
|
||||
GType type;
|
||||
GValue initial = { 0, };
|
||||
GValue real_final = { 0, };
|
||||
GValue initial = G_VALUE_INIT;
|
||||
GValue real_final = G_VALUE_INIT;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_ANIMATION (animation), NULL);
|
||||
g_return_val_if_fail (property_name != NULL, NULL);
|
||||
@ -1138,7 +1138,7 @@ on_timeline_frame (ClutterTimeline *timeline,
|
||||
{
|
||||
const gchar *p_name = p->data;
|
||||
ClutterInterval *interval;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gboolean apply;
|
||||
|
||||
interval = g_hash_table_lookup (priv->properties, p_name);
|
||||
@ -1765,7 +1765,7 @@ clutter_animation_setup_property (ClutterAnimation *animation,
|
||||
gboolean is_fixed)
|
||||
{
|
||||
ClutterAnimationPrivate *priv = animation->priv;
|
||||
GValue real_value = { 0, };
|
||||
GValue real_value = G_VALUE_INIT;
|
||||
|
||||
if (pspec->flags & G_PARAM_CONSTRUCT_ONLY)
|
||||
{
|
||||
@ -1831,7 +1831,7 @@ done:
|
||||
if (G_LIKELY (!is_fixed))
|
||||
{
|
||||
ClutterInterval *interval;
|
||||
GValue cur_value = { 0, };
|
||||
GValue cur_value = G_VALUE_INIT;
|
||||
|
||||
g_value_init (&cur_value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
|
||||
@ -1972,7 +1972,7 @@ clutter_animation_setup_valist (ClutterAnimation *animation,
|
||||
while (property_name != NULL)
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
GValue final = { 0, };
|
||||
GValue final = G_VALUE_INIT;
|
||||
gchar *error = NULL;
|
||||
gboolean is_fixed = FALSE;
|
||||
GConnectFlags flags;
|
||||
|
@ -683,7 +683,7 @@ animation_animator_new_frame (ClutterTimeline *timeline,
|
||||
/* only change values if we active (delayed start) */
|
||||
if (sub_progress >= 0.0 && sub_progress <= 1.0)
|
||||
{
|
||||
GValue tmp_value = { 0, };
|
||||
GValue tmp_value = G_VALUE_INIT;
|
||||
GType int_type;
|
||||
|
||||
g_value_init (&tmp_value, G_VALUE_TYPE (&start_key->value));
|
||||
@ -801,7 +801,7 @@ animation_animator_started (ClutterTimeline *timeline,
|
||||
|
||||
if (property_iter->ease_in)
|
||||
{
|
||||
GValue tmp_value = { 0, };
|
||||
GValue tmp_value = G_VALUE_INIT;
|
||||
GType int_type;
|
||||
|
||||
int_type = clutter_interval_get_value_type (property_iter->interval);
|
||||
@ -1202,7 +1202,7 @@ clutter_animator_set (ClutterAnimator *animator,
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
GObjectClass *klass;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error = NULL;
|
||||
|
||||
g_return_if_fail (object);
|
||||
|
@ -786,8 +786,13 @@ static gboolean
|
||||
clutter_binding_entry_invoke (ClutterBindingEntry *entry,
|
||||
GObject *gobject)
|
||||
{
|
||||
GValue params[4] = { { 0, }, { 0, }, { 0, }, { 0, } };
|
||||
GValue result = { 0, };
|
||||
GValue params[4] = {
|
||||
G_VALUE_INIT,
|
||||
G_VALUE_INIT,
|
||||
G_VALUE_INIT,
|
||||
G_VALUE_INIT
|
||||
};
|
||||
GValue result = G_VALUE_INIT;
|
||||
gboolean retval = TRUE;
|
||||
|
||||
g_value_init (¶ms[0], G_TYPE_OBJECT);
|
||||
|
@ -1241,7 +1241,7 @@ clutter_container_child_set (ClutterContainer *container,
|
||||
name = first_prop;
|
||||
while (name)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error = NULL;
|
||||
GParamSpec *pspec;
|
||||
|
||||
@ -1389,7 +1389,7 @@ clutter_container_child_get (ClutterContainer *container,
|
||||
name = first_prop;
|
||||
while (name)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error = NULL;
|
||||
GParamSpec *pspec;
|
||||
|
||||
|
@ -430,7 +430,7 @@ clutter_interval_set_initial_internal (ClutterInterval *interval,
|
||||
va_list *args)
|
||||
{
|
||||
GType gtype = interval->priv->value_type;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error;
|
||||
|
||||
/* initial value */
|
||||
@ -459,7 +459,7 @@ clutter_interval_set_final_internal (ClutterInterval *interval,
|
||||
va_list *args)
|
||||
{
|
||||
GType gtype = interval->priv->value_type;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error;
|
||||
|
||||
/* initial value */
|
||||
@ -488,7 +488,7 @@ clutter_interval_get_interval_valist (ClutterInterval *interval,
|
||||
va_list var_args)
|
||||
{
|
||||
GType gtype = interval->priv->value_type;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error;
|
||||
|
||||
/* initial value */
|
||||
|
@ -980,7 +980,7 @@ clutter_layout_manager_child_set (ClutterLayoutManager *manager,
|
||||
pname = first_property;
|
||||
while (pname)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
GParamSpec *pspec;
|
||||
gchar *error;
|
||||
gboolean res;
|
||||
@ -1120,7 +1120,7 @@ clutter_layout_manager_child_get (ClutterLayoutManager *manager,
|
||||
pname = first_property;
|
||||
while (pname)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
GParamSpec *pspec;
|
||||
gchar *error;
|
||||
gboolean res;
|
||||
|
@ -112,7 +112,7 @@ clutter_list_model_iter_get_value (ClutterModelIter *iter,
|
||||
ClutterListModelIter *iter_default;
|
||||
GValue *values;
|
||||
GValue *iter_value;
|
||||
GValue real_value = { 0, };
|
||||
GValue real_value = G_VALUE_INIT;
|
||||
gboolean converted = FALSE;
|
||||
|
||||
iter_default = CLUTTER_LIST_MODEL_ITER (iter);
|
||||
@ -165,7 +165,7 @@ clutter_list_model_iter_set_value (ClutterModelIter *iter,
|
||||
ClutterListModelIter *iter_default;
|
||||
GValue *values;
|
||||
GValue *iter_value;
|
||||
GValue real_value = { 0, };
|
||||
GValue real_value = G_VALUE_INIT;
|
||||
gboolean converted = FALSE;
|
||||
|
||||
iter_default = CLUTTER_LIST_MODEL_ITER (iter);
|
||||
|
@ -2006,7 +2006,7 @@ clutter_model_iter_set_internal_valist (ClutterModelIter *iter,
|
||||
|
||||
while (column != -1)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error = NULL;
|
||||
GType col_type;
|
||||
|
||||
@ -2172,7 +2172,7 @@ clutter_model_iter_get_valist (ClutterModelIter *iter,
|
||||
|
||||
while (column != -1)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error = NULL;
|
||||
GType col_type;
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ _clutter_script_parse_node (ClutterScript *script,
|
||||
JsonNode *node,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GValue node_value = { 0, };
|
||||
GValue node_value = G_VALUE_INIT;
|
||||
gboolean retval = FALSE;
|
||||
|
||||
g_return_val_if_fail (CLUTTER_IS_SCRIPT (script), FALSE);
|
||||
@ -1662,7 +1662,7 @@ apply_layout_properties (ClutterScript *script,
|
||||
for (l = properties; l != NULL; l = l->next)
|
||||
{
|
||||
PropertyInfo *pinfo = l->data;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gboolean res = FALSE;
|
||||
const gchar *name;
|
||||
|
||||
@ -1762,7 +1762,7 @@ apply_child_properties (ClutterScript *script,
|
||||
for (l = properties; l != NULL; l = l->next)
|
||||
{
|
||||
PropertyInfo *pinfo = l->data;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gboolean res = FALSE;
|
||||
const gchar *name;
|
||||
|
||||
|
@ -679,7 +679,7 @@ clutter_shader_effect_set_uniform_valist (ClutterShaderEffect *effect,
|
||||
gsize n_values,
|
||||
va_list *args)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
if (value_type == CLUTTER_TYPE_SHADER_INT)
|
||||
{
|
||||
|
@ -339,7 +339,7 @@ clutter_state_key_new (State *state,
|
||||
{
|
||||
ClutterStatePrivate *priv = state->clutter_state->priv;
|
||||
ClutterStateKey *state_key;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
state_key = g_slice_new0 (ClutterStateKey);
|
||||
|
||||
@ -600,7 +600,7 @@ clutter_state_new_frame (ClutterTimeline *timeline,
|
||||
if (key->is_animatable)
|
||||
{
|
||||
ClutterAnimatable *animatable;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gboolean res;
|
||||
|
||||
animatable = CLUTTER_ANIMATABLE (key->object);
|
||||
@ -735,7 +735,7 @@ clutter_state_change (ClutterState *state,
|
||||
for (k = new_state->keys; k != NULL; k = k->next)
|
||||
{
|
||||
ClutterStateKey *key = k->data;
|
||||
GValue initial = { 0, };
|
||||
GValue initial = G_VALUE_INIT;
|
||||
|
||||
/* Reset the pre-pre-delay - this is only used for setting keys
|
||||
* during transitions.
|
||||
@ -985,7 +985,7 @@ clutter_state_set (ClutterState *state,
|
||||
while (object != NULL)
|
||||
{
|
||||
GParamSpec *pspec;
|
||||
GValue value = { 0, };
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *error = NULL;
|
||||
gboolean is_delayed = FALSE;
|
||||
|
||||
@ -1095,7 +1095,7 @@ clutter_state_set_key_internal (ClutterState *state,
|
||||
else
|
||||
{
|
||||
/* Set the ClutterInterval associated with the state */
|
||||
GValue initial = { 0, };
|
||||
GValue initial = G_VALUE_INIT;
|
||||
gdouble progress = clutter_timeline_get_progress (priv->timeline);
|
||||
|
||||
g_value_init (&initial,
|
||||
|
Loading…
Reference in New Issue
Block a user