1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

* Fix compile error when MPD support not enabled

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1236 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2008-08-14 17:10:41 +00:00
parent 6a5691ab70
commit 740eca5cf2
2 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,8 @@
# $Id$ # $Id$
2008-08-14
* Fix compile error when MPD support not enabled
2008-08-05 2008-08-05
* Add option to specify number of retries for IMAP/POP3 stuff (via -r) * Add option to specify number of retries for IMAP/POP3 stuff (via -r)

View File

@ -2397,6 +2397,7 @@ static void free_text_objects(struct text_object_list *text_object_list, char fu
break; break;
} }
} }
if (full) {} // disable warning when MPD !defined
free(text_object_list->text_objects); free(text_object_list->text_objects);
text_object_list->text_objects = NULL; text_object_list->text_objects = NULL;
text_object_list->text_object_count = 0; text_object_list->text_object_count = 0;
@ -3742,9 +3743,8 @@ static struct text_object *construct_text_object(const char *s,
} else { } else {
obj->global_mode = 1; obj->global_mode = 1;
} }
END
#ifdef SMAPI #ifdef SMAPI
OBJ(smapi, 0) END OBJ(smapi, 0)
if (arg) if (arg)
obj->data.s = strndup(arg, text_buffer_size); obj->data.s = strndup(arg, text_buffer_size);
else else
@ -3788,10 +3788,9 @@ static struct text_object *construct_text_object(const char *s,
} }
} else } else
ERR("if_smapi_bat_bar needs an argument"); ERR("if_smapi_bat_bar needs an argument");
END
#endif /* SMAPI */ #endif /* SMAPI */
#ifdef MPD #ifdef MPD
OBJ_THREAD(mpd_artist, INFO_MPD) END OBJ_THREAD(mpd_artist, INFO_MPD)
END OBJ_THREAD(mpd_title, INFO_MPD) END OBJ_THREAD(mpd_title, INFO_MPD)
if (arg) { if (arg) {
sscanf(arg, "%d", &info.mpd.max_title_len); sscanf(arg, "%d", &info.mpd.max_title_len);
@ -3818,9 +3817,9 @@ static struct text_object *construct_text_object(const char *s,
END OBJ_THREAD(mpd_bar, INFO_MPD) END OBJ_THREAD(mpd_bar, INFO_MPD)
scan_bar(arg, &obj->data.pair.a, &obj->data.pair.b); scan_bar(arg, &obj->data.pair.a, &obj->data.pair.b);
END OBJ_THREAD(mpd_smart, INFO_MPD) END OBJ_THREAD(mpd_smart, INFO_MPD)
#endif #endif /* MPD */
#ifdef XMMS2 #ifdef XMMS2
OBJ(xmms2_artist, INFO_XMMS2) END OBJ(xmms2_artist, INFO_XMMS2)
END OBJ(xmms2_album, INFO_XMMS2) END OBJ(xmms2_album, INFO_XMMS2)
END OBJ(xmms2_title, INFO_XMMS2) END OBJ(xmms2_title, INFO_XMMS2)
END OBJ(xmms2_genre, INFO_XMMS2) END OBJ(xmms2_genre, INFO_XMMS2)