Skip to content

fix compiler warnings from HiGHS 1.10.0 #2344

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

Merged
merged 2 commits into from
May 18, 2025
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
20 changes: 10 additions & 10 deletions highs/lp_data/HighsInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,10 @@ HighsStatus Highs::addRowsInterface(HighsInt ext_num_new_row,
return return_status;
}

void deleteBasisEntries(std::vector<HighsBasisStatus>& status,
bool& deleted_basic, bool& deleted_nonbasic,
const HighsIndexCollection& index_collection,
const HighsInt entry_dim) {
static void deleteBasisEntries(std::vector<HighsBasisStatus>& status,
bool& deleted_basic, bool& deleted_nonbasic,
const HighsIndexCollection& index_collection,
const HighsInt entry_dim) {
assert(ok(index_collection));
assert(static_cast<size_t>(entry_dim) == status.size());
HighsInt from_k;
Expand Down Expand Up @@ -717,19 +717,19 @@ void deleteBasisEntries(std::vector<HighsBasisStatus>& status,
status.resize(new_num_entry);
}

void deleteBasisCols(HighsBasis& basis,
const HighsIndexCollection& index_collection,
const HighsInt original_num_col) {
static void deleteBasisCols(HighsBasis& basis,
const HighsIndexCollection& index_collection,
const HighsInt original_num_col) {
bool deleted_basic;
bool deleted_nonbasic;
deleteBasisEntries(basis.col_status, deleted_basic, deleted_nonbasic,
index_collection, original_num_col);
if (deleted_basic) basis.valid = false;
}

void deleteBasisRows(HighsBasis& basis,
const HighsIndexCollection& index_collection,
const HighsInt original_num_row) {
static void deleteBasisRows(HighsBasis& basis,
const HighsIndexCollection& index_collection,
const HighsInt original_num_row) {
bool deleted_basic;
bool deleted_nonbasic;
deleteBasisEntries(basis.row_status, deleted_basic, deleted_nonbasic,
Expand Down
2 changes: 1 addition & 1 deletion highs/mip/HighsMipSolverData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ HighsLpRelaxation::Status HighsMipSolverData::evaluateRootLp() {
} while (true);
}

void clockOff(HighsMipAnalysis& analysis) {
static void clockOff(HighsMipAnalysis& analysis) {
if (!analysis.analyse_mip_time) return;
// Make sure that exactly one of the following clocks is running
const int clock0_running =
Expand Down
6 changes: 6 additions & 0 deletions highs/pdlp/CupdlpWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ cupdlp_retcode data_alloc(CUPDLPdata* data, cupdlp_int nRows, cupdlp_int nCols,

double infNorm(double* x, cupdlp_int n);

void cupdlp_hasLower(cupdlp_float *haslb, const cupdlp_float *lb,
const cupdlp_float bound, const cupdlp_int len);

void cupdlp_hasUpper(cupdlp_float *hasub, const cupdlp_float *ub,
const cupdlp_float bound, const cupdlp_int len);

void cupdlp_haslb(cupdlp_float* haslb, const cupdlp_float* lb,
const cupdlp_float bound, const cupdlp_int len);

Expand Down
2 changes: 2 additions & 0 deletions highs/util/HighsTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class HighsTimer {
num_clock = 0;
HighsInt i_clock = clock_def("Run HiGHS");
assert(i_clock == 0);
(void)i_clock;

presolve_clock = clock_def("Presolve");
solve_clock = clock_def("Solve");
Expand Down Expand Up @@ -102,6 +103,7 @@ class HighsTimer {
this->clock_names.clear();
HighsInt i_clock = clock_def("Run HiGHS");
assert(i_clock == 0);
(void)i_clock;
this->presolve_clock = clock_def("Presolve");
this->solve_clock = clock_def("Solve");
this->postsolve_clock = clock_def("Postsolve");
Expand Down
Loading