Skip to content

Commit

Permalink
One more...
Browse files Browse the repository at this point in the history
  • Loading branch information
johnoel committed Dec 12, 2023
1 parent 9d7822e commit 22c6332
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/sparse/hs_sparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#define USE_ADJOINT_CODE
void report_derivatives(const dvar_vector& x);

static void xxx(__attribute__((unused)) int i){;}
static void xxx(__attribute__((unused)) ivector& i){;}
static void xxxv(__attribute__((unused)) ivector& x)
static void xxx([[maybe_unused]] int i){;}
static void xxx([[maybe_unused]] ivector& i){;}
static void xxxv([[maybe_unused]] ivector& x)
{
int mmin=x.indexmin();
int mmax=x.indexmax();
Expand Down Expand Up @@ -84,7 +84,7 @@ int cholnew(XCONST hs_smatrix &A, XCONST hs_symbolic &S, hs_smatrix &L);
}

// Find C = A'
void cs_transpose (XCONST hs_smatrix &_A, __attribute__((unused)) int values, hs_smatrix &C)
void cs_transpose (XCONST hs_smatrix &_A, [[maybe_unused]] int values, hs_smatrix &C)
{
ADUNCONST(hs_smatrix,A)
int p, q, j;
Expand Down Expand Up @@ -116,7 +116,7 @@ int cholnew(XCONST hs_smatrix &A, XCONST hs_symbolic &S, hs_smatrix &L);
return;
}

void cs_transpose (XCONST dvar_hs_smatrix &_A, __attribute__((unused)) int values, dvar_hs_smatrix &C)
void cs_transpose (XCONST dvar_hs_smatrix &_A, [[maybe_unused]] int values, dvar_hs_smatrix &C)
{
ADUNCONST(dvar_hs_smatrix,A)
int p, q, j;
Expand Down Expand Up @@ -1270,8 +1270,8 @@ int tmpxchol1(XCONST hs_smatrix &A, XCONST hs_symbolic& T, hs_smatrix &L,
}

// keep off-diagonal entries; drop diagonal entries
int cs_diag(int i, int j, __attribute__((unused)) double aij, __attribute__((unused)) void *other) { return (i != j) ; }
int cs_diag(int i, int j, __attribute__((unused)) const prevariable& aij, __attribute__((unused)) void *other)
int cs_diag(int i, int j, [[maybe_unused]] double aij, [[maybe_unused]] void *other) { return (i != j) ; }
int cs_diag(int i, int j, [[maybe_unused]] const prevariable& aij, [[maybe_unused]] void *other)
{ return (i != j) ; }

/* drop entries for which fkeep(A(i,j)) is false; return nz if OK, else -1 */
Expand Down

0 comments on commit 22c6332

Please sign in to comment.