remove unnecessary forward declaration of set_statusline_error
Patch status: merged
Patch by Alexander Kedrik
Long description:
Attributes can be added to function definitions. Tested with gcc 4.8.2 and clang 3.3
To apply this patch, use:
curl http://cr.i3wm.org/patch/357/raw.patch | git am
b/i3bar/src/child.c
16 |
@@ -81,12 +81,7 @@ static void clear_status_blocks() { |
17 |
* `draw_bars' is called, the error message text will be drawn on the bar in |
18 |
* the space allocated for the statusline. |
19 |
*/ |
20 |
- |
21 |
-/* forward function declaration is needed to add __attribute__ mechanism which |
22 |
- * helps the compiler understand we are defining a printf wrapper */ |
23 |
-static void set_statusline_error(const char *format, ...) __attribute__ ((format (printf, 1, 2))); |
24 |
- |
25 |
-static void set_statusline_error(const char *format, ...) { |
26 |
+__attribute__ ((format (printf, 1, 2))) static void set_statusline_error(const char *format, ...) { |
27 |
clear_status_blocks(); |
28 |
|
29 |
char *message; |