Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
benbaker76 committed Aug 27, 2019
1 parent fee77d6 commit 82205e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ void getPCIParentDevicePaths(io_service_t device, io_string_t deviceName, io_str
const char *deviceLocation = NULL, *functionLocation = NULL;
unsigned int deviceInt = 0, functionInt = 0;

kr = IORegistryEntryGetName(parentDevice, name);
IORegistryEntryGetName(parentDevice, name);
kr = IORegistryEntryGetLocationInPlane(parentDevice, kIODeviceTreePlane, locationInPlane);

if (kr == KERN_SUCCESS)
Expand Down Expand Up @@ -1144,17 +1144,17 @@ void getPCIRootDevicePath(io_service_t device, io_string_t deviceName, io_string
io_struct_inband_t pnp = {0}, uid = {0};
uint32_t size = sizeof(uid);

kr = IORegistryEntryGetName(parentDevice, name);
IORegistryEntryGetName(parentDevice, name);

kr = IORegistryEntryGetProperty(parentDevice, "_UID", uid, &size);
IORegistryEntryGetProperty(parentDevice, "_UID", uid, &size);

size = sizeof(pnp);
kr = IORegistryEntryGetProperty(parentDevice, "compatible", pnp, &size);

if (kr != KERN_SUCCESS)
{
size = sizeof(pnp);
kr = IORegistryEntryGetProperty(parentDevice, "name", pnp, &size);
IORegistryEntryGetProperty(parentDevice, "name", pnp, &size);
}

unsigned int uidInt = (unsigned int)strtol(uid, NULL, 16);
Expand Down

0 comments on commit 82205e5

Please sign in to comment.