mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
Build: Fix warnings found with static analysis
This commit is contained in:
parent
f3b092dfe7
commit
d0e2c8ee9b
@ -664,6 +664,7 @@ InternalGetDefaultBootEntry (
|
||||
&DeviceHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
BootEntry = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@ -588,6 +588,8 @@ DTDeleteProperty (
|
||||
CHAR8 *DeviceTreeEnd;
|
||||
UINT32 DeleteLength;
|
||||
|
||||
ASSERT (mDTLength != NULL);
|
||||
|
||||
PropIter = &mOpaquePropIter;
|
||||
DeletePosition = NULL;
|
||||
DeviceTreeEnd = (CHAR8 *) mDTRootNode + *mDTLength;
|
||||
@ -603,9 +605,7 @@ DTDeleteProperty (
|
||||
//
|
||||
// Adjust Device Tree Length.
|
||||
//
|
||||
if (mDTLength != NULL) {
|
||||
*mDTLength -= DeleteLength;
|
||||
}
|
||||
*mDTLength -= DeleteLength;
|
||||
|
||||
//
|
||||
// Delete Property.
|
||||
@ -656,6 +656,8 @@ DTInsertProperty (
|
||||
CHAR8 *DeviceTreeEnd;
|
||||
CHAR8 *InsertPosition;
|
||||
|
||||
ASSERT (mDTLength != NULL);
|
||||
|
||||
PropIter = &mOpaquePropIter;
|
||||
EntryLength = ALIGN_VALUE (ValueLength, sizeof (UINT32));
|
||||
DeviceTree = NULL;
|
||||
@ -707,9 +709,7 @@ DTInsertProperty (
|
||||
//
|
||||
// Adjust Length.
|
||||
//
|
||||
if (mDTLength != NULL) {
|
||||
*mDTLength += sizeof (DTProperty) + EntryLength;
|
||||
}
|
||||
*mDTLength += sizeof (DTProperty) + EntryLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ OcLoadDrivers (
|
||||
//
|
||||
// Driver connection list should be null-terminated.
|
||||
//
|
||||
if (*DriversToConnectIterator != NULL) {
|
||||
if (DriversToConnectIterator != NULL) {
|
||||
*DriversToConnectIterator = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user