Skip to content

Commit 61c1a1b

Browse files
committed
Two more warnings fixed
1 parent 358f90e commit 61c1a1b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/mip/HighsCliqueTable.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,8 +2021,9 @@ void HighsCliqueTable::runCliqueMerging(HighsDomain& globaldomain,
20212021
std::remove_if(clique.begin(), clique.end(),
20222022
[&](CliqueVar v) {
20232023
return globaldomain.isFixed(v.col) &&
2024-
int(globaldomain.col_lower_[v.col]) ==
2025-
(1 - v.val);
2024+
static_cast<int>(
2025+
globaldomain.col_lower_[v.col]) ==
2026+
static_cast<int>(1 - v.val);
20262027
}),
20272028
clique.end());
20282029
}
@@ -2190,8 +2191,9 @@ void HighsCliqueTable::runCliqueMerging(HighsDomain& globaldomain) {
21902191
std::remove_if(extensionvars.begin(), extensionvars.end(),
21912192
[&](CliqueVar v) {
21922193
return globaldomain.isFixed(v.col) &&
2193-
int(globaldomain.col_lower_[v.col]) ==
2194-
(1 - v.val);
2194+
static_cast<int>(
2195+
globaldomain.col_lower_[v.col]) ==
2196+
static_cast<int>(1 - v.val);
21952197
}),
21962198
extensionvars.end());
21972199

src/parallel/HighsMutex.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ class HighsMutex {
114114
}
115115

116116
void unlock() {
117-
unsigned int prevState = state.fetch_add(-1, std::memory_order_release);
117+
unsigned int prevState = state.fetch_add(
118+
std::numeric_limits<unsigned int>::max(), std::memory_order_release);
118119

119120
if (prevState != 1) {
120121
unsigned int notifyWorkerId = (prevState >> 1) - 1;

0 commit comments

Comments
 (0)