Print size_t variables with %zu

Change-Id: I02bb073b07e9efd03dea2b76b6ba1bd2f552bcaa
Total Memory is not being printed correctly with %u.
%zu represents size_t variables appropriately.
Этот коммит содержится в:
Satyanvesh Dittakavi
2020-09-17 10:43:53 +00:00
родитель e955144aa3
Коммит cede497cb2
+1 -1
Просмотреть файл
@@ -124,7 +124,7 @@ hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
if (*ptr == nullptr) {
size_t free = 0, total =0;
hipMemGetInfo(&free, &total);
LogPrintfError("Allocation failed : Device memory : required :%u | free :%u | total :%u \n", sizeBytes, free, total);
LogPrintfError("Allocation failed : Device memory : required :%zu | free :%zu | total :%zu \n", sizeBytes, free, total);
return hipErrorOutOfMemory;
}