SWDEV-353807 - Fixes multiple catch issues (#2912)

- enforcing c++17 for all tests
- Warning as error: ignoring return value

Change-Id: I3d171540403f74222e631d1a8e393386461c9729
Tento commit je obsažen v:
ROCm CI Service Account authored and GitHub committed 2022-08-30 16:53:21 -07:00
1 rodič ba5a0b9af5
revize d0aaed906d
24 files changed
+100 -99

No files matched your search

+2 -2
Zobrazit soubor
@@ -246,7 +246,7 @@ static bool testDeviceMemMulProc(bool testmalloc) {
}
// close the read-descriptor
close(fd[0]);
hipFree(result_d);
HIP_CHECK(hipFree(result_d));
free(result_h);
// wait for child exit
wait(NULL);
@@ -279,7 +279,7 @@ static bool testDeviceMemMulProc(bool testmalloc) {
write(fd[1], result_h, sizeof(int));
// close the write descriptor:
close(fd[1]);
hipFree(result_d);
HIP_CHECK(hipFree(result_d));
free(result_h);
exit(0);
}
+3 -3
Zobrazit soubor
@@ -190,7 +190,7 @@ static bool validatePageTableAllocations(const char *devList, int visDevCnt) {
setenv("HIP_VISIBLE_DEVICES", devList, 1);
// First Call to initialize hip api
hipGetDeviceCount(&tmpdev);
HIP_CHECK(hipGetDeviceCount(&tmpdev));
// Get memory snapshot before hostmalloc
@@ -214,7 +214,7 @@ static bool validatePageTableAllocations(const char *devList, int visDevCnt) {
printf("Error while running rsmi_dev_memory_usage_get func\n");
dlclose(rocm_smi_h);
rsmi_shut_down_fp();
hipHostFree(ptr);
HIP_CHECK(hipHostFree(ptr));
return false;
}
current.push_back(used);
@@ -236,7 +236,7 @@ static bool validatePageTableAllocations(const char *devList, int visDevCnt) {
testPassed = false;
}
hipHostFree(ptr);
HIP_CHECK(hipHostFree(ptr));
// writing only, no need for read-descriptor
close(fd[0]);