diff options
author | Nick Schermer <nick@xfce.org> | 2009-07-10 16:56:33 +0000 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2009-07-10 16:56:33 +0000 |
commit | ce99ab4f0dbe661236c8a2fe3eca4620f41d8ac1 (patch) | |
tree | ebd0b0ecbb50c665d0b44358e99c660d28cec1cd /exo-helper | |
parent | 227832b4dd9238f30060233471f579c415a0d8b1 (diff) | |
download | exo-ce99ab4f0dbe661236c8a2fe3eca4620f41d8ac1.tar.gz |
Fix a bunch of compiler warnings.
(Old svn revision: 30250)
Diffstat (limited to 'exo-helper')
-rw-r--r-- | exo-helper/Makefile.am | 2 | ||||
-rw-r--r-- | exo-helper/exo-helper-chooser.c | 4 | ||||
-rw-r--r-- | exo-helper/exo-helper-launcher-dialog.c | 4 | ||||
-rw-r--r-- | exo-helper/exo-helper-utils.c | 1 | ||||
-rw-r--r-- | exo-helper/exo-helper.c | 10 |
5 files changed, 10 insertions, 11 deletions
diff --git a/exo-helper/Makefile.am b/exo-helper/Makefile.am index 50a47a2..ab8feaf 100644 --- a/exo-helper/Makefile.am +++ b/exo-helper/Makefile.am @@ -98,7 +98,7 @@ stamp-exo-helper-enum-types.h: $(exo_helper_headers) Makefile exo-helper-enum-types.c: $(exo_helper_headers) Makefile ( cd $(srcdir) && glib-mkenums \ - --fhead "#undef GTK_DISABLE_DEPRECATED\n#define GTK_ENABLE_BROKEN\n#include <exo-helper/exo-helper.h>\n" \ + --fhead "#undef GTK_DISABLE_DEPRECATED\n#define GTK_ENABLE_BROKEN\n#include <exo-helper/exo-helper.h>\n\n#include \"exo-helper-enum-types.h\"" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n\tstatic GType type = 0;\n\tif (type == 0) {\n\tstatic const G@Type@Value values[] = {"\ --vprod "\t{ @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ diff --git a/exo-helper/exo-helper-chooser.c b/exo-helper/exo-helper-chooser.c index 0c085db..f949a91 100644 --- a/exo-helper/exo-helper-chooser.c +++ b/exo-helper/exo-helper-chooser.c @@ -833,7 +833,7 @@ exo_helper_chooser_pressed (ExoHelperChooser *chooser, GtkWidget* exo_helper_chooser_new (ExoHelperCategory category) { - g_return_val_if_fail (category >= 0 && category < EXO_HELPER_N_CATEGORIES, NULL); + g_return_val_if_fail (category < EXO_HELPER_N_CATEGORIES, NULL); return g_object_new (EXO_TYPE_HELPER_CHOOSER, "category", category, NULL); } @@ -869,7 +869,7 @@ exo_helper_chooser_set_category (ExoHelperChooser *chooser, ExoHelperCategory category) { g_return_if_fail (EXO_IS_HELPER_CHOOSER (chooser)); - g_return_if_fail (category >= 0 && category < EXO_HELPER_N_CATEGORIES); + g_return_if_fail (category < EXO_HELPER_N_CATEGORIES); /* apply the new category */ chooser->category = category; diff --git a/exo-helper/exo-helper-launcher-dialog.c b/exo-helper/exo-helper-launcher-dialog.c index d466422..3014aeb 100644 --- a/exo-helper/exo-helper-launcher-dialog.c +++ b/exo-helper/exo-helper-launcher-dialog.c @@ -244,7 +244,7 @@ exo_helper_launcher_dialog_notify_is_valid (ExoHelperChooser *chooser, GtkWidget* exo_helper_launcher_dialog_new (ExoHelperCategory category) { - g_return_val_if_fail (category >= 0 && category < EXO_HELPER_N_CATEGORIES, NULL); + g_return_val_if_fail (category < EXO_HELPER_N_CATEGORIES, NULL); return g_object_new (EXO_TYPE_HELPER_LAUNCHER_DIALOG, "category", category, NULL); } @@ -293,7 +293,7 @@ exo_helper_launcher_dialog_set_category (ExoHelperLauncherDialog *launcher_dialo g_assert (EXO_HELPER_N_CATEGORIES == G_N_ELEMENTS (MESSAGES)); g_return_if_fail (EXO_IS_HELPER_LAUNCHER_DIALOG (launcher_dialog)); - g_return_if_fail (category >= 0 && category < EXO_HELPER_N_CATEGORIES); + g_return_if_fail (category < EXO_HELPER_N_CATEGORIES); /* setup the new label text */ gtk_label_set_text (GTK_LABEL (launcher_dialog->label), gettext (MESSAGES[category])); diff --git a/exo-helper/exo-helper-utils.c b/exo-helper/exo-helper-utils.c index c35e114..69b5b68 100644 --- a/exo-helper/exo-helper-utils.c +++ b/exo-helper/exo-helper-utils.c @@ -81,7 +81,6 @@ exo_helper_category_to_string (ExoHelperCategory category) gchar *string; g_return_val_if_fail (category < EXO_HELPER_N_CATEGORIES, NULL); - g_return_val_if_fail (category >= 0, NULL); klass = g_type_class_ref (EXO_TYPE_HELPER_CATEGORY); string = g_strdup (klass->values[category].value_nick); diff --git a/exo-helper/exo-helper.c b/exo-helper/exo-helper.c index dc8433b..6011968 100644 --- a/exo-helper/exo-helper.c +++ b/exo-helper/exo-helper.c @@ -873,7 +873,7 @@ exo_helper_database_set_custom (ExoHelperDatabase *database, XfceRc *rc; gchar **argv; gchar *category_string; - gchar *basename; + gchar *name; gchar *cmdline; gchar *file; gchar spec[256]; @@ -910,10 +910,10 @@ exo_helper_database_set_custom (ExoHelperDatabase *database, if (g_shell_parse_argv (cmdline, NULL, &argv, NULL)) { /* use the basename for Name and Icon */ - basename = g_path_get_basename (*argv); - xfce_rc_write_entry (rc, "Icon", basename); - xfce_rc_write_entry (rc, "Name", basename); - g_free (basename); + name = g_path_get_basename (*argv); + xfce_rc_write_entry (rc, "Icon", name); + xfce_rc_write_entry (rc, "Name", name); + g_free (name); /* use only the binary for the Commands */ xfce_rc_write_entry (rc, "X-XFCE-Commands", *argv); |