chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ad492e0
)
Build fixes for GCC 4.1
author
Richard Kettlewell
<rjk@greenend.org.uk>
Sun, 15 Jun 2008 14:39:54 +0000
(15:39 +0100)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Sun, 15 Jun 2008 14:39:54 +0000
(15:39 +0100)
13 files changed:
disobedience/added.c
patch
|
blob
|
blame
|
history
disobedience/choose-search.c
patch
|
blob
|
blame
|
history
disobedience/choose.c
patch
|
blob
|
blame
|
history
disobedience/control.c
patch
|
blob
|
blame
|
history
disobedience/disobedience.c
patch
|
blob
|
blame
|
history
disobedience/lookup.c
patch
|
blob
|
blame
|
history
disobedience/menu.c
patch
|
blob
|
blame
|
history
disobedience/properties.c
patch
|
blob
|
blame
|
history
disobedience/queue-generic.c
patch
|
blob
|
blame
|
history
disobedience/queue-menu.c
patch
|
blob
|
blame
|
history
disobedience/queue.c
patch
|
blob
|
blame
|
history
disobedience/recent.c
patch
|
blob
|
blame
|
history
disobedience/users.c
patch
|
blob
|
blame
|
history
diff --git
a/disobedience/added.c
b/disobedience/added.c
index 146872f59936a7193cd1fcd0e4b4835ad86e1b3d..ce747c49a9a016a2426fb95dd0862a6d24f6be90 100644
(file)
--- a/
disobedience/added.c
+++ b/
disobedience/added.c
@@
-28,10
+28,10
@@
* with a valid and unique @c id field. This function fakes it.
*/
static void added_completed(void attribute((unused)) *v,
* with a valid and unique @c id field. This function fakes it.
*/
static void added_completed(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
int nvec, char **vec) {
int nvec, char **vec) {
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
/* Convert the vector result to a queue linked list */
return;
}
/* Convert the vector result to a queue linked list */
diff --git
a/disobedience/choose-search.c
b/disobedience/choose-search.c
index 77ad813a8b93afa73c8e19e64a66296b3d9759ae..6d78f6bb98da52f46786a713068703d77383a08e 100644
(file)
--- a/
disobedience/choose-search.c
+++ b/
disobedience/choose-search.c
@@
-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,
/** @brief Called with search results */
static void choose_search_completed(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
int nvec, char **vec) {
//fprintf(stderr, "choose_search_completed\n");
int nvec, char **vec) {
//fprintf(stderr, "choose_search_completed\n");
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
choose_searching = 0;
return;
}
choose_searching = 0;
diff --git
a/disobedience/choose.c
b/disobedience/choose.c
index c0541624edb840e4e10115c125db6dfe9d815474..84332885e96290cd2a7d97373570092a53b6ed55 100644
(file)
--- a/
disobedience/choose.c
+++ b/
disobedience/choose.c
@@
-337,29
+337,29
@@
skip:
}
static void choose_dirs_completed(void *v,
}
static void choose_dirs_completed(void *v,
- const char *err
or
,
+ const char *err,
int nvec, char **vec) {
int nvec, char **vec) {
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
choose_populate(v, nvec, vec, 0/*!isfile*/);
}
static void choose_files_completed(void *v,
return;
}
choose_populate(v, nvec, vec, 0/*!isfile*/);
}
static void choose_files_completed(void *v,
- const char *err
or
,
+ const char *err,
int nvec, char **vec) {
int nvec, char **vec) {
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
choose_populate(v, nvec, vec, 1/*isfile*/);
}
void choose_play_completed(void attribute((unused)) *v,
return;
}
choose_populate(v, nvec, vec, 1/*isfile*/);
}
void choose_play_completed(void attribute((unused)) *v,
- const char *err
or
) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ const char *err) {
+ if(err)
+ popup_protocol_error(0, err);
}
static void choose_state_toggled
}
static void choose_state_toggled
diff --git
a/disobedience/control.c
b/disobedience/control.c
index 3ccd7c22c104b2a7d435de19e34ecf0886807948..50aaebe421f5e8ac8882bf1c08d0683e0956f315 100644
(file)
--- a/
disobedience/control.c
+++ b/
disobedience/control.c
@@
-391,9
+391,9
@@
static void icon_changed(const char attribute((unused)) *event,
}
static void icon_action_completed(void attribute((unused)) *v,
}
static void icon_action_completed(void attribute((unused)) *v,
- const char *err
or
) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ const char *err) {
+ if(err)
+ popup_protocol_error(0, err);
}
static void clicked_icon(GtkButton attribute((unused)) *button,
}
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,
/** @brief Called when a volume command completes */
static void volume_completed(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
int attribute((unused)) l,
int attribute((unused)) r) {
int attribute((unused)) l,
int attribute((unused)) r) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ 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 */
}
/* We don't set the UI's notion of the volume here, it is set from the log
* regardless of the reason it changed */
}
diff --git
a/disobedience/disobedience.c
b/disobedience/disobedience.c
index 7225bc8e380904fcab791f23badd1df8e614e987..afcd921d83bf68c8d339860bd4abd131ca18a74f 100644
(file)
--- a/
disobedience/disobedience.c
+++ b/
disobedience/disobedience.c
@@
-197,12
+197,12
@@
static void make_toplevel_window(void) {
}
static void userinfo_rights_completed(void attribute((unused)) *v,
}
static void userinfo_rights_completed(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
const char *value) {
rights_type r;
const char *value) {
rights_type r;
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
r = 0;
} else {
if(parse_rights(value, &r, 0))
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,
/** @brief Called when a NOP completes */
static void nop_completed(void attribute((unused)) *v,
- const char attribute((unused)) *err
or
) {
+ const char attribute((unused)) *err) {
/* TODO report the error somewhere */
nop_in_flight = 0;
}
/* 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,
/** @brief Called when a rtp-address command succeeds */
static void got_rtp_address(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
int attribute((unused)) nvec,
char attribute((unused)) **vec) {
const int rtp_was_supported = rtp_supported;
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;
++suppress_actions;
rtp_address_in_flight = 0;
- if(err
or
) {
+ if(err) {
/* An error just means that we're not using network play */
rtp_supported = 0;
rtp_is_running = 0;
/* An error just means that we're not using network play */
rtp_supported = 0;
rtp_is_running = 0;
diff --git
a/disobedience/lookup.c
b/disobedience/lookup.c
index 51c06bfbe1ee899761dea928ac1f20d43ad7a494..9b6a5b55fcad5c5c58738d48b83d2b63af853c84 100644
(file)
--- a/
disobedience/lookup.c
+++ b/
disobedience/lookup.c
@@
-36,10
+36,10
@@
static void namepart_completed_or_failed(void) {
}
/** @brief Called when a namepart lookup has completed */
}
/** @brief Called when a namepart lookup has completed */
-static void namepart_completed(void *v, const char *err
or
, const char *value) {
+static void namepart_completed(void *v, const char *err, const char *value) {
D(("namepart_completed"));
D(("namepart_completed"));
- if(err
or
) {
- gtk_label_set_text(GTK_LABEL(report_label), err
or
);
+ if(err) {
+ gtk_label_set_text(GTK_LABEL(report_label), err);
value = "?";
}
const char *key = v;
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 */
}
/** @brief Called when a length lookup has completed */
-static void length_completed(void *v, const char *err
or
, long l) {
+static void length_completed(void *v, const char *err, long l) {
D(("length_completed"));
D(("length_completed"));
- if(err
or
) {
- gtk_label_set_text(GTK_LABEL(report_label), err
or
);
+ if(err) {
+ gtk_label_set_text(GTK_LABEL(report_label), err);
l = -1;
}
const char *key = v;
l = -1;
}
const char *key = v;
diff --git
a/disobedience/menu.c
b/disobedience/menu.c
index 23bc688b671a76b577733ed3cc3d018ee896ed7e..73773ddf61f9f8256bbc656b3aec5b4bd50d6f5c 100644
(file)
--- a/
disobedience/menu.c
+++ b/
disobedience/menu.c
@@
-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,
/** @brief Called when version arrives, displays about... popup */
static void about_popup_got_version(void attribute((unused)) *v,
- const char attribute((unused)) *err
or
,
+ const char attribute((unused)) *err,
const char *value) {
GtkWidget *w;
char *server_version_string;
const char *value) {
GtkWidget *w;
char *server_version_string;
diff --git
a/disobedience/properties.c
b/disobedience/properties.c
index ade23fbfbfc0781e38befbb112e43973dc8e87ba..8b461090999fd26934bd456917f33933a269593f 100644
(file)
--- a/
disobedience/properties.c
+++ b/
disobedience/properties.c
@@
-344,9
+344,9
@@
static void set_namepart(struct prefdata *f, const char *value) {
}
/* Called when we've set a namepart */
}
/* Called when we've set a namepart */
-static void set_namepart_completed(void *v, const char *err
or
) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+static void set_namepart_completed(void *v, const char *err) {
+ if(err)
+ popup_protocol_error(0, err);
else {
struct prefdata *f = v;
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,
}
static void set_string_completed(void attribute((unused)) *v,
- const char *err
or
) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ const char *err) {
+ if(err)
+ popup_protocol_error(0, err);
}
static void set_string(struct prefdata *f, const char *value) {
}
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 */
}
/* Got the value of a pref */
-static void prefdata_completed(void *v, const char *err
or
, const char *value) {
- if(err
or
) {
+static void prefdata_completed(void *v, const char *err, const char *value) {
+ if(err) {
} else {
struct callbackdata *cbd = v;
} else {
struct callbackdata *cbd = v;
diff --git
a/disobedience/queue-generic.c
b/disobedience/queue-generic.c
index e32cf85c3ecb6a2b39e163f29221c9b6af4c41ea..8c7458a7c6eaf6a1fe48a56f6b133d309bd52bd8 100644
(file)
--- a/
disobedience/queue-generic.c
+++ b/
disobedience/queue-generic.c
@@
-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) {
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];
if(after) {
/* Try to insert at the right sort of place */
GtkTreeIter where[1];
diff --git
a/disobedience/queue-menu.c
b/disobedience/queue-menu.c
index fcc34bf43c239e9fee1a88d53039686a568403b6..75ddeb6c2b664bfc795da7d101d62b9525724ba2 100644
(file)
--- a/
disobedience/queue-menu.c
+++ b/
disobedience/queue-menu.c
@@
-81,9
+81,9
@@
int ql_scratch_sensitive(void attribute((unused)) *extra) {
}
static void ql_scratch_completed(void attribute((unused)) *v,
}
static void ql_scratch_completed(void attribute((unused)) *v,
- const char *err
or
) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ const char *err) {
+ if(err)
+ popup_protocol_error(0, err);
}
void ql_scratch_activate(GtkMenuItem attribute((unused)) *menuitem,
}
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,
}
static void ql_remove_completed(void attribute((unused)) *v,
- const char *err
or
) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ const char *err) {
+ if(err)
+ popup_protocol_error(0, err);
}
static void ql_remove_activate_callback(GtkTreeModel *model,
}
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;
}
&& gtk_tree_selection_count_selected_rows(ql->selection) > 0;
}
-static void ql_play_completed(void attribute((unused)) *v, const char *err
or
) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+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,
}
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) {
}
struct tabtype *ql_tabtype(struct queuelike *ql) {
- static const struct tabtype q
l
_tabtype = {
+ static const struct tabtype q
ueuelike
_tabtype = {
ql_properties_sensitive,
ql_selectall_sensitive,
ql_selectnone_sensitive,
ql_properties_sensitive,
ql_selectall_sensitive,
ql_selectnone_sensitive,
@@
-197,7
+197,7
@@
struct tabtype *ql_tabtype(struct queuelike *ql) {
0
};
0
};
- ql->tabtype = q
l
_tabtype;
+ ql->tabtype = q
ueuelike
_tabtype;
ql->tabtype.extra = ql;
return &ql->tabtype;
}
ql->tabtype.extra = ql;
return &ql->tabtype;
}
diff --git
a/disobedience/queue.c
b/disobedience/queue.c
index f298b1f71b0b9f0a816e17c87f6955125788dbf8..7dbe563cb4cb35153e0fc25aea5e7173f8dcce0f 100644
(file)
--- a/
disobedience/queue.c
+++ b/
disobedience/queue.c
@@
-75,10
+75,10
@@
static void queue_playing_changed(void) {
/** @brief Update the queue itself */
static void queue_completed(void attribute((unused)) *v,
/** @brief Update the queue itself */
static void queue_completed(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
struct queue_entry *q) {
struct queue_entry *q) {
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
actual_queue = q;
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,
/** @brief Update the playing track */
static void playing_completed(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
struct queue_entry *q) {
struct queue_entry *q) {
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
actual_playing_track = q;
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,
static int queue_drag_target = -1;
static void queue_move_completed(void attribute((unused)) *v,
- const char *err
or
) {
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ 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 */
return;
}
/* The log should tell us the queue changed so we do no more here */
diff --git
a/disobedience/recent.c
b/disobedience/recent.c
index 49333e7109b59af59d0db5de88638f7345ec8071..109ee5ab3579daf95e5e0fda498e13aa959d849a 100644
(file)
--- a/
disobedience/recent.c
+++ b/
disobedience/recent.c
@@
-23,10
+23,10
@@
/** @brief Update the recently played list */
static void recent_completed(void attribute((unused)) *v,
/** @brief Update the recently played list */
static void recent_completed(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
struct queue_entry *q) {
struct queue_entry *q) {
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
/* The recent list is backwards compared to what we wanted */
return;
}
/* The recent list is backwards compared to what we wanted */
diff --git
a/disobedience/users.c
b/disobedience/users.c
index bb099f2d7ac27ab39ea7e57f2941a282809f5bc4..60bdef64ba719d6287043901b8c4fe52716c4063 100644
(file)
--- a/
disobedience/users.c
+++ b/
disobedience/users.c
@@
-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,
* If users_deferred_select is set then that user is selected.
*/
static void users_got_list(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
int nvec, char **vec) {
int n;
GtkTreeIter iter;
int nvec, char **vec) {
int n;
GtkTreeIter iter;
- if(err
or
) {
- popup_protocol_error(0, err
or
);
+ if(err) {
+ popup_protocol_error(0, err);
return;
}
/* Present users in alphabetical order */
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,
/** @brief Called when a user setting has been edited */
static void users_edituser_completed(void attribute((unused)) *v,
- const char *err
or
) {
- if(err
or
)
- popup_submsg(users_window, GTK_MESSAGE_ERROR, err
or
);
+ 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,
}
/** @brief Called when a new user has been created */
static void users_adduser_completed(void *v,
- const char *err
or
) {
- if(err
or
) {
- popup_submsg(users_window, GTK_MESSAGE_ERROR, err
or
);
+ 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;
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,
/** @brief Called when a user has been deleted */
static void users_delete_completed(void *v,
- const char *err
or
) {
- if(err
or
)
- popup_submsg(users_window, GTK_MESSAGE_ERROR, err
or
);
+ 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");
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,
}
static void users_got_email(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
const char *value) {
const char *value) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ if(err)
+ popup_protocol_error(0, err);
users_email = value;
}
static void users_got_rights(void attribute((unused)) *v,
users_email = value;
}
static void users_got_rights(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
const char *value) {
const char *value) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ if(err)
+ popup_protocol_error(0, err);
users_rights = value;
}
static void users_got_password(void attribute((unused)) *v,
users_rights = value;
}
static void users_got_password(void attribute((unused)) *v,
- const char *err
or
,
+ const char *err,
const char *value) {
const char *value) {
- if(err
or
)
- popup_protocol_error(0, err
or
);
+ 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;
/* TODO if an error occurred gathering user info, we should react in some
* different way */
users_password = value;