From: Alexander Kedrik Date: Wed, 1 Jan 2014 15:23:10 +0000 (+0400) Subject: remove unnecessary forward declaration of set_statusline_error X-Git-Tag: 4.8~166 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f1560e5eb6d8d64b62e10e8f896f688b44392648;p=i3%2Fi3 remove unnecessary forward declaration of set_statusline_error Attributes can be added to function definitions. Tested with gcc 4.8.2 and clang 3.3 --- diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 63e26f1b..3621234c 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -81,12 +81,7 @@ static void clear_status_blocks() { * `draw_bars' is called, the error message text will be drawn on the bar in * the space allocated for the statusline. */ - -/* forward function declaration is needed to add __attribute__ mechanism which - * helps the compiler understand we are defining a printf wrapper */ -static void set_statusline_error(const char *format, ...) __attribute__ ((format (printf, 1, 2))); - -static void set_statusline_error(const char *format, ...) { +__attribute__ ((format (printf, 1, 2))) static void set_statusline_error(const char *format, ...) { clear_status_blocks(); char *message;