tree: Replace union {0} initializers with {} for C23 compliance

This change addresses GCC-15 behavior where {0} union initializers only
clear the first member, leaving padding bits uninitialized. The new {}
initializer ensures full union clearing as required by C23.

Change-Id: I1d9b063d8bdd3d2f0b0f67e6c20eb484ff6a5cc5
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88732
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Elyes Haouas 2025-08-09 09:59:33 +02:00
commit ecbca16bf4
3 changed files with 3 additions and 3 deletions

View file

@ -88,7 +88,7 @@ void setdosmemword(int offset, unsigned short w)
void PDC_dpmi_int(int vector, pdc_dpmi_regs *rmregs)
{
union REGPACK regs = {0};
union REGPACK regs = {};
rmregs->w.ss = 0;
rmregs->w.sp = 0;