[Skiboot] [PATCH 03/51] gard: Fix warnings from gcc 8.2.0

Andrew Jeffery andrew at aj.id.au
Fri Feb 15 17:56:20 AEDT 2019


    gard.c:285:5: error: no previous prototype for ‘parse_path’ [-Werror=missing-prototypes]
     int parse_path(const char *str, struct entity_path *parsed)
         ^~~~~~~~~~
    gard.c: In function ‘do_list’:
    gard.c:459:46: error: unused parameter ‘argc’ [-Werror=unused-parameter]
     static int do_list(struct gard_ctx *ctx, int argc, char **argv)
                                              ~~~~^~~~
    gard.c:459:59: error: unused parameter ‘argv’ [-Werror=unused-parameter]
     static int do_list(struct gard_ctx *ctx, int argc, char **argv)
                                                        ~~~~~~~^~~~

Signed-off-by: Andrew Jeffery <andrew at aj.id.au>
---
 external/gard/gard.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/external/gard/gard.c b/external/gard/gard.c
index c686791e858c..16da76a3149a 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -282,7 +282,7 @@ static char *format_path(struct entity_path *path, char *buffer)
  *      path_element[2] = {2, 1}
  * }
  */
-int parse_path(const char *str, struct entity_path *parsed)
+static int parse_path(const char *str, struct entity_path *parsed)
 {
 	int unit_count = 0;
 
@@ -456,7 +456,8 @@ static void draw_ruler(char c, int size)
 	putchar('\n');
 }
 
-static int do_list(struct gard_ctx *ctx, int argc, char **argv)
+static int do_list(struct gard_ctx *ctx, int argc __attribute__((unused)),
+		   char **argv __attribute__((unused)))
 {
 	/* This header matches the line formatting above in do_list_i() */
 	const char *header = " ID       | Error    | Type       | Path";
-- 
2.19.1



More information about the Skiboot mailing list