diff options
author | Michael Forney <mforney@mforney.org> | 2019-02-15 16:28:58 -0800 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-02-15 16:50:21 -0800 |
commit | d31d1b2b20291ef8bceaf17444843b11558a3c25 (patch) | |
tree | af1a250552fc2aebf9352c1b469dc0b7602e80f3 | |
parent | 848325a5b189a9e5e30a16a268909cd4037343ce (diff) | |
download | cproc-d31d1b2b20291ef8bceaf17444843b11558a3c25.tar.xz |
Fix some potential uninitialized fields
-rw-r--r-- | init.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -130,6 +130,7 @@ designator(struct scope *s, struct initparser *p) fatal("internal error: too many designators"); p->sub->type = t; p->sub->offset = offset; + p->sub->iscur = false; } } @@ -159,6 +160,7 @@ focus(struct initparser *p) fatal("internal error: too many designators"); p->sub->type = typeunqual(t, NULL); p->sub->offset = offset; + p->sub->iscur = false; } static void @@ -197,6 +199,7 @@ done: ++p->sub; p->sub->type = typeunqual(t, NULL); p->sub->offset = offset; + p->sub->iscur = false; } /* 6.7.9 Initialization */ @@ -212,6 +215,7 @@ parseinit(struct scope *s, struct type *t) p.sub = p.obj; p.sub->offset = 0; p.sub->type = typeunqual(t, NULL); + p.sub->iscur = false; for (;;) { if (p.cur) { if (tok.kind == TLBRACK || tok.kind == TPERIOD) |