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:
parent
b74d2b77d2
commit
ecbca16bf4
3 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1246,7 +1246,7 @@ static void wifi_ssdt_write_properties(const struct device *dev, const char *sco
|
|||
struct dsm_uuid dsm_ids[MAX_DSM_FUNCS];
|
||||
|
||||
/* Retrieve the SAR limits data */
|
||||
union wifi_sar_limits sar_limits = {0};
|
||||
union wifi_sar_limits sar_limits = {};
|
||||
bool sar_loaded = false;
|
||||
if (CONFIG(USE_SAR)) {
|
||||
if (get_wifi_sar_limits(&sar_limits) < 0)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue