diff options
author | Colin Walters <walters@verbum.org> | 2012-08-12 12:20:07 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-08-12 12:20:07 -0400 |
commit | 5dd7442bd5b544a99553b6e595419ed999ae6eab (patch) | |
tree | 533680dd21b409452ec9dc99b6478054617effb0 /src/forms.c | |
parent | Updated Traditional Chinese translation(Hong Kong and Taiwan) (diff) | |
download | zenity-5dd7442bd5b544a99553b6e595419ed999ae6eab.tar.gz zenity-5dd7442bd5b544a99553b6e595419ed999ae6eab.tar.bz2 zenity-5dd7442bd5b544a99553b6e595419ed999ae6eab.zip |
Fix various compiler warnings (two serious)
Missing sentinels can cause crashes. The others are just style.
Diffstat (limited to 'src/forms.c')
-rw-r--r-- | src/forms.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/forms.c b/src/forms.c index f8f1db53..6a5b08f8 100644 --- a/src/forms.c +++ b/src/forms.c @@ -34,9 +34,9 @@ static void zenity_forms_dialog_get_selected (GtkTreeModel *model, GtkTreePath * { gint n_columns = 0; gint i = 0; + GValue value = {0, }; n_columns = gtk_tree_model_get_n_columns (model); - GValue value = {0, }; for (i = 0; i < n_columns; i++) { gtk_tree_model_get_value (model, iter, i, &value); selected = g_slist_append (selected, g_value_dup_string (&value)); @@ -157,6 +157,7 @@ void zenity_forms_dialog (ZenityData *data, ZenityFormsData *forms_data) gint number_of_widgets = g_slist_length (forms_data->list); int list_count = 0; + int i = 0; zen_data = data; @@ -203,8 +204,6 @@ void zenity_forms_dialog (ZenityData *data, ZenityFormsData *forms_data) gtk_table_resize (GTK_TABLE (table), number_of_widgets, 2); - int i = 0; - for (tmp = forms_data->list; tmp; tmp = tmp->next) { ZenityFormsValue *zenity_value = (ZenityFormsValue *) tmp->data; GtkWidget *label; |