summaryrefslogtreecommitdiffstats
path: root/RedfishPkg
diff options
context:
space:
mode:
authorMike Maslenkin <mike.maslenkin@gmail.com>2023-11-06 05:15:07 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-11-30 07:10:34 +0000
commitb4f8c75e316e74750d5806b8ebf2bd11a3d62626 (patch)
tree51226e7e40896e1b2f32b4e03a399362e0c963d7 /RedfishPkg
parented923afda5180832cb8a6e0f102c8d0aaef3964a (diff)
downloadedk2-b4f8c75e316e74750d5806b8ebf2bd11a3d62626.tar.gz
edk2-b4f8c75e316e74750d5806b8ebf2bd11a3d62626.tar.bz2
edk2-b4f8c75e316e74750d5806b8ebf2bd11a3d62626.zip
RedfishPkg: add explicit variable initialization
Ancient GCC 4.8.5 warned about variable may be unitialied. And it doesn't look like false alarm. The warning is: edk2/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c: In function 'GetQuestionDefault': edk2/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c:5519:6: error: 'ConfigAccess' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (ConfigAccess != NULL) { Cc: Abner Chang <abner.chang@amd.com> Cc: Igor Kulchytskyy <igork@ami.com> Reviewed-by: Nickle Wang <nicklew@nvidia.com> Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Diffstat (limited to 'RedfishPkg')
-rw-r--r--RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c b/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c
index 80b93beae9..b61b7f5fcd 100644
--- a/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c
+++ b/RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c
@@ -5451,6 +5451,7 @@ GetQuestionDefault (
Status = EFI_NOT_FOUND;
StrValue = NULL;
+ ConfigAccess = NULL;
OriginalDefaultId = DefaultId;
DefaultLink = GetFirstNode (&FormSet->DefaultStoreListHead);