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

@ -356,7 +356,7 @@ static void dptx_set_tu(struct mtk_dp *mtk_dp)
static void dptx_set_misc(struct mtk_dp *mtk_dp)
{
u8 format, depth;
union misc_t dptx_misc = { .cmisc = {0} };
union misc_t dptx_misc = { .cmisc = {} };
format = mtk_dp->info.format;
depth = mtk_dp->info.depth;