From: Nick Bowler Date: Thu, 11 Mar 2021 05:43:59 +0000 (-0500) Subject: Avoid a couple warnings reported by gcc. X-Git-Tag: v1.1~6 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/f2f75f25ecc377fb95877449aa12314ee1385a1f Avoid a couple warnings reported by gcc. There would be a presentation bug in the "help" command output if we had anything in the list sufficiently long to cause wrapping. --- diff --git a/src/cdecl99.c b/src/cdecl99.c index 00053b2..2a522d4 100644 --- a/src/cdecl99.c +++ b/src/cdecl99.c @@ -145,7 +145,6 @@ static void print_help(void) puts(_("Options:")); for (opt = lopts; opt->name; opt++) { struct lopt_help help; - const char *line; int w; if (!lopt_get_help(opt, &help)) diff --git a/src/execute.gperf b/src/execute.gperf index c667408..5f6740e 100644 --- a/src/execute.gperf +++ b/src/execute.gperf @@ -73,7 +73,7 @@ static int run_cmd_help(void) w = printf(" %s", stringpool+c->name); if (w < 0 || w > 13) { putchar('\n'); - 0; + w = 0; } print_block(gettext(strtab+c->cmd), 15, w); diff --git a/src/parse-decl.c b/src/parse-decl.c index 2757703..1ad3e8e 100644 --- a/src/parse-decl.c +++ b/src/parse-decl.c @@ -269,7 +269,6 @@ check_parameters(struct cdecl_declarator **p, struct cdecl_declarator *d) { struct cdecl_declspec *spec; struct cdecl *param; - bool has_void = false; if (d->type != CDECL_DECL_FUNCTION) return 0;