]> git.draconx.ca Git - cdecl99.git/commitdiff
Avoid a couple warnings reported by gcc.
authorNick Bowler <nbowler@draconx.ca>
Thu, 11 Mar 2021 05:43:59 +0000 (00:43 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 11 Mar 2021 05:47:05 +0000 (00:47 -0500)
There would be a presentation bug in the "help" command output if
we had anything in the list sufficiently long to cause wrapping.

src/cdecl99.c
src/execute.gperf
src/parse-decl.c

index 00053b26c83a19378a94cfd26cf634a86380deca..2a522d4c268fa32201c9bc05e30c9b37bad5d1d4 100644 (file)
@@ -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))
index c667408c57c85282298ec9e6c55c0638e6b609c3..5f6740e40c7d2ba9bd231f5389f618163592d7b9 100644 (file)
@@ -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);
index 27577038a5dd9879d3bee532322b41a55396ba8a..1ad3e8e175006f320cc86a49809a6f9e2608ba8e 100644 (file)
@@ -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;