fix(intel): fix variable may be used uninitialized error
When building with LTO, the compiler can correctly see that there are
code paths that can lead to a variable used without it being written to.
Give these variables a starting value of 0 as a reasonable default
if/when this happens and to make the compiler happy.
Change-Id: I1d1efdbc59945d15a18fb3cfd498061eb681e5f9
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
diff --git a/plat/intel/soc/common/socfpga_sip_svc.c b/plat/intel/soc/common/socfpga_sip_svc.c
index ff19e23..cbb366e 100644
--- a/plat/intel/soc/common/socfpga_sip_svc.c
+++ b/plat/intel/soc/common/socfpga_sip_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2023, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2019-2025, Arm Limited and Contributors. All rights reserved.
* Copyright (c) 2019-2023, Intel Corporation. All rights reserved.
* Copyright (c) 2024-2025, Altera Corporation. All rights reserved.
*
@@ -1941,7 +1941,7 @@
uint32_t seu_respbuf[3];
int status = INTEL_SIP_SMC_STATUS_OK;
int mbox_status;
- unsigned int len_in_resp;
+ unsigned int len_in_resp = 0;
u_register_t x5, x6, x7;
switch (smc_fid) {