~mpu/qbe

Add missing 'void' to function declarations and definitions v1 REJECTED

Josiah Frentsos: 1
 Add missing 'void' to function declarations and definitions

 44 files changed, 83 insertions(+), 83 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mpu/qbe/patches/47251/mbox | git am -3
Learn more about email & git

[PATCH] Add missing 'void' to function declarations and definitions Export this patch

---
 cfg.c            |  2 +-
 minic/minic.y    |  6 +++---
 minic/yacc.c     | 22 +++++++++++-----------
 parse.c          | 18 +++++++++---------
 rega.c           |  2 +-
 test/abi1.ssa    |  4 ++--
 test/abi2.ssa    |  2 +-
 test/abi3.ssa    |  2 +-
 test/abi5.ssa    | 24 ++++++++++++------------
 test/abi6.ssa    |  2 +-
 test/align.ssa   |  2 +-
 test/collatz.ssa |  2 +-
 test/conaddr.ssa |  4 ++--
 test/cprime.ssa  |  2 +-
 test/cup.ssa     |  2 +-
 test/dark.ssa    |  2 +-
 test/double.ssa  |  2 +-
 test/eucl.ssa    |  2 +-
 test/euclc.ssa   |  2 +-
 test/fixarg.ssa  |  4 ++--
 test/fold1.ssa   |  6 +++---
 test/fpcnv.ssa   |  2 +-
 test/isel1.ssa   |  2 +-
 test/ldbits.ssa  |  2 +-
 test/ldhoist.ssa |  2 +-
 test/load1.ssa   |  2 +-
 test/load2.ssa   |  2 +-
 test/loop.ssa    |  2 +-
 test/max.ssa     |  2 +-
 test/mem1.ssa    |  4 ++--
 test/philv.ssa   |  2 +-
 test/prime.ssa   |  2 +-
 test/rega1.ssa   |  2 +-
 test/spill1.ssa  |  2 +-
 test/strcmp.ssa  |  2 +-
 test/strspn.ssa  |  2 +-
 test/sum.ssa     |  2 +-
 test/vararg1.ssa |  2 +-
 test/vararg2.ssa |  2 +-
 tools/callgen.ml |  2 +-
 tools/lexh.c     |  2 +-
 tools/pmov.c     |  6 +++---
 tools/vatest.py  |  2 +-
 util.c           |  2 +-
 44 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/cfg.c b/cfg.c
index 406c307..f1fa21a 100644
--- a/cfg.c
+++ b/cfg.c
@@ -1,7 +1,7 @@
#include "all.h"

Blk *
newblk()
newblk(void)
{
	static Blk z;
	Blk *b;
diff --git a/minic/minic.y b/minic/minic.y
index eeef900..685bc48 100644
--- a/minic/minic.y
+++ b/minic/minic.y
@@ -112,7 +112,7 @@ hash(char *s)
}

void
varclr()
varclr(void)
{
	unsigned h;

@@ -819,7 +819,7 @@ arg1: expr          { $$ = mknode(0, $1, 0); }
%%

int
yylex()
yylex(void)
{
	struct {
		char *s;
@@ -937,7 +937,7 @@ yyerror(char *err)
}

int
main()
main(void)
{
	int i;

diff --git a/minic/yacc.c b/minic/yacc.c
index 01f054e..1d91b20 100644
--- a/minic/yacc.c
+++ b/minic/yacc.c
@@ -200,7 +200,7 @@ first(TSet *ts, Sym *stnc, TSet *last)
}

void
ginit()
ginit(void)
{
	int chg;
	Rule *r;
@@ -375,7 +375,7 @@ stadd(Item **pi)
}

void
stgen()
stgen(void)
{
	Sym s;
	Rule *r;
@@ -520,7 +520,7 @@ setdef(Row *r, int w, int top)
}

void
tblgen()
tblgen(void)
{
	Row *r;
	Item *i;
@@ -557,7 +557,7 @@ prcmp(const void *a, const void *b)
}

void
actgen()
actgen(void)
{
	Row **o, *r;
	int n, m, t, dsp, nnt;
@@ -644,7 +644,7 @@ aout(char *name, int *t, int n)
}

void
tblout()
tblout(void)
{
	int *o, n, m;

@@ -703,7 +703,7 @@ tblout()
}

void
stdump()
stdump(void)
{
	Term *t;
	Sym *s1;
@@ -798,7 +798,7 @@ istok(int c)
}

int
nexttk()
nexttk(void)
{
	int n;
	char c, *p;
@@ -849,7 +849,7 @@ nexttk()
}

char *
cpycode()
cpycode(void)
{
	int c, nest, in, len, pos;
	char *s;
@@ -936,7 +936,7 @@ findsy(char *name, int add)
}

void
getdecls()
getdecls(void)
{
	int tk, prec, p, a, c, c1, n;
	Info *si;
@@ -1059,7 +1059,7 @@ getdecls()
}

void
getgram()
getgram(void)
{
	extern char *retcode;
	int tk;
@@ -1203,7 +1203,7 @@ actout(Rule *r)
}

void
codeout()
codeout(void)
{
	extern char *code0[], *code1[];
	char **p;
diff --git a/parse.c b/parse.c
index 33ed6ec..6ddc6bb 100644
--- a/parse.c
+++ b/parse.c
@@ -173,7 +173,7 @@ err(char *s, ...)
}

static void
lexinit()
lexinit(void)
{
	static int done;
	int i;
@@ -195,7 +195,7 @@ lexinit()
}

static int64_t
getint()
getint(void)
{
	uint64_t n;
	int c, m;
@@ -216,7 +216,7 @@ getint()
}

static int
lex()
lex(void)
{
	static char tok[NString];
	int c, i, esc;
@@ -326,7 +326,7 @@ Alpha:
}

static int
peek()
peek(void)
{
	if (thead == Txxx)
		thead = lex();
@@ -334,7 +334,7 @@ peek()
}

static int
next()
next(void)
{
	int t;

@@ -344,7 +344,7 @@ next()
}

static int
nextnl()
nextnl(void)
{
	int t;

@@ -401,7 +401,7 @@ tmpref(char *v)
}

static Ref
parseref()
parseref(void)
{
	Con c;

@@ -566,7 +566,7 @@ findblk(char *name)
}

static void
closeblk()
closeblk(void)
{
	curb->nins = curi - insb;
	idup(&curb->ins, insb, curb->nins);
@@ -988,7 +988,7 @@ parsefields(Field *fld, Typ *ty, int t)
}

static void
parsetyp()
parsetyp(void)
{
	Typ *ty;
	int t, al;
diff --git a/rega.c b/rega.c
index 8e601c9..4d2a06b 100644
--- a/rega.c
+++ b/rega.c
@@ -247,7 +247,7 @@ pmrec(enum PMStat *status, int i, int *k)
}

static void
pmgen()
pmgen(void)
{
	int i;
	enum PMStat *status;
diff --git a/test/abi1.ssa b/test/abi1.ssa
index 049f10e..3afb926 100644
--- a/test/abi1.ssa
+++ b/test/abi1.ssa
@@ -35,14 +35,14 @@ function $test() {
# >>> driver
# #include <stdio.h>
# typedef struct { char t[17]; } mem;
# extern void test();
# extern void test(void);
# void fcb(mem m, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, mem n) {
# 	printf("fcb: m = (mem){ t = \"%s\" }\n", m.t);
# 	printf("     n = (mem){ t = \"%s\" }\n", n.t);
# 	#define T(n) printf("     i%d = %d\n", n, i##n);
# 	T(1) T(2) T(3) T(4) T(5) T(6) T(7) T(8) T(9)
# }
# int main() { test(); return 0; }
# int main(void) { test(); return 0; }
# <<<

# >>> output
diff --git a/test/abi2.ssa b/test/abi2.ssa
index 42a3bae..e04f059 100644
--- a/test/abi2.ssa
+++ b/test/abi2.ssa
@@ -13,7 +13,7 @@ function s $sum(:fps %p) {
# >>> driver
# typedef struct { float f1; char b; float f2; } fps;
# extern float sum(fps);
# int main() { fps x = { 1.23, -1, 2.34 }; return !(sum(x) == 1.23f+2.34f); }
# int main(void) { fps x = { 1.23, -1, 2.34 }; return !(sum(x) == 1.23f+2.34f); }
# /* Note the f suffixes above are important
#  * otherwise C does double operations. */
# <<<
diff --git a/test/abi3.ssa b/test/abi3.ssa
index cc263c2..eddce4d 100644
--- a/test/abi3.ssa
+++ b/test/abi3.ssa
@@ -36,7 +36,7 @@ function $test() {
# 	return 42;
# }
# int a;
# int main() { test(); printf("%d\n", a); return 0; }
# int main(void) { test(); printf("%d\n", a); return 0; }
# <<<

# >>> output
diff --git a/test/abi5.ssa b/test/abi5.ssa
index 65b702c..552f7e3 100644
--- a/test/abi5.ssa
+++ b/test/abi5.ssa
@@ -115,18 +115,18 @@ function $test() {
# typedef struct { char c; float f; } sta;
# typedef struct { char c0, c1; float f; } stb;
# extern void test(void);
# st1 t1() { return (st1){"abcdefghijklmnop"}; }
# st2 t2() { return (st2){2}; }
# st3 t3() { return (st3){3.0,30}; }
# st4 t4() { return (st4){4,-40}; }
# st5 t5() { return (st5){5.5,-55}; }
# st6 t6() { return (st6){"abcdefghijklmno"}; }
# st7 t7() { return (st7){7.77,77.7}; }
# st8 t8() { return (st8){-8,88,-888,8888}; }
# st9 t9() { return (st9){9,{.f=9.9}}; }
# sta ta() { return (sta){-10,10.1}; }
# stb tb() { return (stb){-1,11,11.11}; }
# int main() { test(); return 0; }
# st1 t1(void) { return (st1){"abcdefghijklmnop"}; }
# st2 t2(void) { return (st2){2}; }
# st3 t3(void) { return (st3){3.0,30}; }
# st4 t4(void) { return (st4){4,-40}; }
# st5 t5(void) { return (st5){5.5,-55}; }
# st6 t6(void) { return (st6){"abcdefghijklmno"}; }
# st7 t7(void) { return (st7){7.77,77.7}; }
# st8 t8(void) { return (st8){-8,88,-888,8888}; }
# st9 t9(void) { return (st9){9,{.f=9.9}}; }
# sta ta(void) { return (sta){-10,10.1}; }
# stb tb(void) { return (stb){-1,11,11.11}; }
# int main(void) { test(); return 0; }
# <<<

# >>> output
diff --git a/test/abi6.ssa b/test/abi6.ssa
index da2370c..a6e2a29 100644
--- a/test/abi6.ssa
+++ b/test/abi6.ssa
@@ -23,7 +23,7 @@ function $f(:hfa3 %h1, :hfa3 %h2, d %d1, :hfa3 %h3, d %d2) {
# typedef struct { float f1, f2, f3; } hfa3;
# void f(hfa3, hfa3, double, hfa3, double);
# void phfa3(hfa3 h) { printf("{ %g, %g, %g }\n", h.f1, h.f2, h.f3); }
# int main() {
# int main(void) {
#       hfa3 h1={1,2,3}, h2={2,3,4}, h3={3,4,5};
#       f(h1, h2, 1, h3, 2);
# }
diff --git a/test/align.ssa b/test/align.ssa
index 49f1183..a78f86e 100644
--- a/test/align.ssa
+++ b/test/align.ssa
@@ -13,5 +13,5 @@ function $test() {
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 8 || a == -8); }
# int main(void) { test(); return !(a == 8 || a == -8); }
# <<<
diff --git a/test/collatz.ssa b/test/collatz.ssa
index 73e16ea..5a23453 100644
--- a/test/collatz.ssa
+++ b/test/collatz.ssa
@@ -58,5 +58,5 @@ function $test() {
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 178); }
# int main(void) { test(); return !(a == 178); }
# <<<
diff --git a/test/conaddr.ssa b/test/conaddr.ssa
index 9e24d49..e873258 100644
--- a/test/conaddr.ssa
+++ b/test/conaddr.ssa
@@ -56,12 +56,12 @@ function $writeto0() {
# int ok;
# extern unsigned f0(long), f1(long), f2(long, long);
# extern char *f3(long);
# extern void f4(), writeto0();
# extern void f4(void), writeto0(void);
# void h(int sig, siginfo_t *si, void *unused) {
# 	ok += si->si_addr == 0;
# 	exit(!(ok == 6));
# }
# int main() {
# int main(void) {
# 	struct sigaction sa = {.sa_flags=SA_SIGINFO, .sa_sigaction=h};
# 	sigemptyset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0);
# 	ok += f0(2) == 'e';
diff --git a/test/cprime.ssa b/test/cprime.ssa
index 8fadef3..8d7708a 100644
--- a/test/cprime.ssa
+++ b/test/cprime.ssa
@@ -73,7 +73,7 @@ function w $main() {
}

# int
# main()
# main(void)
# {
#         int i, n, p, next, isprime;
#
diff --git a/test/cup.ssa b/test/cup.ssa
index b53c86e..6f9b27e 100644
--- a/test/cup.ssa
+++ b/test/cup.ssa
@@ -14,5 +14,5 @@ function $test() {

# >>> driver
# extern void test(void);
# int main() { test(); return 0; }
# int main(void) { test(); return 0; }
# <<<
diff --git a/test/dark.ssa b/test/dark.ssa
index ed9ec21..0329dfd 100644
--- a/test/dark.ssa
+++ b/test/dark.ssa
@@ -28,5 +28,5 @@ function $test(:magic %p) {
# >>> driver
# extern void test(void);
# int a = 2;
# int main() { test(); return !(a == 5); }
# int main(void) { test(); return !(a == 5); }
# <<<
diff --git a/test/double.ssa b/test/double.ssa
index ac6c4c5..43e9819 100644
--- a/test/double.ssa
+++ b/test/double.ssa
@@ -21,5 +21,5 @@ function $test() {
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 55); }
# int main(void) { test(); return !(a == 55); }
# <<<
diff --git a/test/eucl.ssa b/test/eucl.ssa
index 838c1b8..875de29 100644
--- a/test/eucl.ssa
+++ b/test/eucl.ssa
@@ -21,5 +21,5 @@ function $test() {
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 1); }
# int main(void) { test(); return !(a == 1); }
# <<<
diff --git a/test/euclc.ssa b/test/euclc.ssa
index 3449234..b1f446e 100644
--- a/test/euclc.ssa
+++ b/test/euclc.ssa
@@ -26,5 +26,5 @@ function w $test() {

# >>> driver
# extern int test(void);
# int main() { return !(test() == 1); }
# int main(void) { return !(test() == 1); }
# <<<
diff --git a/test/fixarg.ssa b/test/fixarg.ssa
index 85824fd..e421957 100644
--- a/test/fixarg.ssa
+++ b/test/fixarg.ssa
@@ -10,6 +10,6 @@ function w $test() {
}

# >>> driver
# extern int test();
# int main() { return !(test() == 1); }
# extern int test(void);
# int main(void) { return !(test() == 1); }
# <<<
diff --git a/test/fold1.ssa b/test/fold1.ssa
index 9fb5d71..7b1d33f 100644
--- a/test/fold1.ssa
+++ b/test/fold1.ssa
@@ -41,7 +41,7 @@ function w $f6() {
}

# >>> driver
# extern int f1(), f2(), f3(), f4(), f5(), f6();
# int main() { return !(f1() == -1 && f2() == -32 && f3() == -5 &&
#                       f4() == 0 && f5() == 1 && f6() == 0); }
# extern int f1(void), f2(void), f3(void), f4(void), f5(void), f6(void);
# int main(void) { return !(f1() == -1 && f2() == -32 && f3() == -5 &&
#                           f4() == 0 && f5() == 1 && f6() == 0); }
# <<<
diff --git a/test/fpcnv.ssa b/test/fpcnv.ssa
index 3466ed2..9e29ced 100644
--- a/test/fpcnv.ssa
+++ b/test/fpcnv.ssa
@@ -95,7 +95,7 @@ function l $dtol(d %f) {
# 	4294967295.0, 98547543006.49626, 236003043787688.3, 9.499222733527032e+18,
# 	1.1936266170755652e+19 };
# 
# int main() {
# int main(void) {
# 	int i;
# 
# 	if (fneg(1.23f) != -1.23f)  return 1;
diff --git a/test/isel1.ssa b/test/isel1.ssa
index 879a871..f537cf9 100644
--- a/test/isel1.ssa
+++ b/test/isel1.ssa
@@ -18,7 +18,7 @@ export function w $f(l %i, l %j) {
# >>> driver
# int a[] = {1, 2, 3, 4};
# extern int f(long long, long long);
# int main() {
# int main(void) {
# 	return !(f(0, 0) == 1 && f(0, 1) == 2 && f(1, 0) == 3 && f(1, 1) == 4);
# }
# <<<
diff --git a/test/ldbits.ssa b/test/ldbits.ssa
index 5e54487..b7cbafc 100644
--- a/test/ldbits.ssa
+++ b/test/ldbits.ssa
@@ -36,5 +36,5 @@ function $tests() {
# >>> driver
# extern void tests(void);
# int a;
# int main() { tests(); return a; }
# int main(void) { tests(); return a; }
# <<<
diff --git a/test/ldhoist.ssa b/test/ldhoist.ssa
index d4b1b64..e35a96c 100644
--- a/test/ldhoist.ssa
+++ b/test/ldhoist.ssa
@@ -17,5 +17,5 @@ function w $f(w %n, l %p) {

# >>> driver
# extern int f(int, int *);
# int main() { return f(0, 0); }
# int main(void) { return f(0, 0); }
# <<<
diff --git a/test/load1.ssa b/test/load1.ssa
index a87fd2d..a493402 100644
--- a/test/load1.ssa
+++ b/test/load1.ssa
@@ -21,7 +21,7 @@ function w $f(w %cond) {

# >>> driver
# extern int f(int);
# int main() {
# int main(void) {
# 	return !(f(0) == 0 && f(1) == 1);
# }
# <<<
diff --git a/test/load2.ssa b/test/load2.ssa
index 05c12a6..6b75b4c 100644
--- a/test/load2.ssa
+++ b/test/load2.ssa
@@ -60,7 +60,7 @@ function $f() {
# void px(unsigned n) {
# 	printf("0x%08x\n", n);
# }
# int main() {
# int main(void) {
# 	extern void f(void);
# 	f();
# }
diff --git a/test/loop.ssa b/test/loop.ssa
index 98914d9..360f2df 100644
--- a/test/loop.ssa
+++ b/test/loop.ssa
@@ -20,5 +20,5 @@ function $test() {
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 5050); }
# int main(void) { test(); return !(a == 5050); }
# <<<
diff --git a/test/max.ssa b/test/max.ssa
index 27fa8ca..89fc719 100644
--- a/test/max.ssa
+++ b/test/max.ssa
@@ -30,5 +30,5 @@ function $test() {
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 200); }
# int main(void) { test(); return !(a == 200); }
# <<<
diff --git a/test/mem1.ssa b/test/mem1.ssa
index b7045a6..00e745d 100644
--- a/test/mem1.ssa
+++ b/test/mem1.ssa
@@ -25,8 +25,8 @@ function :i3 $blit() {

# >>> driver
# struct i3 { int a, b, c; };
# extern struct i3 blit();
# int main() {
# extern struct i3 blit(void);
# int main(void) {
# 	struct i3 s = blit();
# 	return !(s.a == 0x223344dd
# 	      && s.b == 0x66778811
diff --git a/test/philv.ssa b/test/philv.ssa
index f14106f..aa1fdf8 100644
--- a/test/philv.ssa
+++ b/test/philv.ssa
@@ -30,5 +30,5 @@ function w $t1() {  # swapped phis

# >>> driver
# extern int t0(void), t1(void);
# int main() { return !(t0() == 1 && t1() == 1);}
# int main(void) { return !(t0() == 1 && t1() == 1);}
# <<<
diff --git a/test/prime.ssa b/test/prime.ssa
index 2273e1d..8bffe60 100644
--- a/test/prime.ssa
+++ b/test/prime.ssa
@@ -29,5 +29,5 @@ function $test() {
# >>> driver
# extern void test(void);
# int a;
# int main() { test(); return !(a == 104743); }
# int main(void) { test(); return !(a == 104743); }
# <<<
diff --git a/test/rega1.ssa b/test/rega1.ssa
index 9e87c89..6cea32b 100644
--- a/test/rega1.ssa
+++ b/test/rega1.ssa
@@ -18,7 +18,7 @@ export function l $f(l %a) {

# >>> driver
# extern long long f(long long);
# int main() {
# int main(void) {
# 	return !(f(1) == 42 && f(2) == 1 && f(42) == 1);
# }
# <<<
diff --git a/test/spill1.ssa b/test/spill1.ssa
index 21e98c2..dd143c7 100644
--- a/test/spill1.ssa
+++ b/test/spill1.ssa
@@ -64,5 +64,5 @@ function w $f(w %n0) {

# >>> driver
# extern int f(int);
# int main() { return !(f(1) == 136); }
# int main(void) { return !(f(1) == 136); }
# <<<
diff --git a/test/strcmp.ssa b/test/strcmp.ssa
index 4956871..8df7bb6 100644
--- a/test/strcmp.ssa
+++ b/test/strcmp.ssa
@@ -50,7 +50,7 @@ export function w $strcmp(l %s1.3.val,l %s2.5.val)

# >>> driver
# extern int strcmp(const char *, const char *);
# int main() {
# int main(void) {
# 	char a[] = "Hello world";
# 	return !(
# 		strcmp(a, a) == 0 &&
diff --git a/test/strspn.ssa b/test/strspn.ssa
index a64ea19..ff60fc4 100644
--- a/test/strspn.ssa
+++ b/test/strspn.ssa
@@ -65,7 +65,7 @@ export function w $strspn_(l %s1.81.val,l %s2.82.val)

# >>> driver
# extern unsigned strspn_(const char *, const char *);
# int main() {
# int main(void) {
# 	return !(
# 		strspn_("", "abc") == 0 &&
# 		strspn_("abc", "") == 0 &&
diff --git a/test/sum.ssa b/test/sum.ssa
index 08ba8c0..56cb312 100644
--- a/test/sum.ssa
+++ b/test/sum.ssa
@@ -24,7 +24,7 @@ function w $sum(l %arr, w %num) {
# extern int sum(int *, int);
# int arr[] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 };
# #define N sizeof arr / sizeof arr[0]
# int main() {
# int main(void) {
# 	int i, s;
# 	for (s=i=0; i<N; i++) s+=arr[i];
# 	return !(sum(arr, N) == s);
diff --git a/test/vararg1.ssa b/test/vararg1.ssa
index 3b33890..ab1e85f 100644
--- a/test/vararg1.ssa
+++ b/test/vararg1.ssa
@@ -25,7 +25,7 @@ function w $g(l %fmt, ...) {
# int print(const char *fmt, va_list *ap) {
# 	return vprintf(fmt, *ap);
# }
# int main() {
# int main(void) {
# 	g("Hell%c %s %g!\n", 'o', "world", f(42, "x", 42.0));
# }
# <<<
diff --git a/test/vararg2.ssa b/test/vararg2.ssa
index cecb20a..2b8aad1 100644
--- a/test/vararg2.ssa
+++ b/test/vararg2.ssa
@@ -340,7 +340,7 @@ export function $qbecall7(w %argw0, w %argw1, w %argw2, w %argw3, w %argw4, w %a
# int print(char *fmt, va_list *ap) {
#    return vprintf(fmt, *ap);
# }
# int main() {
# int main(void) {
# 	puts("# (0 int, 0 double)");
# 	qbeprint0("%d \n", 3);
# 	qbecall0("%d \n", 3);
diff --git a/tools/callgen.ml b/tools/callgen.ml
index d53eabb..2616c1c 100644
--- a/tools/callgen.ml
+++ b/tools/callgen.ml
@@ -268,7 +268,7 @@ module OutC = struct
      typedef oc (argname i) arg;
    ) args;
    proto oc ret args;
    fprintf oc ";\n\nint main()\n{\n";
    fprintf oc ";\n\nint main(void)\n{\n";
    List.iteri (fun i arg ->
      fprintf oc "\t";
      init oc (argname i) arg;
diff --git a/tools/lexh.c b/tools/lexh.c
index 1b4a7fb..58d0567 100644
--- a/tools/lexh.c
+++ b/tools/lexh.c
@@ -50,7 +50,7 @@ hash(char *s)
}

int
main()
main(void)
{
	char *bmap;
	uint32_t h, M, K;
diff --git a/tools/pmov.c b/tools/pmov.c
index ffc38ea..680adc2 100644
--- a/tools/pmov.c
+++ b/tools/pmov.c
@@ -22,7 +22,7 @@ static Ins ins[NIReg], *ip;
static Blk dummyb = { .ins = ins };

int
main()
main(void)
{
	Ins *i1;
	unsigned long long tm, rm, cnt;
@@ -208,7 +208,7 @@ iexec(int val[])
static int re;

static void
replay()
replay(void)
{
	RMap mend;

@@ -219,7 +219,7 @@ replay()
}

static void
fail()
fail(void)
{
	Ins *i1;
	int i;
diff --git a/tools/vatest.py b/tools/vatest.py
index 1a1f199..b39dd63 100644
--- a/tools/vatest.py
+++ b/tools/vatest.py
@@ -80,7 +80,7 @@ def gendriver():
	print('# int print(char *fmt, va_list *ap) {')
	print('#    return vprintf(fmt, *ap);');
	print('# }')
	print('# int main() {')
	print('# int main(void) {')

	for fnum, (nia, nfa) in enumerate(generate):
		info = '# ({} int, {} double)'.format(nia, nfa)
diff --git a/util.c b/util.c
index 362fa98..63d2e05 100644
--- a/util.c
+++ b/util.c
@@ -90,7 +90,7 @@ alloc(size_t n)
}

void
freeall()
freeall(void)
{
	void **pp;

-- 
2.43.0
Thanks for your interest in qbe!

C99 in section 6.7.5.3 (Function declarators) paragraph 14
specifies that:
That is why qbe only uses void for parameters in declarators
not parts of definitions.

I will not be merging this patch as it would pollute the
history and has no operational consequences.

Cheers.