Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CORE] [CLANG] Fix warnings reported by llvm16 in CLANG IBs #41522

Merged
merged 2 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions DataFormats/Common/test/DetSetNewTS_t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,14 @@ TestDetSet::TestDetSet() : sv(10) {
}

void read(DSTV const& detsets, bool all = false) {
int i = 0;
for (auto di = detsets.begin(false); di != detsets.end(false); ++di) {
auto ds = *di;
auto id = ds.id();
std::cout << id << ' ';
// if (all) CPPUNIT_ASSERT(int(id)==20+i);
if (ds.isValid()) {
CPPUNIT_ASSERT(ds[0] == 100 * (id - 20) + 3);
CPPUNIT_ASSERT(ds[1] == -(100 * (id - 20) + 3));
}
++i;
}
std::cout << std::endl;
}
Expand Down
2 changes: 2 additions & 0 deletions DataFormats/Common/test/testOneToManyAssociation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ void testOneToManyAssociation::dummy() {
++f;
n = v.numberOfAssociations(edm::Ref<CKey>());
++n;
std::cout << "numberOfAssociations:" << n << std::endl;
edm::Ref<Assoc> r;
v[edm::Ref<CKey>()];
v.erase(edm::Ref<CKey>());
Expand All @@ -67,6 +68,7 @@ void testOneToManyAssociation::dummy() {
++f;
n = v.numberOfAssociations(edm::Ref<CKey>());
++n;
std::cout << "numberOfAssociations:" << n << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly this test code does not use particularly useful. Ok, it ensures the syntax compiles and the whatever the compiler leaves there after optimizations runs, but it could use more assertions. Something to be possibly improved later though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok, this code is there to check if it compiles

edm::Ref<Assoc> r;
v[edm::Ref<CKey>()];
v.erase(edm::Ref<CKey>());
Expand Down
1 change: 1 addition & 0 deletions DataFormats/Common/test/testOneToOneAssociation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void testOneToOneAssociation::dummy() {
++f;
int n = v.numberOfAssociations(edm::Ref<CKey>());
++n;
std::cout << "numberOfAssociations:" << n << std::endl;
edm::Ref<Assoc> r;
v[edm::Ref<CKey>()];
v.erase(edm::Ref<CKey>());
Expand Down
2 changes: 0 additions & 2 deletions DataFormats/Provenance/test/productResolverIndexHelperTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,12 @@ int main() {
unsigned sum = 0;

for (unsigned j = 0; j < 100; ++j) {
unsigned int iCount = 0;
for (auto& n : vNames) {
unsigned temp = 1;
// if (n.className == "trigger::TriggerFilterObjectWithRefs") continue;
temp = phih.index(PRODUCT_TYPE, n.typeID, n.label.c_str(), n.instance.c_str(), n.process.c_str());

sum += temp;
++iCount;
}
}
timer.stop();
Expand Down