Gcc complains too much when build without X11 and NCurses
authorNikolas Garofil <garo@dunaldi.garofil.be>
Tue, 4 Aug 2009 20:13:06 +0000 (22:13 +0200)
committerNikolas Garofil <garo@dunaldi.garofil.be>
Tue, 4 Aug 2009 20:13:06 +0000 (22:13 +0200)
src/conky.c
src/specials.c

index 6661580..20a8fbd 100644 (file)
@@ -6584,6 +6584,7 @@ static inline void set_foreground_color(long c)
                attron(COLOR_PAIR(c));
        }
 #endif /* NCURSES */
+       UNUSED(c);
        return;
 }
 
@@ -7175,8 +7176,8 @@ static int draw_line(char *s, int special_index)
        }
 #endif /* NCURSES */
        draw_string(s);
-       //'special_index - special_index' instead of 0 otherwise gcc complains about not using special_index when build without X11
-       return special_index - special_index;
+       UNUSED(special_index);
+       return 0;
 }
 
 static void draw_text(void)
index 71df3de..536cae7 100644 (file)
@@ -363,6 +363,8 @@ void new_fg(char *buf, long c)
        if (output_methods & TO_NCURSES)
                new_special(buf, FG)->arg = c;
 #endif /* NCURSES */
+       UNUSED(buf);
+       UNUSED(c);
 }
 
 #ifdef X11