summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/yacc/closure.c8
-rw-r--r--usr.bin/yacc/mkpar.c4
-rw-r--r--usr.bin/yacc/output.c8
-rw-r--r--usr.bin/yacc/reader.c6
-rw-r--r--usr.bin/yacc/skeleton.c6
-rw-r--r--usr.bin/yacc/symtab.c6
-rw-r--r--usr.bin/yacc/verbose.c6
7 files changed, 22 insertions, 22 deletions
diff --git a/usr.bin/yacc/closure.c b/usr.bin/yacc/closure.c
index 18c783f410c..fcd887afc27 100644
--- a/usr.bin/yacc/closure.c
+++ b/usr.bin/yacc/closure.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: closure.c,v 1.7 2003/06/19 16:34:53 pvalchev Exp $ */
+/* $OpenBSD: closure.c,v 1.8 2005/06/10 16:40:45 pvalchev Exp $ */
/* $NetBSD: closure.c,v 1.4 1996/03/19 03:21:29 jtc Exp $ */
/*
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)closure.c 5.3 (Berkeley) 5/24/93";
#else
-static char rcsid[] = "$OpenBSD: closure.c,v 1.7 2003/06/19 16:34:53 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: closure.c,v 1.8 2005/06/10 16:40:45 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -95,7 +95,7 @@ set_first_derives(void)
unsigned *vrow;
int j;
unsigned k;
- unsigned cword;
+ unsigned cword = 0;
short *rp;
int rule;
@@ -271,7 +271,7 @@ print_first_derives(void)
int i;
int j;
unsigned *rp;
- unsigned cword;
+ unsigned cword = 0;
unsigned k;
printf("\n\n\nFirst Derives\n");
diff --git a/usr.bin/yacc/mkpar.c b/usr.bin/yacc/mkpar.c
index a09c7e7b6e3..f9d1112518b 100644
--- a/usr.bin/yacc/mkpar.c
+++ b/usr.bin/yacc/mkpar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkpar.c,v 1.12 2004/08/08 20:13:13 deraadt Exp $ */
+/* $OpenBSD: mkpar.c,v 1.13 2005/06/10 16:40:45 pvalchev Exp $ */
/* $NetBSD: mkpar.c,v 1.4 1996/03/19 03:21:39 jtc Exp $ */
/*
@@ -255,7 +255,7 @@ remove_conflicts(void)
{
int i;
int symbol;
- action *p, *pref;
+ action *p, *pref = NULL;
SRtotal = 0;
RRtotal = 0;
diff --git a/usr.bin/yacc/output.c b/usr.bin/yacc/output.c
index d2af288e72d..e47a51d232e 100644
--- a/usr.bin/yacc/output.c
+++ b/usr.bin/yacc/output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: output.c,v 1.13 2004/08/08 20:13:13 deraadt Exp $ */
+/* $OpenBSD: output.c,v 1.14 2005/06/10 16:40:45 pvalchev Exp $ */
/* $NetBSD: output.c,v 1.4 1996/03/19 03:21:41 jtc Exp $ */
/*
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)output.c 5.7 (Berkeley) 5/24/93";
#else
-static char rcsid[] = "$OpenBSD: output.c,v 1.13 2004/08/08 20:13:13 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: output.c,v 1.14 2005/06/10 16:40:45 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -891,7 +891,7 @@ is_C_identifier(char *name)
if (!isalpha(c) && c != '_' && c != '$')
return (0);
- while (c = *++s)
+ while ((c = *++s))
{
if (!isalnum(c) && c != '_' && c != '$')
return (0);
@@ -929,7 +929,7 @@ output_defines(void)
putc(c, code_file);
if (dflag) putc(c, defines_file);
}
- while (c = *++s);
+ while ((c = *++s));
}
++outline;
fprintf(code_file, " %d\n", symbol_value[i]);
diff --git a/usr.bin/yacc/reader.c b/usr.bin/yacc/reader.c
index 25c9da0bbf9..e9c9c5ab745 100644
--- a/usr.bin/yacc/reader.c
+++ b/usr.bin/yacc/reader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: reader.c,v 1.17 2004/08/08 20:13:13 deraadt Exp $ */
+/* $OpenBSD: reader.c,v 1.18 2005/06/10 16:40:45 pvalchev Exp $ */
/* $NetBSD: reader.c,v 1.5 1996/03/19 03:21:43 jtc Exp $ */
/*
@@ -1554,7 +1554,7 @@ int
mark_symbol(void)
{
int c;
- bucket *bp;
+ bucket *bp = NULL;
c = cptr[1];
if (c == '%' || c == '\\')
@@ -1878,7 +1878,7 @@ void
print_grammar(void)
{
int i, j, k;
- int spacing;
+ int spacing = 0;
FILE *f = verbose_file;
if (!vflag) return;
diff --git a/usr.bin/yacc/skeleton.c b/usr.bin/yacc/skeleton.c
index a6e17d47a22..168d6911456 100644
--- a/usr.bin/yacc/skeleton.c
+++ b/usr.bin/yacc/skeleton.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeleton.c,v 1.23 2004/03/12 13:39:50 henning Exp $ */
+/* $OpenBSD: skeleton.c,v 1.24 2005/06/10 16:40:45 pvalchev Exp $ */
/* $NetBSD: skeleton.c,v 1.10 1996/03/25 00:36:18 mrg Exp $ */
/*
@@ -63,7 +63,7 @@ char *banner[] =
"#if __GNUC__ >= 2",
" __attribute__ ((unused))",
"#endif /* __GNUC__ >= 2 */",
- " = \"$OpenBSD: skeleton.c,v 1.23 2004/03/12 13:39:50 henning Exp $\";",
+ " = \"$OpenBSD: skeleton.c,v 1.24 2005/06/10 16:40:45 pvalchev Exp $\";",
"#endif",
"#include <stdlib.h>",
"#define YYBYACC 1",
@@ -431,7 +431,7 @@ write_section(char *section[])
for (i = 0; (s = section[i]); ++i)
{
++outline;
- while (c = *s)
+ while ((c = *s))
{
putc(c, f);
++s;
diff --git a/usr.bin/yacc/symtab.c b/usr.bin/yacc/symtab.c
index 19f9a1700a5..a0004bd8584 100644
--- a/usr.bin/yacc/symtab.c
+++ b/usr.bin/yacc/symtab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: symtab.c,v 1.11 2003/08/12 04:51:44 millert Exp $ */
+/* $OpenBSD: symtab.c,v 1.12 2005/06/10 16:40:45 pvalchev Exp $ */
/* $NetBSD: symtab.c,v 1.4 1996/03/19 03:21:48 jtc Exp $ */
/*
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)symtab.c 5.3 (Berkeley) 6/1/90";
#else
-static char rcsid[] = "$OpenBSD: symtab.c,v 1.11 2003/08/12 04:51:44 millert Exp $";
+static char rcsid[] = "$OpenBSD: symtab.c,v 1.12 2005/06/10 16:40:45 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -65,7 +65,7 @@ hash(char *name)
assert(name && *name);
s = name;
k = *s;
- while (c = *++s)
+ while ((c = *++s))
k = (31*k + c) & (TABLE_SIZE - 1);
return (k);
diff --git a/usr.bin/yacc/verbose.c b/usr.bin/yacc/verbose.c
index eea46064322..7b2bd325c1d 100644
--- a/usr.bin/yacc/verbose.c
+++ b/usr.bin/yacc/verbose.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: verbose.c,v 1.8 2003/06/19 16:34:53 pvalchev Exp $ */
+/* $OpenBSD: verbose.c,v 1.9 2005/06/10 16:40:45 pvalchev Exp $ */
/* $NetBSD: verbose.c,v 1.4 1996/03/19 03:21:50 jtc Exp $ */
/*
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)verbose.c 5.3 (Berkeley) 1/20/91";
#else
-static char rcsid[] = "$OpenBSD: verbose.c,v 1.8 2003/06/19 16:34:53 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: verbose.c,v 1.9 2005/06/10 16:40:45 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -147,7 +147,7 @@ print_state(int state)
void
print_conflicts(int state)
{
- int symbol, act, number;
+ int symbol, act = REDUCE, number = 0;
action *p;
symbol = -1;