SWDEV-306940 - Fix hip errors/warnings by CppCheck (#2486)
Change-Id: I91f5e97b0c7ca80b6d21fa66d24e3cf9fde716a9
[ROCm/hip-tests commit: 833e962ddd]
This commit is contained in:
committed by
GitHub
parent
750df46bf8
commit
4e9ddeee7d
@@ -401,7 +401,6 @@ void ResultDatabase::DumpCsv(string fileName) {
|
||||
// ****************************************************************************
|
||||
|
||||
bool ResultDatabase::IsFileEmpty(string fileName) {
|
||||
bool fileEmpty;
|
||||
|
||||
ifstream file(fileName.c_str());
|
||||
|
||||
@@ -409,6 +408,7 @@ bool ResultDatabase::IsFileEmpty(string fileName) {
|
||||
if (!file.good()) {
|
||||
return true;
|
||||
} else {
|
||||
bool fileEmpty;
|
||||
fileEmpty = (bool)(file.peek() == ifstream::traits_type::eof());
|
||||
file.close();
|
||||
|
||||
|
||||
@@ -252,9 +252,9 @@ void RunBenchmark_H2D(ResultDatabase& resultDB) {
|
||||
|
||||
case MallocUnpinned:
|
||||
if (p_alignedhost) {
|
||||
delete[] hostMem;
|
||||
} else {
|
||||
free(hostMem);
|
||||
} else {
|
||||
delete[] hostMem;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user