"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: Silence warnings being treated as errors on sparc64 and yacc rules reduced error
To:
Tracey Emery <tracey@traceyemery.net>
Cc:
gameoftrees@openbsd.org
Date:
Thu, 09 Feb 2023 09:26:49 +0100

Download raw body.

Thread
On 2023/02/08 16:44:05 -0700, Tracey Emery <tracey@traceyemery.net> wrote:
> Hello,
> 
> This silences two warnings treated as errors on sparc64 (warning:
> function declaration isn't a prototype). We also don't use boolen in
> gotd's parse.y, so this removes our reduction error. We can either let
> that languish, if we plan to use it in the future, or replace boolean
> later.
> 
> ok?

can't speak about the boolean in the yacc grammar (was tempted too to
drop it), but for the first error this should do it

i'm still puzzled why our current mix of -W doesn't catch this with
clang...

diff /home/op/w/gotd
commit - 2ec74a9e9c334f3245765a6e6f35b7977f5b420e
path + /home/op/w/gotd
blob - e1f90c1960d3e783711dd5f2f29e41b254d35a57
file + gotd/gotd.c
--- gotd/gotd.c
+++ gotd/gotd.c
@@ -105,7 +105,7 @@ usage()
 static void kill_proc(struct gotd_child_proc *, int);
 
 __dead static void
-usage()
+usage(void)
 {
 	fprintf(stderr, "usage: %s [-dnv] [-f config-file]\n", getprogname());
 	exit(1);
blob - 43dacf20c7b2d23ff032cdb48ebbd511772503bf
file + gotsh/gotsh.c
--- gotsh/gotsh.c
+++ gotsh/gotsh.c
@@ -36,7 +36,7 @@ usage()
 static int chattygot;
 
 __dead static void
-usage()
+usage(void)
 {
 	fprintf(stderr, "usage: %s -c '%s|%s repository-path'\n",
 	    getprogname(), GOT_SERVE_CMD_SEND, GOT_SERVE_CMD_FETCH);