Skip to content

Commit

Permalink
SWDEV-406099 - fix zero-length gnu_printf format warning in linux PSD…
Browse files Browse the repository at this point in the history
…B logs (#3262)

Change-Id: I71ca50a11a83e57d4b8d41c225a55e5138e55731
  • Loading branch information
rocm-ci authored Jun 16, 2023
1 parent d21183c commit e8437f6
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions tests/src/runtimeApi/cooperativeGrps/api_failure_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static inline void hipCheckAndFail(hipError_t errval,
std::cerr << "hip error: " << hipGetErrorString(errval);
std::cerr << std::endl;
std::cerr << " Location: " << file << ":" << line << std::endl;
failed("");
failed("\n");
}
if (last_err != errval) {
std::cerr << "Error: the return value of a function was not the same ";
Expand All @@ -70,7 +70,7 @@ static inline void hipCheckAndFail(hipError_t errval,
std::cerr << " (" << errval << ")" << std::endl;
std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err);
std::cerr << " (" << last_err << ")" << std::endl;
failed("");
failed("\n");
}
}
#define hipCheckErr(errval) \
Expand Down Expand Up @@ -180,7 +180,7 @@ int main(int argc, char** argv) {
std::cerr << "to work on the device." << std::endl;
std::cerr << "This is incorrect, and could possibly lead users ";
std::cerr << "to try to launch kernels that will fail." << std::endl;
//failed("");
//failed("\n");
FailFlag = 1;
break;
}
Expand Down Expand Up @@ -279,7 +279,7 @@ int main(int argc, char** argv) {
for (int m = 0; m < 2; ++m) {
HIPCHECK(hipFree(dev_array[m]));
}
failed("");
failed("\n");
}
}
passed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static inline void hipCheckAndFail(hipError_t errval,
std::cerr << " (" << errval << ")" << std::endl;
std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err);
std::cerr << " (" << last_err << ")" << std::endl;
failed("");
failed("\n");
}
}
#define hipCheckErr(errval)\
Expand Down Expand Up @@ -298,6 +298,6 @@ int main(int argc, char** argv) {
if (!flag) {
passed();
} else {
failed("");
failed("\n");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static inline void hipCheckAndFail(hipError_t errval,
std::cerr << "hip error: " << hipGetErrorString(errval);
std::cerr << std::endl;
std::cerr << " Location: " << file << ":" << line << std::endl;
failed("");
failed("\n");
}
if (last_err != errval) {
std::cerr << "Error: the return value of a function was not the same ";
Expand All @@ -64,7 +64,7 @@ static inline void hipCheckAndFail(hipError_t errval,
std::cerr << " (" << errval << ")" << std::endl;
std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err);
std::cerr << " (" << last_err << ")" << std::endl;
failed("");
failed("\n");
}
}
#define hipCheckErr(errval) \
Expand Down Expand Up @@ -580,7 +580,7 @@ int main(int argc, char** argv) {
}
}
if (FailFlag == 1) {
failed("");
failed("\n");
} else {
passed();
}
Expand Down
8 changes: 4 additions & 4 deletions tests/src/runtimeApi/cooperativeGrps/multi_gpu_streams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static inline void hipCheckAndFail(hipError_t errval,
std::cerr << "hip error: " << hipGetErrorString(errval);
std::cerr << std::endl;
std::cerr << " Location: " << file << ":" << line << std::endl;
failed("");
failed("\n");
}
if (last_err != errval) {
std::cerr << "Error: the return value of a function was not the same ";
Expand All @@ -107,7 +107,7 @@ static inline void hipCheckAndFail(hipError_t errval,
std::cerr << " (" << errval << ")" << std::endl;
std::cerr << "hipGetLastError() returned: " << hipGetErrorString(last_err);
std::cerr << " (" << last_err << ")" << std::endl;
failed("");
failed("\n");
}
}
#define hipCheckErr(errval) \
Expand Down Expand Up @@ -312,7 +312,7 @@ int main(int argc, char** argv) {
std::cerr << std::endl;
std::cerr << "You requested " << desired_blocks << " but we can only ";
std::cerr << "fit " << (max_blocks_per_sm * num_sm) << std::endl;
failed("");
failed("\n");
}

/*************************************************************************/
Expand Down Expand Up @@ -653,7 +653,7 @@ int main(int argc, char** argv) {
}
}
if (FailFlag == 1) {
failed("");
failed("\n");
} else {
passed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ int main(int argc, char** argv) {
std::cerr << "Requesting to run " << requested_blocks << " blocks, ";
std::cerr << "but we can only guarantee to simultaneously run ";
std::cerr << (max_blocks_per_sm * num_sm) << std::endl;
failed("");
failed("\n");
}

/*************************************************************************/
Expand Down Expand Up @@ -439,7 +439,7 @@ int main(int argc, char** argv) {
int local_ret_val = verify_barrier_buffer(loops, requested_blocks,
host_buffer[dev], num_devices);
if (local_ret_val) {
failed("");
failed("\n");
}
}

Expand All @@ -463,7 +463,7 @@ int main(int argc, char** argv) {
free(host_buffer[k]);
}
if (flag == 1) {
failed("");
failed("\n");
} else {
passed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int main(int argc, char** argv) {
std::cerr << "Requesting to run " << requested_blocks << " blocks, ";
std::cerr << "but we can only guarantee to simultaneously run ";
std::cerr << (max_blocks_per_sm * num_sms) << std::endl;
failed("");
failed("\n");
}

/*************************************************************************/
Expand Down Expand Up @@ -278,7 +278,7 @@ int main(int argc, char** argv) {
HIPCHECK(hipFree(kernel_buffer));
HIPCHECK(hipFree(kernel_atomic));
if (ret_val == -1) {
failed("");
failed("\n");
} else {
passed();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ int main(int argc, char** argv) {
std::cerr << "Requesting to run " << requested_blocks << " blocks, ";
std::cerr << "but we can only guarantee to simultaneously run ";
std::cerr << (max_blocks_per_sm * num_sm) << std::endl;
failed("");
failed("\n");
}

/*************************************************************************/
Expand Down Expand Up @@ -463,7 +463,7 @@ int main(int argc, char** argv) {
}
}
if (flag == 1) {
failed("");
failed("\n");
} else {
passed();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/runtimeApi/memory/hipIpcMemAccessTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ int main() {
IfTestPassed = true;
#endif
if (IfTestPassed == false) {
failed("");
failed("\n");
}
passed();
}
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ int main(int argc, char* argv[]) {
OverAllStatus = false;
}
if (!OverAllStatus) {
failed("");
failed("\n");
}
}
if (p_tests == 2) {
Expand Down
2 changes: 1 addition & 1 deletion tests/src/runtimeApi/memory/hipManagedKeyword.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) {
OverAllStatus = false;
}
if (!OverAllStatus) {
failed("");
failed("\n");
}
passed();
}
2 changes: 1 addition & 1 deletion tests/src/runtimeApi/module/hipFuncSetSharedMemConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ int main() {
if (IfTestPassed) {
passed();
} else {
failed("");
failed("\n");
}
}

0 comments on commit e8437f6

Please sign in to comment.