cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit afec5b75259f1a1110ef4a0df6c697f9b999d265
parent 098957b65500aa13005c540cf33a6e28c71cb153
Author: Michael Forney <mforney@mforney.org>
Date:   Mon, 15 Apr 2019 23:19:41 -0700

Silence gcc warning

Diffstat:
Mdecl.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/decl.c b/decl.c @@ -656,6 +656,8 @@ addmember(struct structbuilder *b, struct qualtype mt, char *name, int align, ui m->next = NULL; *b->last = m; b->last = &m->next; + } else { + m = NULL; } if (width == -1) { m->bits.before = 0; @@ -687,7 +689,7 @@ addmember(struct structbuilder *b, struct qualtype mt, char *name, int align, ui t->size = end; b->bits = 0; } - if (name) { + if (m) { m->offset = ALIGNDOWN(t->size - !!b->bits, mt.type->size); m->bits.before = (t->size - m->offset) * 8 - b->bits; m->bits.after = mt.type->size * 8 - width - m->bits.before;