diff --git a/src/conky.c b/src/conky.c index 3bd678ef..c9d31094 100644 --- a/src/conky.c +++ b/src/conky.c @@ -3373,11 +3373,9 @@ static void generate_text_internal(char *p, int p_max_size, } #endif /* __OpenBSD__ */ -#ifdef X11 OBJ(font) { new_font(p, obj->data.s); } -#endif /* TODO: move this correction from kB to kB/s elsewhere * (or get rid of it??) */ OBJ(diskio) { diff --git a/src/specials.c b/src/specials.c index 1c177d8e..031f089e 100644 --- a/src/specials.c +++ b/src/specials.c @@ -186,11 +186,11 @@ void new_bar(char *buf, int w, int h, int usage) s->height = h; } -#ifdef X11 void new_font(char *buf, char *args) { if ((output_methods & TO_X) == 0) return; +#ifdef X11 if (args) { struct special_t *s = new_special(buf, FONT); @@ -208,8 +208,12 @@ void new_font(char *buf, char *args) selected_font = s->font_added = 0; selected_font = tmp; } -} +#else + (void)buf; + (void)args; + return; #endif +} static void graph_append(struct special_t *graph, double f, char showaslog) { diff --git a/src/specials.h b/src/specials.h index e23a599c..8a82cbbd 100644 --- a/src/specials.h +++ b/src/specials.h @@ -86,9 +86,7 @@ char *scan_graph(const char *, int *, int *, unsigned int *, /* printing specials */ void new_bar(char *, int, int, int); -#ifdef X11 void new_font(char *, char *); -#endif void new_graph(char *, int, int, unsigned int, unsigned int, double, int, int, char); void new_hr(char *, int);