From ac42d6826b604f438f8c1cfa45317db889eef7d7 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Tue, 12 Apr 2022 01:30:44 +0200 Subject: [PATCH] tccgen: Avoid warnings in callers of the type_size() function. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Warnings reported in in x86_64-gen.c and arm-gen.c: warning: ‘align’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: Detlef Riekenberg --- tccgen.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tccgen.c b/tccgen.c index 185fdf27..ed417768 100644 --- a/tccgen.c +++ b/tccgen.c @@ -3897,6 +3897,7 @@ ST_FUNC int type_size(CType *type, int *a) return PTR_SIZE; } } else if (IS_ENUM(type->t) && type->ref->c < 0) { + *a = 0; return -1; /* incomplete enum */ } else if (bt == VT_LDOUBLE) { *a = LDOUBLE_ALIGN;