Skip to content

Commit

Permalink
RedfishPkg: add explicit variable initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ghbaccount authored and mergify[bot] committed Nov 30, 2023
1 parent ed923af commit b4f8c75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions RedfishPkg/Library/HiiUtilityLib/HiiUtilityInternal.c
Original file line number Diff line number Diff line change
Expand Up @@ -5451,6 +5451,7 @@ GetQuestionDefault (

Status = EFI_NOT_FOUND;
StrValue = NULL;
ConfigAccess = NULL;
OriginalDefaultId = DefaultId;
DefaultLink = GetFirstNode (&FormSet->DefaultStoreListHead);

Expand Down

0 comments on commit b4f8c75

Please sign in to comment.