--- a/src/ui.c
+++ b/src/ui.c
@@ -146,7 +146,7 @@
 
 void ui_register_control_button (control_button_t item, GtkWidget *widget)
 {
-  g_return_if_fail (item >= 0 && item < Control_Buttons);
+  g_return_if_fail (item < Control_Buttons);
   c_buttons[item] = g_slist_append (c_buttons[item], widget);
 }
 
@@ -231,7 +231,7 @@
 
 GtkObject *ui_register_control_adjustment (control_adjustment_t item)
 {
-  g_return_val_if_fail (item >= 0 && item < Control_Adjustments, NULL);
+  g_return_val_if_fail (item < Control_Adjustments, NULL);
 
   if (!c_adjustments[item])
   {
@@ -284,7 +284,7 @@
 
 void ui_set_control_adjustment (control_adjustment_t item, gdouble value)
 {
-  g_return_if_fail (item >= 0 && item < Control_Adjustments);
+  g_return_if_fail (item < Control_Adjustments);
   no_recursion = TRUE;
   if ((GTK_ADJUSTMENT(c_adjustments[item]))->value != value)
     g_object_set (G_OBJECT(c_adjustments[item]), "value", value, NULL);
@@ -293,20 +293,20 @@
 
 void ui_reset_control_adjustment (control_adjustment_t item)
 {
-  g_return_if_fail (item >= 0 && item < Control_Adjustments);
+  g_return_if_fail (item < Control_Adjustments);
   g_object_set (G_OBJECT(c_adjustments[item]), "value",
 		ranges[item].start, NULL);
 }
 
 void ui_revert_control_adjustment (control_adjustment_t item)
 {
-  g_return_if_fail (item >= 0 && item < Control_Adjustments);
+  g_return_if_fail (item < Control_Adjustments);
   g_object_set (G_OBJECT(c_adjustments[item]), "value", starts[item], NULL);
 }
 
 void ui_clear_control_adjustment (control_adjustment_t item)
 {
-  g_return_if_fail (item >= 0 && item < Control_Adjustments);
+  g_return_if_fail (item < Control_Adjustments);
   if (check_remember_volume (&ranges[item]))
     xine_set_param (stream, ranges[item].param, inits[item]);
 }
@@ -315,7 +315,7 @@
 
 void ui_xine_set_param_from_adjustment (control_adjustment_t item)
 {
-  g_return_if_fail (item >= 0 && item < Control_Adjustments);
+  g_return_if_fail (item < Control_Adjustments);
   gtk_adjustment_value_changed (GTK_ADJUSTMENT(c_adjustments[item]));
 }
 
@@ -471,7 +471,7 @@
 static int ui_lookup_js_obj (const JSObject *obj)
 {
   int i;
-  for (i = 0; i < G_N_ELEMENTS (ranges); ++i)
+  for (i = 0; i < (int) G_N_ELEMENTS (ranges); ++i)
     if (jsobjs[i] && jsobjs[i]->obj == obj)
       return i;
   abort (); /* can't happen */
@@ -632,7 +632,7 @@
     NULL
   };
   const char **vis_labels, *const *vis_src;
-  int i;
+  unsigned int i;
 
   /* Register the experience level setting */
   xine_config_register_enum
@@ -744,11 +744,11 @@
   gtk_icon_source_set_filename (isrc, filename);
   free (filename);
   gtk_icon_source_set_direction_wildcarded (isrc, TRUE);
-  gtk_icon_source_set_size_wildcarded (isrc, size == -1);
-  if (size != -1)
+  gtk_icon_source_set_size_wildcarded (isrc, (int) size == -1);
+  if ((int) size != -1)
     gtk_icon_source_set_size (isrc, size);
-  gtk_icon_source_set_state_wildcarded (isrc, state == -1);
-  if (state != -1)
+  gtk_icon_source_set_state_wildcarded (isrc, (int) state == -1);
+  if ((int) state != -1)
     gtk_icon_source_set_state (isrc, state);
   return isrc;
 }
@@ -863,7 +863,7 @@
 void ui_init (void)
 {
   xine_cfg_entry_t entry;
-  int i;
+  unsigned int i;
   se_o_t *toolbars;
 
   static const ui_property_t tb_props[] = {
@@ -947,7 +947,7 @@
 
 gboolean ui_post_init (void)
 {
-  int i;
+  unsigned int i;
   gdk_threads_enter ();
   for (i = 0; i < G_N_ELEMENTS (ranges); ++i)
     if (ranges[i].param && i != Control_VOLUME)