chiark / gitweb /
Build fixes for GCC 4.1
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 15 Jun 2008 14:39:54 +0000 (15:39 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 15 Jun 2008 14:39:54 +0000 (15:39 +0100)
13 files changed:
disobedience/added.c
disobedience/choose-search.c
disobedience/choose.c
disobedience/control.c
disobedience/disobedience.c
disobedience/lookup.c
disobedience/menu.c
disobedience/properties.c
disobedience/queue-generic.c
disobedience/queue-menu.c
disobedience/queue.c
disobedience/recent.c
disobedience/users.c

index 146872f59936a7193cd1fcd0e4b4835ad86e1b3d..ce747c49a9a016a2426fb95dd0862a6d24f6be90 100644 (file)
  * with a valid and unique @c id field.  This function fakes it.
  */
 static void added_completed(void attribute((unused)) *v,
-                            const char *error,
+                            const char *err,
                             int nvec, char **vec) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   /* Convert the vector result to a queue linked list */
index 77ad813a8b93afa73c8e19e64a66296b3d9759ae..6d78f6bb98da52f46786a713068703d77383a08e 100644 (file)
@@ -264,11 +264,11 @@ static void choose_make_visible(const char attribute((unused)) *event,
 
 /** @brief Called with search results */
 static void choose_search_completed(void attribute((unused)) *v,
-                                    const char *error,
+                                    const char *err,
                                     int nvec, char **vec) {
   //fprintf(stderr, "choose_search_completed\n");
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   choose_searching = 0;
index c0541624edb840e4e10115c125db6dfe9d815474..84332885e96290cd2a7d97373570092a53b6ed55 100644 (file)
@@ -337,29 +337,29 @@ skip:
 }
 
 static void choose_dirs_completed(void *v,
-                                  const char *error,
+                                  const char *err,
                                   int nvec, char **vec) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   choose_populate(v, nvec, vec, 0/*!isfile*/);
 }
 
 static void choose_files_completed(void *v,
-                                   const char *error,
+                                   const char *err,
                                    int nvec, char **vec) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   choose_populate(v, nvec, vec, 1/*isfile*/);
 }
 
 void choose_play_completed(void attribute((unused)) *v,
-                           const char *error) {
-  if(error)
-    popup_protocol_error(0, error);
+                           const char *err) {
+  if(err)
+    popup_protocol_error(0, err);
 }
 
 static void choose_state_toggled
index 3ccd7c22c104b2a7d435de19e34ecf0886807948..50aaebe421f5e8ac8882bf1c08d0683e0956f315 100644 (file)
@@ -391,9 +391,9 @@ static void icon_changed(const char attribute((unused)) *event,
 }
 
 static void icon_action_completed(void attribute((unused)) *v,
-                                  const char *error) {
-  if(error)
-    popup_protocol_error(0, error);
+                                  const char *err) {
+  if(err)
+    popup_protocol_error(0, err);
 }
 
 static void clicked_icon(GtkButton attribute((unused)) *button,
@@ -420,11 +420,11 @@ static void toggled_menu(GtkCheckMenuItem attribute((unused)) *menuitem,
 
 /** @brief Called when a volume command completes */
 static void volume_completed(void attribute((unused)) *v,
-                             const char *error,
+                             const char *err,
                              int attribute((unused)) l,
                              int attribute((unused)) r) {
-  if(error)
-    popup_protocol_error(0, error);
+  if(err)
+    popup_protocol_error(0, err);
   /* We don't set the UI's notion of the volume here, it is set from the log
    * regardless of the reason it changed */
 }
index 7225bc8e380904fcab791f23badd1df8e614e987..afcd921d83bf68c8d339860bd4abd131ca18a74f 100644 (file)
@@ -197,12 +197,12 @@ static void make_toplevel_window(void) {
 }
 
 static void userinfo_rights_completed(void attribute((unused)) *v,
-                                      const char *error,
+                                      const char *err,
                                       const char *value) {
   rights_type r;
 
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     r = 0;
   } else {
     if(parse_rights(value, &r, 0))
@@ -271,7 +271,7 @@ static gboolean periodic_fast(gpointer attribute((unused)) data) {
 
 /** @brief Called when a NOP completes */
 static void nop_completed(void attribute((unused)) *v,
-                          const char attribute((unused)) *error) {
+                          const char attribute((unused)) *err) {
   /* TODO report the error somewhere */
   nop_in_flight = 0;
 }
@@ -297,7 +297,7 @@ static gboolean maybe_send_nop(gpointer attribute((unused)) data) {
 
 /** @brief Called when a rtp-address command succeeds */
 static void got_rtp_address(void attribute((unused)) *v,
-                            const char *error,
+                            const char *err,
                             int attribute((unused)) nvec,
                             char attribute((unused)) **vec) {
   const int rtp_was_supported = rtp_supported;
@@ -305,7 +305,7 @@ static void got_rtp_address(void attribute((unused)) *v,
 
   ++suppress_actions;
   rtp_address_in_flight = 0;
-  if(error) {
+  if(err) {
     /* An error just means that we're not using network play */
     rtp_supported = 0;
     rtp_is_running = 0;
index 51c06bfbe1ee899761dea928ac1f20d43ad7a494..9b6a5b55fcad5c5c58738d48b83d2b63af853c84 100644 (file)
@@ -36,10 +36,10 @@ static void namepart_completed_or_failed(void) {
 }
 
 /** @brief Called when a namepart lookup has completed */
-static void namepart_completed(void *v, const char *error, const char *value) {
+static void namepart_completed(void *v, const char *err, const char *value) {
   D(("namepart_completed"));
-  if(error) {
-    gtk_label_set_text(GTK_LABEL(report_label), error);
+  if(err) {
+    gtk_label_set_text(GTK_LABEL(report_label), err);
     value = "?";
   }
   const char *key = v;
@@ -49,10 +49,10 @@ static void namepart_completed(void *v, const char *error, const char *value) {
 }
 
 /** @brief Called when a length lookup has completed */
-static void length_completed(void *v, const char *error, long l) {
+static void length_completed(void *v, const char *err, long l) {
   D(("length_completed"));
-  if(error) {
-    gtk_label_set_text(GTK_LABEL(report_label), error);
+  if(err) {
+    gtk_label_set_text(GTK_LABEL(report_label), err);
     l = -1;
   }
   const char *key = v;
index 23bc688b671a76b577733ed3cc3d018ee896ed7e..73773ddf61f9f8256bbc656b3aec5b4bd50d6f5c 100644 (file)
@@ -165,7 +165,7 @@ static void manual_popup(gpointer attribute((unused)) callback_data,
 
 /** @brief Called when version arrives, displays about... popup */
 static void about_popup_got_version(void attribute((unused)) *v,
-                                    const char attribute((unused)) *error,
+                                    const char attribute((unused)) *err,
                                     const char *value) {
   GtkWidget *w;
   char *server_version_string;
index ade23fbfbfc0781e38befbb112e43973dc8e87ba..8b461090999fd26934bd456917f33933a269593f 100644 (file)
@@ -344,9 +344,9 @@ static void set_namepart(struct prefdata *f, const char *value) {
 }
 
 /* Called when we've set a namepart */
-static void set_namepart_completed(void *v, const char *error) {
-  if(error)
-    popup_protocol_error(0, error);
+static void set_namepart_completed(void *v, const char *err) {
+  if(err)
+    popup_protocol_error(0, err);
   else {
     struct prefdata *f = v;
     
@@ -377,9 +377,9 @@ static void set_edited_string(struct prefdata *f, const char *value) {
 }
 
 static void set_string_completed(void attribute((unused)) *v,
-                                 const char *error) {
-  if(error)
-    popup_protocol_error(0, error);
+                                 const char *err) {
+  if(err)
+    popup_protocol_error(0, err);
 }
 
 static void set_string(struct prefdata *f, const char *value) {
@@ -441,8 +441,8 @@ static void prefdata_onerror(struct callbackdata *cbd,
 }
 
 /* Got the value of a pref */
-static void prefdata_completed(void *v, const char *error, const char *value) {
-  if(error) {
+static void prefdata_completed(void *v, const char *err, const char *value) {
+  if(err) {
   } else {
     struct callbackdata *cbd = v;
     
index e32cf85c3ecb6a2b39e163f29221c9b6af4c41ea..8c7458a7c6eaf6a1fe48a56f6b133d309bd52bd8 100644 (file)
@@ -321,7 +321,6 @@ void ql_new_queue(struct queuelike *ql,
   for(struct queue_entry *q = newq; q; q = q->next) {
     const struct newqueue_data *nqd = hash_find(h, q->id);
     if(!nqd->old) {
-      GtkTreeIter iter[1];
       if(after) {
         /* Try to insert at the right sort of place */
         GtkTreeIter where[1];
index fcc34bf43c239e9fee1a88d53039686a568403b6..75ddeb6c2b664bfc795da7d101d62b9525724ba2 100644 (file)
@@ -81,9 +81,9 @@ int ql_scratch_sensitive(void attribute((unused)) *extra) {
 }
 
 static void ql_scratch_completed(void attribute((unused)) *v,
-                                 const char *error) {
-  if(error)
-    popup_protocol_error(0, error);
+                                 const char *err) {
+  if(err)
+    popup_protocol_error(0, err);
 }
 
 void ql_scratch_activate(GtkMenuItem attribute((unused)) *menuitem,
@@ -116,9 +116,9 @@ int ql_remove_sensitive(void *extra) {
 }
 
 static void ql_remove_completed(void attribute((unused)) *v,
-                                const char *error) {
-  if(error)
-    popup_protocol_error(0, error);
+                                const char *err) {
+  if(err)
+    popup_protocol_error(0, err);
 }
 
 static void ql_remove_activate_callback(GtkTreeModel *model,
@@ -146,9 +146,9 @@ int ql_play_sensitive(void *extra) {
     && gtk_tree_selection_count_selected_rows(ql->selection) > 0;
 }
 
-static void ql_play_completed(void attribute((unused)) *v, const char *error) {
-  if(error)
-    popup_protocol_error(0, error);
+static void ql_play_completed(void attribute((unused)) *v, const char *err) {
+  if(err)
+    popup_protocol_error(0, err);
 }
 
 static void ql_play_activate_callback(GtkTreeModel *model,
@@ -186,7 +186,7 @@ gboolean ql_button_release(GtkWidget *widget,
 }
 
 struct tabtype *ql_tabtype(struct queuelike *ql) {
-  static const struct tabtype ql_tabtype = {
+  static const struct tabtype queuelike_tabtype = {
     ql_properties_sensitive,
     ql_selectall_sensitive,
     ql_selectnone_sensitive,
@@ -197,7 +197,7 @@ struct tabtype *ql_tabtype(struct queuelike *ql) {
     0
   };
 
-  ql->tabtype = ql_tabtype;
+  ql->tabtype = queuelike_tabtype;
   ql->tabtype.extra = ql;
   return &ql->tabtype;
 }
index f298b1f71b0b9f0a816e17c87f6955125788dbf8..7dbe563cb4cb35153e0fc25aea5e7173f8dcce0f 100644 (file)
@@ -75,10 +75,10 @@ static void queue_playing_changed(void) {
 
 /** @brief Update the queue itself */
 static void queue_completed(void attribute((unused)) *v,
-                            const char *error,
+                            const char *err,
                             struct queue_entry *q) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   actual_queue = q;
@@ -87,10 +87,10 @@ static void queue_completed(void attribute((unused)) *v,
 
 /** @brief Update the playing track */
 static void playing_completed(void attribute((unused)) *v,
-                              const char *error,
+                              const char *err,
                               struct queue_entry *q) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   actual_playing_track = q;
@@ -198,9 +198,9 @@ struct queuelike ql_queue = {
 static int queue_drag_target = -1;
 
 static void queue_move_completed(void attribute((unused)) *v,
-                                 const char *error) {
-  if(error) {
-    popup_protocol_error(0, error);
+                                 const char *err) {
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   /* The log should tell us the queue changed so we do no more here */
index 49333e7109b59af59d0db5de88638f7345ec8071..109ee5ab3579daf95e5e0fda498e13aa959d849a 100644 (file)
 
 /** @brief Update the recently played list */
 static void recent_completed(void attribute((unused)) *v,
-                             const char *error,
+                             const char *err,
                              struct queue_entry *q) {
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   /* The recent list is backwards compared to what we wanted */
index bb099f2d7ac27ab39ea7e57f2941a282809f5bc4..60bdef64ba719d6287043901b8c4fe52716c4063 100644 (file)
@@ -116,13 +116,13 @@ static int users_find_user(const char *user,
  * If users_deferred_select is set then that user is selected.
  */
 static void users_got_list(void attribute((unused)) *v,
-                           const char *error,
+                           const char *err,
                            int nvec, char **vec) {
   int n;
   GtkTreeIter iter;
 
-  if(error) {
-    popup_protocol_error(0, error);
+  if(err) {
+    popup_protocol_error(0, err);
     return;
   }
   /* Present users in alphabetical order */
@@ -436,16 +436,16 @@ static rights_type users_get_rights(void) {
 
 /** @brief Called when a user setting has been edited */
 static void users_edituser_completed(void attribute((unused)) *v,
-                                     const char *error) {
-  if(error)
-    popup_submsg(users_window, GTK_MESSAGE_ERROR, error);
+                                     const char *err) {
+  if(err)
+    popup_submsg(users_window, GTK_MESSAGE_ERROR, err);
 }
 
 /** @brief Called when a new user has been created */
 static void users_adduser_completed(void *v,
-                                    const char *error) {
-  if(error) {
-    popup_submsg(users_window, GTK_MESSAGE_ERROR, error);
+                                    const char *err) {
+  if(err) {
+    popup_submsg(users_window, GTK_MESSAGE_ERROR, err);
     mode(ADD);                          /* Let the user try again */
   } else {
     const struct kvp *const kvp = v;
@@ -534,9 +534,9 @@ static void users_apply(GtkButton attribute((unused)) *button,
 
 /** @brief Called when a user has been deleted */
 static void users_delete_completed(void *v,
-                                   const char *error) {
-  if(error)
-    popup_submsg(users_window, GTK_MESSAGE_ERROR, error);
+                                   const char *err) {
+  if(err)
+    popup_submsg(users_window, GTK_MESSAGE_ERROR, err);
   else {
     const struct kvp *const kvp = v;
     const char *const user = kvp_get(kvp, "user");
@@ -572,26 +572,26 @@ static void users_delete(GtkButton attribute((unused)) *button,
 }
 
 static void users_got_email(void attribute((unused)) *v,
-                            const char *error,
+                            const char *err,
                             const char *value) {
-  if(error)
-    popup_protocol_error(0, error);
+  if(err)
+    popup_protocol_error(0, err);
   users_email = value;
 }
 
 static void users_got_rights(void attribute((unused)) *v,
-                             const char *error,
+                             const char *err,
                              const char *value) {
-  if(error)
-    popup_protocol_error(0, error);
+  if(err)
+    popup_protocol_error(0, err);
   users_rights = value;
 }
 
 static void users_got_password(void attribute((unused)) *v,
-                               const char *error,
+                               const char *err,
                                const char *value) {
-  if(error)
-    popup_protocol_error(0, error);
+  if(err)
+    popup_protocol_error(0, err);
   /* TODO if an error occurred gathering user info, we should react in some
    * different way */
   users_password = value;