diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2017-05-25 20:11:04 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2017-05-25 20:11:04 +0000 |
commit | 49980273ebcb16755542606ba7959bca0fd4821f (patch) | |
tree | c064a7addcbc564b90dcd01804a3e7a26dcb3465 /usr.bin/yacc/lalr.c | |
parent | ab69dce588018883bcb73ed04813b42eb2cf6c25 (diff) |
fix a variety of warnings. from Brian Callahan
Diffstat (limited to 'usr.bin/yacc/lalr.c')
-rw-r--r-- | usr.bin/yacc/lalr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c index 42b88b4a76f..86874077ec3 100644 --- a/usr.bin/yacc/lalr.c +++ b/usr.bin/yacc/lalr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lalr.c,v 1.18 2015/12/11 20:25:47 mmcc Exp $ */ +/* $OpenBSD: lalr.c,v 1.19 2017/05/25 20:11:03 tedu Exp $ */ /* $NetBSD: lalr.c,v 1.4 1996/03/19 03:21:33 jtc Exp $ */ /* @@ -52,7 +52,7 @@ short *goto_map; short *from_state; short *to_state; -short **transpose(); +short **transpose(short **, int); void set_state_table(void); void set_accessing_symbol(void); void set_shift_table(void); @@ -448,7 +448,7 @@ add_lookback_edge(int stateno, int ruleno, int gotono) short ** -transpose(short **R, int n) +transpose(short **old_R, int n) { short **new_R, **temp_R, *nedges, *sp; int i, k; @@ -456,7 +456,7 @@ transpose(short **R, int n) nedges = NEW2(n, short); for (i = 0; i < n; i++) { - sp = R[i]; + sp = old_R[i]; if (sp) { while (*sp >= 0) nedges[*sp++]++; @@ -479,7 +479,7 @@ transpose(short **R, int n) free(nedges); for (i = 0; i < n; i++) { - sp = R[i]; + sp = old_R[i]; if (sp) { while (*sp >= 0) *temp_R[*sp++]++ = i; |