mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-05 19:08:41 +08:00
tccgen: Avoid warnings in callers of the type_size() function.
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 <wine.dev@web.de>
This commit is contained in:
parent
ecf8e5a00e
commit
ac42d6826b
1
tccgen.c
1
tccgen.c
@ -3897,6 +3897,7 @@ ST_FUNC int type_size(CType *type, int *a)
|
|||||||
return PTR_SIZE;
|
return PTR_SIZE;
|
||||||
}
|
}
|
||||||
} else if (IS_ENUM(type->t) && type->ref->c < 0) {
|
} else if (IS_ENUM(type->t) && type->ref->c < 0) {
|
||||||
|
*a = 0;
|
||||||
return -1; /* incomplete enum */
|
return -1; /* incomplete enum */
|
||||||
} else if (bt == VT_LDOUBLE) {
|
} else if (bt == VT_LDOUBLE) {
|
||||||
*a = LDOUBLE_ALIGN;
|
*a = LDOUBLE_ALIGN;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user