Skip to content

Commit

Permalink
Merge pull request #29583 from mrodozov/fix-clang-warnings-onlinedb
Browse files Browse the repository at this point in the history
[LLVM10] OnlineDB fix clang warnings
  • Loading branch information
cmsbuild authored May 5, 2020
2 parents 2f66ee4 + 4438591 commit 34fab59
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion OnlineDB/EcalCondDB/test/TestLMF2010-write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class CondDBApp {
tpDat.setData(logic_id, gain[g], rand(), rand(), rand());
vector<float> random_data;
for (int k = 0; k < 8; k++) {
random_data.push_back((float)rand() / RAND_MAX);
random_data.push_back((float)rand() / static_cast<float>(RAND_MAX));
}
lcDat.setData(logic_id, random_data);
}
Expand Down
28 changes: 12 additions & 16 deletions OnlineDB/SiStripConfigDb/src/SiStripConfigDb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -546,24 +546,22 @@ void SiStripConfigDb::usingXmlFiles() {
edm::LogWarning(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " NULL paths to input 'fec.xml' files!";
} else {
std::vector<std::string>::iterator iter = ip->second.inputFecXml().begin();
for (; iter != ip->second.inputFecXml().end(); iter++) {
if ((*iter).empty()) {
for (const auto& iter : ip->second.inputFecXml()) {
if (iter.empty()) {
edm::LogWarning(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " NULL path to input 'fec.xml' file!";
} else {
if (checkFileExists(*iter)) {
if (checkFileExists(iter)) {
try {
deviceFactory(__func__)->addFecFileName(*iter);
deviceFactory(__func__)->addFecFileName(iter);
} catch (...) {
handleException(__func__);
}
LogTrace(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " Added 'fec.xml' file: " << *iter;
<< " Added 'fec.xml' file: " << iter;
} else {
edm::LogWarning(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " No 'fec.xml' file found at " << *iter;
*iter = "";
<< " No 'fec.xml' file found at " << iter;
}
}
}
Expand All @@ -574,24 +572,22 @@ void SiStripConfigDb::usingXmlFiles() {
edm::LogWarning(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " NULL paths to input 'fed.xml' files!";
} else {
std::vector<std::string>::iterator iter = ip->second.inputFedXml().begin();
for (; iter != ip->second.inputFedXml().end(); iter++) {
if ((*iter).empty()) {
for (const auto& iter : ip->second.inputFedXml()) {
if (iter.empty()) {
edm::LogWarning(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " NULL path to input 'fed.xml' file!";
} else {
if (checkFileExists(*iter)) {
if (checkFileExists(iter)) {
try {
deviceFactory(__func__)->addFedFileName(*iter);
deviceFactory(__func__)->addFedFileName(iter);
} catch (...) {
handleException(__func__);
}
LogTrace(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " Added 'fed.xml' file: " << *iter;
<< " Added 'fed.xml' file: " << iter;
} else {
edm::LogWarning(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]"
<< " No 'fed.xml' file found at " << *iter;
*iter = "";
<< " No 'fed.xml' file found at " << iter;
}
}
}
Expand Down

0 comments on commit 34fab59

Please sign in to comment.