Skip to content

Commit c6b5403

Browse files
committed
address clang scan warning
Change-Id: Ie810caa4c6bb6580096629b92ac8287326a46fbe
1 parent 495e634 commit c6b5403

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cpucounters.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,6 +1466,7 @@ bool PCM::discoverSystemTopology()
14661466
MSR.push_back(std::make_shared<SafeMsrHandle>(i));
14671467
}
14681468

1469+
assert(num_cores > 0);
14691470
TopologyEntry entries[num_cores];
14701471
if (MSR[0]->buildTopology(num_cores, entries) != 0) {
14711472
std::cerr << "Unable to build CPU topology" << std::endl;

0 commit comments

Comments
 (0)