Drop gcc2 patches, as requested by espie@
This commit is contained in:
parent
582b883e89
commit
dcfb1144f5
@ -1,45 +0,0 @@
|
||||
$OpenBSD: patch-src_idle_c,v 1.2 2011/11/07 12:36:08 sthen Exp $
|
||||
|
||||
Fix build on gcc2.
|
||||
|
||||
--- src/idle.c.orig Mon Oct 24 04:43:05 2011
|
||||
+++ src/idle.c Sun Oct 30 00:18:24 2011
|
||||
@@ -60,7 +60,8 @@ static const char *const idle_names[] = {
|
||||
const char *
|
||||
mpd_idle_name(enum mpd_idle idle)
|
||||
{
|
||||
- for (unsigned i = 0; idle_names[i] != NULL; ++i)
|
||||
+ unsigned i;
|
||||
+ for (i = 0; idle_names[i] != NULL; ++i)
|
||||
if (idle == (enum mpd_idle)(1 << i))
|
||||
return idle_names[i];
|
||||
|
||||
@@ -70,9 +71,10 @@ mpd_idle_name(enum mpd_idle idle)
|
||||
enum mpd_idle
|
||||
mpd_idle_name_parse(const char *name)
|
||||
{
|
||||
+ unsigned i;
|
||||
assert(name != NULL);
|
||||
|
||||
- for (unsigned i = 0; idle_names[i] != NULL; ++i)
|
||||
+ for (i = 0; idle_names[i] != NULL; ++i)
|
||||
if (strcmp(name, idle_names[i]) == 0)
|
||||
return 1 << i;
|
||||
|
||||
@@ -144,6 +146,7 @@ mpd_send_idle(struct mpd_connection *connection)
|
||||
bool
|
||||
mpd_send_idle_mask(struct mpd_connection *connection, enum mpd_idle mask)
|
||||
{
|
||||
+ unsigned i;
|
||||
/* this buffer is large enough even for the full mask */
|
||||
char buffer[128] = "idle";
|
||||
|
||||
@@ -152,7 +155,7 @@ mpd_send_idle_mask(struct mpd_connection *connection,
|
||||
if (mpd_error_is_defined(&connection->error))
|
||||
return false;
|
||||
|
||||
- for (unsigned i = 0; idle_names[i] != NULL; ++i) {
|
||||
+ for (i = 0; idle_names[i] != NULL; ++i) {
|
||||
if (mask & (1 << i)) {
|
||||
mask &= ~(1 << i);
|
||||
strcat(buffer, " ");
|
@ -1,58 +0,0 @@
|
||||
$OpenBSD: patch-src_song_c,v 1.2 2011/04/05 20:09:32 landry Exp $
|
||||
|
||||
Fix build on gcc2.
|
||||
|
||||
--- src/song.c.orig Tue Jan 4 03:17:22 2011
|
||||
+++ src/song.c Sun Jan 16 02:57:01 2011
|
||||
@@ -101,6 +101,7 @@ static struct mpd_song *
|
||||
mpd_song_new(const char *uri)
|
||||
{
|
||||
struct mpd_song *song;
|
||||
+ unsigned i;
|
||||
|
||||
assert(uri != NULL);
|
||||
assert(mpd_verify_uri(uri));
|
||||
@@ -116,7 +117,7 @@ mpd_song_new(const char *uri)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- for (unsigned i = 0; i < MPD_TAG_COUNT; ++i)
|
||||
+ for (i = 0; i < MPD_TAG_COUNT; ++i)
|
||||
song->tags[i].value = NULL;
|
||||
|
||||
song->duration = 0;
|
||||
@@ -134,12 +135,15 @@ mpd_song_new(const char *uri)
|
||||
}
|
||||
|
||||
void mpd_song_free(struct mpd_song *song) {
|
||||
+ struct mpd_tag_value *tag, *next = NULL;
|
||||
+ unsigned i;
|
||||
+
|
||||
assert(song != NULL);
|
||||
|
||||
free(song->uri);
|
||||
|
||||
- for (unsigned i = 0; i < MPD_TAG_COUNT; ++i) {
|
||||
- struct mpd_tag_value *tag = &song->tags[i], *next;
|
||||
+ for (i = 0; i < MPD_TAG_COUNT; ++i) {
|
||||
+ tag = &song->tags[i];
|
||||
|
||||
if (tag->value == NULL)
|
||||
continue;
|
||||
@@ -169,6 +173,7 @@ struct mpd_song *
|
||||
mpd_song_dup(const struct mpd_song *song)
|
||||
{
|
||||
struct mpd_song *ret;
|
||||
+ unsigned i;
|
||||
bool success;
|
||||
|
||||
assert(song != NULL);
|
||||
@@ -178,7 +183,7 @@ mpd_song_dup(const struct mpd_song *song)
|
||||
/* out of memory */
|
||||
return NULL;
|
||||
|
||||
- for (unsigned i = 0; i < MPD_TAG_COUNT; ++i) {
|
||||
+ for (i = 0; i < MPD_TAG_COUNT; ++i) {
|
||||
const struct mpd_tag_value *src_tag = &song->tags[i];
|
||||
|
||||
if (src_tag->value == NULL)
|
@ -1,30 +0,0 @@
|
||||
$OpenBSD: patch-src_tag_c,v 1.1 2010/09/06 11:40:39 jasper Exp $
|
||||
|
||||
Fix build on gcc2.
|
||||
|
||||
--- src/tag.c.orig Mon Sep 6 05:17:09 2010
|
||||
+++ src/tag.c Mon Sep 6 05:18:21 2010
|
||||
@@ -69,9 +69,10 @@ mpd_tag_name(enum mpd_tag_type type)
|
||||
enum mpd_tag_type
|
||||
mpd_tag_name_parse(const char *name)
|
||||
{
|
||||
+ unsigned i;
|
||||
assert(name != NULL);
|
||||
|
||||
- for (unsigned i = 0; i < MPD_TAG_COUNT; ++i)
|
||||
+ for (i = 0; i < MPD_TAG_COUNT; ++i)
|
||||
if (strcmp(name, mpd_tag_type_names[i]) == 0)
|
||||
return (enum mpd_tag_type)i;
|
||||
|
||||
@@ -108,9 +109,10 @@ ignore_case_string_equals(const char *a, const char *b
|
||||
enum mpd_tag_type
|
||||
mpd_tag_name_iparse(const char *name)
|
||||
{
|
||||
+ unsigned i;
|
||||
assert(name != NULL);
|
||||
|
||||
- for (unsigned i = 0; i < MPD_TAG_COUNT; ++i)
|
||||
+ for (i = 0; i < MPD_TAG_COUNT; ++i)
|
||||
if (ignore_case_string_equals(name, mpd_tag_type_names[i]))
|
||||
return (enum mpd_tag_type)i;
|
||||
|
Loading…
x
Reference in New Issue
Block a user