Skip to content

Commit

Permalink
Merge pull request #1798 from ERGO-Code/fix-warnings
Browse files Browse the repository at this point in the history
fix wrong declaration of highsCompilationDate(), some compiler warnings, and a comment header
  • Loading branch information
galabovaa authored Jun 11, 2024
2 parents 43329e5 + 0bd9271 commit 7689da7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Highs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ HighsInt highsVersionMajor();
HighsInt highsVersionMinor();
HighsInt highsVersionPatch();
const char* highsGithash();
const char* highsCompilationDate();

/**
* @brief Class to set parameters and run HiGHS
Expand Down Expand Up @@ -1216,7 +1217,6 @@ class Highs {
* @brief Return compilation date
*/
std::string compilationDate() const { return "deprecated"; }
const char* highsCompilationDate();

HighsStatus setLogCallback(void (*user_log_callback)(HighsLogType,
const char*, void*),
Expand Down
12 changes: 6 additions & 6 deletions src/lp_data/Highs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2320,12 +2320,12 @@ HighsStatus Highs::changeColsIntegrality(const HighsInt from_col,
return returnFromHighs(return_status);
}

HighsStatus analyseSetCreateError(HighsLogOptions log_options,
const std::string method,
const HighsInt create_error,
const bool ordered,
const HighsInt num_set_entries,
const HighsInt dimension) {
static HighsStatus analyseSetCreateError(HighsLogOptions log_options,
const std::string method,
const HighsInt create_error,
const bool ordered,
const HighsInt num_set_entries,
const HighsInt dimension) {
if (create_error == kIndexCollectionCreateIllegalSetSize) {
highsLogUser(log_options, HighsLogType::kError,
"Set supplied to Highs::%s has illegal size of %d\n",
Expand Down
1 change: 1 addition & 0 deletions src/lp_data/HighsCallbackStruct.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the HiGHS linear optimization suite */
/* */
Expand Down
2 changes: 1 addition & 1 deletion src/qpsolver/a_quass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "qpsolver/feasibility_highs.hpp"
#include "qpsolver/feasibility_bounded.hpp"

QpAsmStatus quass2highs(Instance& instance,
static QpAsmStatus quass2highs(Instance& instance,
Settings& settings,
Statistics& stats,
QpModelStatus& qp_model_status,
Expand Down
4 changes: 2 additions & 2 deletions src/qpsolver/feasibility_bounded.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ static void computeStartingPointBounded(Instance& instance,
L.resize(instance.num_var * instance.num_var);

// compute cholesky factorization of Q
for (size_t col = 0; col < instance.num_var; col++) {
for (size_t idx = instance.Q.mat.start[col]; idx < instance.Q.mat.start[col+1]; idx++) {
for (size_t col = 0; col < (size_t)instance.num_var; col++) {
for (size_t idx = instance.Q.mat.start[col]; idx < (size_t)instance.Q.mat.start[col+1]; idx++) {
double sum = 0;
size_t row = instance.Q.mat.index[idx];
if (row == col) {
Expand Down
4 changes: 2 additions & 2 deletions src/qpsolver/quass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ static double compute_dual_violation(Instance& instance, QpVector& primal, QpVec
}
#endif

bool check_reinvert_due(Basis& basis) {
static bool check_reinvert_due(Basis& basis) {
// reinvert can be triggered by basis
return basis.getreinversionhint();
}

void reinvert(Basis& basis, CholeskyFactor& factor, Gradient& grad, ReducedCosts& rc, ReducedGradient& rg, std::unique_ptr<Pricing>& pricing) {
static void reinvert(Basis& basis, CholeskyFactor& factor, Gradient& grad, ReducedCosts& rc, ReducedGradient& rg, std::unique_ptr<Pricing>& pricing) {
basis.rebuild();
factor.recompute();
grad.recompute();
Expand Down
4 changes: 2 additions & 2 deletions src/qpsolver/runtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ struct Runtime {

Runtime(Instance& inst, Statistics& stats)
: instance(inst),
statistics(stats),
primal(QpVector(instance.num_var)),
rowactivity(QpVector(instance.num_con)),
dualvar(instance.num_var),
dualcon(instance.num_con),
status_var(instance.num_var),
status_con(instance.num_con),
statistics(stats) {}
status_con(instance.num_con) {}
};

#endif

0 comments on commit 7689da7

Please sign in to comment.