summaryrefslogtreecommitdiff
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2005-12-03 01:14:40 +0000
committerChad Loder <cloder@cvs.openbsd.org>2005-12-03 01:14:40 +0000
commit8923906e58f0f0b670a46b57f89eaad32013a912 (patch)
tree6357626d2aaf79570b10141b044a882421956222 /usr.bin/xlint
parentb9cba617f4250d0350d5dae64ba6254959691ea5 (diff)
Fix enum types, thanks lint
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/lint1/lint1.h4
-rw-r--r--usr.bin/xlint/lint1/scan.l11
2 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/xlint/lint1/lint1.h b/usr.bin/xlint/lint1/lint1.h
index 38478f01b56..c103e1904ec 100644
--- a/usr.bin/xlint/lint1/lint1.h
+++ b/usr.bin/xlint/lint1/lint1.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lint1.h,v 1.6 2005/12/03 00:27:54 cloder Exp $ */
+/* $OpenBSD: lint1.h,v 1.7 2005/12/03 01:14:39 cloder Exp $ */
/* $NetBSD: lint1.h,v 1.6 1995/10/02 17:31:41 jpo Exp $ */
/*
@@ -227,7 +227,7 @@ typedef struct sym {
enum_t *_s_et; /* tag, if it is a enumerator */
tspec_t _s_tsp; /* type (only for keywords) */
tqual_t _s_tqu; /* qualifier (only for keywords) */
- tqual_t _s_att; /* attribute (only for keywords) */
+ attr_t _s_att; /* attribute (only for keywords) */
struct sym *_s_args; /* arguments in old style function
definitions */
} u;
diff --git a/usr.bin/xlint/lint1/scan.l b/usr.bin/xlint/lint1/scan.l
index 3b0ee0ed0b7..d8022f1235d 100644
--- a/usr.bin/xlint/lint1/scan.l
+++ b/usr.bin/xlint/lint1/scan.l
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: scan.l,v 1.19 2005/12/03 00:27:54 cloder Exp $ */
+/* $OpenBSD: scan.l,v 1.20 2005/12/03 01:14:39 cloder Exp $ */
/* $NetBSD: scan.l,v 1.8 1995/10/23 13:38:51 jpo Exp $ */
/*
@@ -34,7 +34,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: scan.l,v 1.19 2005/12/03 00:27:54 cloder Exp $";
+static char rcsid[] = "$OpenBSD: scan.l,v 1.20 2005/12/03 01:14:39 cloder Exp $";
#endif
#include <stdlib.h>
@@ -185,7 +185,7 @@ static struct kwtab {
tspec_t kw_tspec; /* type spec. if kw_token T_TYPE or T_SOU */
tqual_t kw_tqual; /* type qual. if kw_token T_QUAL */
attr_t kw_attr; /* attribute spec. if kw_token T_ATTR */
- };
+ } kw_u;
u_int kw_stdc : 1; /* STDC keyword */
u_int kw_gcc : 1; /* GCC keyword */
} kwtab[] = {
@@ -242,6 +242,11 @@ static struct kwtab {
{ NULL, 0, { 0 }, 0, 0 }
};
+#define kw_scl kw_u.kw_scl
+#define kw_tspec kw_u.kw_tspec
+#define kw_tqual kw_u.kw_tqual
+#define kw_attr kw_u.kw_attr
+
/* Symbol table */
static sym_t *symtab[HSHSIZ1];