Skip to content

Commit 70c28e2

Browse files
committed
just some warnings
1 parent 340f098 commit 70c28e2

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

highs/interfaces/highs_c_api.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,32 +1309,32 @@ HighsInt Highs_getIis(void* highs, HighsInt* iis_num_col, HighsInt* iis_num_row,
13091309
*iis_num_col = iis.col_index_.size();
13101310
*iis_num_row = iis.row_index_.size();
13111311
if (col_index != nullptr) {
1312-
for (size_t i = 0; i < *iis_num_col; i++) {
1312+
for (size_t i = 0; i < (size_t)*iis_num_col; i++) {
13131313
col_index[i] = iis.col_index_[i];
13141314
}
13151315
}
13161316
if (row_index != nullptr) {
1317-
for (size_t i = 0; i < *iis_num_row; i++) {
1317+
for (size_t i = 0; i < (size_t)*iis_num_row; i++) {
13181318
row_index[i] = iis.row_index_[i];
13191319
}
13201320
}
13211321
if (col_bound != nullptr) {
1322-
for (size_t i = 0; i < *iis_num_col; i++) {
1322+
for (size_t i = 0; i < (size_t)*iis_num_col; i++) {
13231323
col_bound[i] = iis.col_bound_[i];
13241324
}
13251325
}
13261326
if (row_bound != nullptr) {
1327-
for (size_t i = 0; i < *iis_num_row; i++) {
1327+
for (size_t i = 0; i < (size_t)*iis_num_row; i++) {
13281328
row_bound[i] = iis.row_bound_[i];
13291329
}
13301330
}
13311331
if (col_status != nullptr) {
1332-
for (size_t i = 0; i < ((Highs*)highs)->getLp().num_col_; i++) {
1332+
for (size_t i = 0; i < (size_t)((Highs*)highs)->getLp().num_col_; i++) {
13331333
col_status[i] = iis.col_status_[i];
13341334
}
13351335
}
13361336
if (row_status != nullptr) {
1337-
for (size_t i = 0; i < ((Highs*)highs)->getLp().num_row_; i++) {
1337+
for (size_t i = 0; i < (size_t)((Highs*)highs)->getLp().num_row_; i++) {
13381338
row_status[i] = iis.row_status_[i];
13391339
}
13401340
}

highs/lp_data/HighsLp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
bool HighsLp::isMip() const {
1919
size_t integrality_size = this->integrality_.size();
2020
if (integrality_size) {
21-
assert(integrality_size == this->num_col_);
21+
assert((HighsInt) integrality_size == this->num_col_);
2222
for (HighsInt iCol = 0; iCol < this->num_col_; iCol++)
2323
if (this->integrality_[iCol] != HighsVarType::kContinuous) return true;
2424
}
@@ -36,7 +36,7 @@ bool HighsLp::hasInfiniteCost(const double infinite_cost) const {
3636
bool HighsLp::hasSemiVariables() const {
3737
size_t integrality_size = this->integrality_.size();
3838
if (integrality_size) {
39-
assert(integrality_size == this->num_col_);
39+
assert((HighsInt)integrality_size == this->num_col_);
4040
for (HighsInt iCol = 0; iCol < this->num_col_; iCol++)
4141
if (this->integrality_[iCol] == HighsVarType::kSemiContinuous ||
4242
this->integrality_[iCol] == HighsVarType::kSemiInteger)

highs/lp_data/HighsLpUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,7 @@ HighsStatus assessLpPrimalSolution(const std::string message,
25642564
HighsStatus return_status =
25652565
calculateRowValuesQuad(lp, solution.col_value, row_value);
25662566
if (return_status != HighsStatus::kOk) return return_status;
2567-
const bool have_row_names = lp.row_names_.size() >= lp.num_row_;
2567+
const bool have_row_names = lp.row_names_.size() >= (size_t)lp.num_row_;
25682568
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
25692569
const double primal = solution.row_value[iRow];
25702570
const double lower = lp.row_lower_[iRow];

0 commit comments

Comments
 (0)