Skip to content

Commit

Permalink
gard: Fix warnings from gcc 8.2.0
Browse files Browse the repository at this point in the history
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@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
amboar authored and stewartsmith committed Feb 22, 2019
1 parent a7e1efe commit 5636d39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions external/gard/gard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 5636d39

Please sign in to comment.