summaryrefslogtreecommitdiff
path: root/usr.bin/xlint/lint1
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-07-29 03:14:55 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-07-29 03:14:55 +0000
commit8a4544d7b07dbd04fec43fa76036c656a86e1c21 (patch)
treeb8491b2d410dfd29c417ad2266816f23e66bd3f3 /usr.bin/xlint/lint1
parent9e18e7c3eac6333749d0171464db0c5607336c9a (diff)
fix some initialization; ITOH Yasufumi <yasufu-i@is.aist-nara.ac.jp>
Diffstat (limited to 'usr.bin/xlint/lint1')
-rw-r--r--usr.bin/xlint/lint1/decl.c8
-rw-r--r--usr.bin/xlint/lint1/tree.c15
2 files changed, 12 insertions, 11 deletions
diff --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c
index 5524f95d53c..ef9c2f6434b 100644
--- a/usr.bin/xlint/lint1/decl.c
+++ b/usr.bin/xlint/lint1/decl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: decl.c,v 1.3 1998/07/27 16:53:39 deraadt Exp $ */
+/* $OpenBSD: decl.c,v 1.4 1998/07/29 03:14:48 millert Exp $ */
/* $NetBSD: decl.c,v 1.11 1995/10/02 17:34:16 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: decl.c,v 1.3 1998/07/27 16:53:39 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: decl.c,v 1.4 1998/07/29 03:14:48 millert Exp $";
#endif
#include <sys/param.h>
@@ -1427,7 +1427,7 @@ sym_t *
dname(sym)
sym_t *sym;
{
- scl_t sc;
+ scl_t sc = NOSCL;
if (sym->s_scl == NOSCL) {
dcs->d_rdcsym = NULL;
@@ -1557,7 +1557,7 @@ mktag(tag, kind, decl, semi)
tspec_t kind;
int decl, semi;
{
- scl_t scl;
+ scl_t scl = NOSCL;
type_t *tp;
if (kind == STRUCT) {
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c
index 8f3ed920dfb..e9b3f3c475c 100644
--- a/usr.bin/xlint/lint1/tree.c
+++ b/usr.bin/xlint/lint1/tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tree.c,v 1.3 1998/07/27 16:53:41 deraadt Exp $ */
+/* $OpenBSD: tree.c,v 1.4 1998/07/29 03:14:50 millert Exp $ */
/* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: tree.c,v 1.3 1998/07/27 16:53:41 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: tree.c,v 1.4 1998/07/29 03:14:50 millert Exp $";
#endif
#include <stdlib.h>
@@ -769,7 +769,8 @@ typeok(op, arg, ln, rn)
tnode_t *ln, *rn;
{
mod_t *mp;
- tspec_t lt, rt, lst, rst, olt, ort;
+ tspec_t lt, rt = NOTSPEC, lst = NOTSPEC, rst = NOTSPEC,
+ olt = NOTSPEC, ort = NOTSPEC;
type_t *ltp, *rtp, *lstp, *rstp;
tnode_t *tn;
@@ -1194,7 +1195,7 @@ asgntypok(op, arg, ln, rn)
int arg;
tnode_t *ln, *rn;
{
- tspec_t lt, rt, lst, rst;
+ tspec_t lt, rt, lst = NOTSPEC, rst = NOTSPEC;
type_t *ltp, *rtp, *lstp, *rstp;
mod_t *mp;
const char *lts, *rts;
@@ -1647,7 +1648,7 @@ convert(op, arg, tp, tn)
tnode_t *tn;
{
tnode_t *ntn;
- tspec_t nt, ot, ost;
+ tspec_t nt, ot, ost = NOTSPEC;
if (tn->tn_lvalue)
lerror("convert() 1");
@@ -1889,7 +1890,7 @@ cvtcon(op, arg, tp, nv, v)
val_t *nv, *v;
{
tspec_t ot, nt;
- ldbl_t max, min;
+ ldbl_t max = 0, min = 0;
int sz, rchk;
quad_t xmask, xmsk1;
int osz, nsz;
@@ -3854,7 +3855,7 @@ precconf(tn)
tnode_t *tn;
{
tnode_t *ln, *rn;
- op_t lop, rop;
+ op_t lop, rop = NOOP;
int lparn, rparn;
mod_t *mp;
int warn;