if (CR_SUCCESS != ret)
{
- KHR_ICD_TRACE("Failed with ret 0x%x\n", ret);
+ KHR_ICD_TRACE("Failed with ret 0x%"PRIxDW"\n", ret);
goto out;
}
else
if (ERROR_SUCCESS != result)
{
- KHR_ICD_TRACE("Failed to open sub key 0x%x\n", result);
+ KHR_ICD_TRACE("Failed to open sub key 0x%"PRIxDW"\n", result);
goto out;
}
cszOclPath = malloc(dwOclPathSize);
if (NULL == cszOclPath)
{
- KHR_ICD_TRACE("Failed to allocate %u bytes for registry value\n", dwOclPathSize);
+ KHR_ICD_TRACE("Failed to allocate %"PRIuDW" bytes for registry value\n", dwOclPathSize);
goto out;
}
&dwOclPathSize);
if (ERROR_SUCCESS != result)
{
- KHR_ICD_TRACE("Failed to open sub key 0x%x\n", result);
+ KHR_ICD_TRACE("Failed to open sub key 0x%"PRIxDW"\n", result);
goto out;
}
}
else
{
- KHR_ICD_TRACE("Unexpected registry entry 0x%x! continuing\n", dwLibraryNameType);
+ KHR_ICD_TRACE("Unexpected registry entry 0x%"PRIxDW"! continuing\n", dwLibraryNameType);
goto out;
}
}
result = RegCloseKey(hkey);
if (ERROR_SUCCESS != result)
{
- KHR_ICD_TRACE("WARNING: failed to close hkey 0x%x\n", result);
+ KHR_ICD_TRACE("WARNING: failed to close hkey 0x%"PRIxDW"\n", result);
}
}
if (CR_SUCCESS != ret)
{
- KHR_ICD_TRACE(" WARNING: failed to probe the status of the device 0x%x\n", ret);
+ KHR_ICD_TRACE(" WARNING: failed to probe the status of the device 0x%"PRIxDW"\n", ret);
return ProbeFailure;
}
if (((ulStatus & DN_HAS_PROBLEM) && ulProblem == CM_PROB_NEED_RESTART) ||
ulStatus & DN_NEED_RESTART)
{
- KHR_ICD_TRACE(" WARNING: device is pending reboot (0x%x), skipping...\n", ulStatus);
+ KHR_ICD_TRACE(" WARNING: device is pending reboot (0x%" PRIxUL "), skipping...\n", ulStatus);
return PendingReboot;
}
if (CR_SUCCESS != ret)
{
- KHR_ICD_TRACE("CM_Get_Device_ID_List_size failed with 0x%x\n", ret);
+ KHR_ICD_TRACE("CM_Get_Device_ID_List_size failed with 0x%"PRIxDW"\n", ret);
break;
}
deviceIdList = malloc(szBuffer * sizeof(wchar_t));
if (NULL == deviceIdList)
{
- KHR_ICD_TRACE("Failed to allocate %u bytes for device ID strings\n", szBuffer);
+ KHR_ICD_TRACE("Failed to allocate %" PRIuUL " bytes for device ID strings\n", szBuffer);
break;
}
if (CR_SUCCESS != ret)
{
- KHR_ICD_TRACE("CM_Get_Device_ID_List failed with 0x%x\n", ret);
+ KHR_ICD_TRACE("CM_Get_Device_ID_List failed with 0x%"PRIxDW"\n", ret);
KHR_SAFE_RELEASE(deviceIdList);
}
} while (CR_BUFFER_SMALL == ret);
ret = CM_Locate_DevNodeW(&devinst, deviceId, 0);
if (CR_SUCCESS == ret)
{
- KHR_ICD_TRACE(" devinst: %d\n", devinst);
+ KHR_ICD_TRACE(" devinst: %lu\n", devinst);
}
else
{
- KHR_ICD_TRACE("CM_Locate_DevNode failed with 0x%x\n", ret);
+ KHR_ICD_TRACE("CM_Locate_DevNode failed with 0x%"PRIxDW"\n", ret);
continue;
}
if (CR_SUCCESS != ret)
{
- KHR_ICD_TRACE(" CM_Get_Child returned 0x%x, skipping children...\n", ret);
+ KHR_ICD_TRACE(" CM_Get_Child returned 0x%"PRIxDW", skipping children...\n", ret);
}
else
{
GUID guid;
ULONG szGuid = sizeof(guid);
- KHR_ICD_TRACE(" devchild: %d\n", devchild);
+ KHR_ICD_TRACE(" devchild: %lu\n", devchild);
ret = CM_Get_Device_IDW(
devchild,
deviceInstanceID,
if (CR_SUCCESS != ret)
{
- KHR_ICD_TRACE(" CM_Get_Device_ID returned 0x%x, skipping device...\n", ret);
+ KHR_ICD_TRACE(" CM_Get_Device_ID returned 0x%"PRIxDW", skipping device...\n", ret);
continue;
}
else