Skip to content

Commit 5f84a1b

Browse files
committed
UefiPayloadPkg: Remove unused variable to fix build error
Variable ChildBusAddress is not used in function ParsePciRootBridge, it triggers build error on GCC version gcc version 13.3.0. Remove this variable to fix build error. Signed-off-by: Ajan Zhong <[email protected]>
1 parent bad6153 commit 5f84a1b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

UefiPayloadPkg/Library/FdtParserLib/FdtParserLib.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -841,21 +841,9 @@ ParsePciRootBridge (
841841
UINT32 TripletCells = ChildAddrCells + ParentAddrCells + SizeCells;
842842

843843
for (Base = 0; Base < TempLen / sizeof (UINT32); Base = Base + TripletCells) {
844-
UINT64 ChildBusAddress = 0;
845844
UINT64 ParentBusAddress = 0;
846845
UINT64 DmaRangeSize = 0;
847-
848-
if (ChildAddrCells == 3) {
849-
ChildBusAddress = (UINT64)Fdt32ToCpu (*(Data32 + Base + 1)) << 32 |
850-
(UINT64)Fdt32ToCpu (*(Data32 + Base + 2));
851-
} else if (ChildAddrCells == 2) {
852-
ChildBusAddress = (UINT64)Fdt32ToCpu (*(Data32 + Base)) << 32 |
853-
(UINT64)Fdt32ToCpu (*(Data32 + Base + 1));
854-
} else if (ChildAddrCells == 1) {
855-
ChildBusAddress = Fdt32ToCpu (*(Data32 + Base));
856-
}
857-
858-
UINT32 ParentBase = Base + ChildAddrCells;
846+
UINT32 ParentBase = Base + ChildAddrCells;
859847
if (ParentAddrCells == 2) {
860848
ParentBusAddress = (UINT64)Fdt32ToCpu (*(Data32 + ParentBase)) << 32 |
861849
(UINT64)Fdt32ToCpu (*(Data32 + ParentBase + 1));

0 commit comments

Comments
 (0)