summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-08-12 12:20:07 -0400
committerColin Walters <walters@verbum.org>2012-08-12 12:20:07 -0400
commit5dd7442bd5b544a99553b6e595419ed999ae6eab (patch)
tree533680dd21b409452ec9dc99b6478054617effb0 /src
parentUpdated Traditional Chinese translation(Hong Kong and Taiwan) (diff)
downloadzenity-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')
-rw-r--r--src/color.c4
-rw-r--r--src/forms.c5
-rw-r--r--src/progress.c2
3 files changed, 5 insertions, 6 deletions
diff --git a/src/color.c b/src/color.c
index 5e24e3dc..4c9c1517 100644
--- a/src/color.c
+++ b/src/color.c
@@ -58,7 +58,7 @@ void zenity_colorselection (ZenityData *data, ZenityColorData *color_data)
}
if (data->ok_label) {
- g_object_get (G_OBJECT (dialog), "ok-button", &button);
+ g_object_get (G_OBJECT (dialog), "ok-button", &button, NULL);
gtk_button_set_label (GTK_BUTTON (button), data->ok_label);
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (GTK_STOCK_OK, GTK_ICON_SIZE_BUTTON));
@@ -66,7 +66,7 @@ void zenity_colorselection (ZenityData *data, ZenityColorData *color_data)
}
if (data->cancel_label) {
- g_object_get (G_OBJECT (dialog), "cancel-button", &button);
+ g_object_get (G_OBJECT (dialog), "cancel-button", &button, NULL);
gtk_button_set_label (GTK_BUTTON (button), data->cancel_label);
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON));
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;
diff --git a/src/progress.c b/src/progress.c
index 6763376d..3e6f5a2c 100644
--- a/src/progress.c
+++ b/src/progress.c
@@ -54,7 +54,7 @@ zenity_progress_pulsate_progress_bar (gpointer user_data)
}
static void
-zenity_progress_pulsate_stop ()
+zenity_progress_pulsate_stop (void)
{
if (pulsate_timeout > 0) {
g_source_remove (pulsate_timeout);
bgstack15