Skip to content

Commit dffcef4

Browse files
jamestjspclaude
andcommitted
fix: remove unused variables in ab13hd.c and py_ab.c
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 82986f1 commit dffcef4

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

python/wrappers/py_ab.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8546,7 +8546,6 @@ PyObject* py_ab13hd(PyObject* self, PyObject* args) {
85468546
i32 info = 0;
85478547

85488548
i32 minpm = (p < m) ? p : m;
8549-
i32 maxpm = (p > m) ? p : m;
85508549
i32 pm = p + m;
85518550

85528551
i32 liwork;

src/AB/ab13hd.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void ab13hd(const char *dico, const char *jobe, const char *equil,
109109

110110
i32 mincwk = 1, maxcwk = 1, minwrk, maxwrk;
111111
i32 iu = 0, ie = 0, ib_off, ir_off, ibt_off;
112-
bool usepen, ncmpre = false, nsrt;
112+
bool nsrt;
113113
i32 pm = p + m;
114114
i32 tn = 2 * n;
115115
i32 rnke = ranke;
@@ -118,14 +118,11 @@ void ab13hd(const char *dico, const char *jobe, const char *equil,
118118
minwrk = 1;
119119
maxwrk = 1;
120120
} else {
121-
usepen = withe || discr;
122121
i32 i0, mnwsvd, mnw13x, odwsvd = 0, odw13x = 0;
123122

124123
if (cmpre) {
125124
cmpre = (ranke < n);
126-
ncmpre = !cmpre;
127125
} else {
128-
ncmpre = false;
129126
rnke = n;
130127
}
131128

@@ -487,7 +484,6 @@ void ab13hd(const char *dico, const char *jobe, const char *equil,
487484
maxwrk = 1;
488485
}
489486
} else {
490-
bool wnrmd = withd;
491487
oz = ZERO;
492488
gammal = ZERO;
493489
maxwrk = 1;
@@ -760,7 +756,6 @@ void ab13hd(const char *dico, const char *jobe, const char *equil,
760756
*info = 1;
761757
return;
762758
}
763-
i32 ninf1 = ninf + 1;
764759
SLC_DGECON("1", &ninf, &dwork[ias_l], &ninf, &tmp, &rcond,
765760
&dwork[iwrk], &iwork[ninf], &ierr);
766761
if (rcond <= (f64)ninf * teps) {
@@ -934,7 +929,6 @@ void ab13hd(const char *dico, const char *jobe, const char *equil,
934929
if (sdim != sdim1) { *info = 6; return; }
935930
maxwrk = max_i32((i32)dwork[iwrk] + iwrk, maxwrk);
936931

937-
f64 dum = ZERO;
938932
i32 cnt = *nr - sdim;
939933
for (i32 i = 0; i < cnt; i++)
940934
dwork[ibt + sdim + i] = ZERO;
@@ -1370,8 +1364,7 @@ void ab13hd(const char *dico, const char *jobe, const char *equil,
13701364
&dwork[ie], n, &dwork[ib], n, &dwork[ic_off], p,
13711365
d, ldd, iwork, &dwork[iwrk], ldwork - iwrk,
13721366
zwork, lzwork, &ierr);
1373-
i32 mxcw = (i32)creal(zwork[0]);
1374-
// maxcwk not tracked after workspace query
1367+
(void)zwork[0];
13751368
} else {
13761369
i32 ibs_l = ias + nr2;
13771370
id_off = ibs_l + (*nr) * m;

0 commit comments

Comments
 (0)