Skip to content

Commit 2db65e5

Browse files
committed
Merge remote-tracking branch 'origin/v10-minor'
2 parents 88be77e + 4905a0e commit 2db65e5

15 files changed

Lines changed: 28 additions & 38 deletions

src/blockmemshell/memory.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,6 @@ void checkBlkmem(
17071707
int i;
17081708

17091709
assert(blkmem != NULL);
1710-
assert(blkmem->chkmemhash != NULL);
17111710

17121711
for( i = 0; i < CHKHASH_SIZE; ++i )
17131712
{
@@ -2153,7 +2152,6 @@ void BMSfreeBlockMemory_work(
21532152
debugMessage("free %8llu bytes in %p [%s:%d]\n", (unsigned long long)size, *ptr, filename, line);
21542153

21552154
/* find corresponding chunk block */
2156-
assert( blkmem->chkmemhash != NULL );
21572155
chkmem = blkmem->chkmemhash[hashnumber];
21582156
while( chkmem != NULL && chkmem->elemsize != (int)size )
21592157
chkmem = chkmem->nextchkmem;

src/rectlu/rectlu_factor.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,6 @@ static int qsnum_dense_build_matrix(
18931893
f->dense_base = f->stage;
18941894
f->dmat = dmat;
18951895
f->dsize = dsize;
1896-
dmat = 0;
18971896

18981897
/* CLEANUP: */
18991898
return rval;
@@ -3285,8 +3284,8 @@ void QSnum_factor_btran (
32853284
int nzcnt;
32863285
int sparse;
32873286
int *aindx;
3288-
QSnum_type *acoef = a->coef;
3289-
QSnum_type *work_coef = f->work_coef;
3287+
QSnum_type *acoef;
3288+
QSnum_type *work_coef;
32903289
int dimr;
32913290

32923291
if( a->nzcnt >= SPARSE_FACTOR * f->dimr )
@@ -3312,7 +3311,7 @@ void QSnum_factor_btran (
33123311
}
33133312
else
33143313
{
3315-
qsnum_factor_btranu (f, work_coef, &f->xtmp);
3314+
qsnum_factor_btranu (f, work_coef, &f->xtmp); /*lint !e644*/
33163315
}
33173316

33183317
if( f->xtmp.nzcnt >= SPARSE_FACTOR * f->dimr )
@@ -3451,7 +3450,7 @@ int QSnum_svector_alloc(
34513450
int nzcnt /**< nonzero count */
34523451
)
34533452
{
3454-
int rval = 0;
3453+
int rval;
34553454

34563455
s->nzcnt = nzcnt;
34573456
if( nzcnt == 0 )
@@ -3577,8 +3576,10 @@ void RECTLUfreeFactorization(
35773576
qsnum_factor_work* f /**< factor work */
35783577
)
35793578
{
3579+
assert(f != NULL);
3580+
35803581
QSnum_factor_free_factor_work (f);
35813582
QSnum_factor_clear ();
3582-
if (f) free (f);
3583+
free (f);
35833584
}
35843585
#endif

src/scip/conflict_graphanalysis.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2917,13 +2917,10 @@ SCIP_RETCODE conflictsetAddBounds(
29172917
/* replace worse bound change info by tighter bound change info */
29182918
confbdchginfos[k] = confbdchginfos[i];
29192919
confrelaxedbds[k] = confrelaxedbds[i];
2920-
confsortvals[k] = confsortvals[i];
29212920
++i;
29222921
}
29232922
else
29242923
{
2925-
assert(confsortvals[k] == confsortvals[i]);
2926-
29272924
/* both bound change are equivalent; hence, keep the worse relaxed bound and remove one of them */
29282925
confrelaxedbds[k] = (confsortvals[k] % 2 == 0) ? MAX(confrelaxedbds[k], confrelaxedbds[i]) : MIN(confrelaxedbds[k], confrelaxedbds[i]);
29292926
++i;

src/scip/cons.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8270,7 +8270,6 @@ int SCIPlinConsStatsGetTypeCount(
82708270
{
82718271
assert(linconsstats != NULL);
82728272
assert(0 <= (int)linconstype && (int)linconstype < SCIP_NLINCONSTYPES); /*lint !e587 !e685 !e568*/
8273-
assert(linconsstats->counter != NULL);
82748273

82758274
return linconsstats->counter[(int)linconstype];
82768275
}
@@ -8295,7 +8294,6 @@ void SCIPlinConsStatsIncTypeCount(
82958294
assert(linconsstats != NULL);
82968295
assert(increment >= 1);
82978296
assert(0 <= (int)linconstype && (int)linconstype < SCIP_NLINCONSTYPES); /*lint !e587 !e685 !e568*/
8298-
assert(linconsstats->counter != NULL);
82998297

83008298
linconsstats->counter[(int)linconstype] += increment;
83018299
linconsstats->sum += increment;

src/scip/cons_knapsack.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7671,7 +7671,7 @@ SCIP_RETCODE propagateCons(
76717671
SCIPdebugMsg(scip, " -> fixing variable <%s> to 0\n", SCIPvarGetName(maxvar));
76727672
SCIP_CALL( SCIPresetConsAge(scip, cons) );
76737673
SCIP_CALL( SCIPinferBinvarCons(scip, maxvar, FALSE, cons, cliquestartposs[c], &infeasible, &tightened) );
7674-
assert(consdata->onesweightsum == oldonesweightsum); /* cppcheck-suppress knownConditionTrueFalse */
7674+
assert(consdata->onesweightsum == oldonesweightsum);
76757675
assert(!infeasible);
76767676
assert(tightened);
76777677
(*nfixedvars)++;
@@ -8194,7 +8194,6 @@ SCIP_RETCODE detectRedundantVars(
81948194
SCIP_Longint* weights;
81958195
SCIP_Longint capacity;
81968196
SCIP_Longint sum;
8197-
int noldchgcoefs;
81988197
int nvars;
81998198
int v;
82008199
int w;
@@ -8211,7 +8210,6 @@ SCIP_RETCODE detectRedundantVars(
82118210
assert(consdata->nvars >= 2);
82128211
assert(consdata->weightsum > consdata->capacity);
82138212

8214-
noldchgcoefs = *nchgcoefs;
82158213
vars = consdata->vars;
82168214
weights = consdata->weights;
82178215
nvars = consdata->nvars;
@@ -8249,10 +8247,6 @@ SCIP_RETCODE detectRedundantVars(
82498247
return SCIP_OKAY;
82508248
}
82518249

8252-
/* if we already found some redundant variables, stop here */
8253-
if( *nchgcoefs > noldchgcoefs )
8254-
return SCIP_OKAY;
8255-
82568250
assert(vars == consdata->vars);
82578251
assert(weights == consdata->weights);
82588252
assert(nvars == consdata->nvars);

src/scip/cons_linking.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ SCIP_RETCODE processBinvarFixings(
12871287
fixedonefound = FALSE;
12881288
#endif
12891289

1290-
for( v = 0; v < nvars && consdata->nfixedones == 1 && !(*cutoff); ++v )
1290+
for( v = 0; v < nvars && consdata->nfixedones == 1 && !(*cutoff); ++v ) /* cppcheck-suppress knownConditionTrueFalse */
12911291
{
12921292
var = vars[v];
12931293
assert(SCIPvarIsBinary(var));
@@ -1329,7 +1329,7 @@ SCIP_RETCODE processBinvarFixings(
13291329
/* now all other variables are fixed to zero:
13301330
* the constraint is feasible, and if it's not modifiable, it is redundant
13311331
*/
1332-
if( !SCIPconsIsModifiable(cons) && consdata->nfixedones == 1 )
1332+
if( !SCIPconsIsModifiable(cons) && consdata->nfixedones == 1 ) /* cppcheck-suppress knownConditionTrueFalse */
13331333
{
13341334
SCIPdebugMsg(scip, " -> disabling set linking constraint <%s>\n", SCIPconsGetName(cons));
13351335
SCIP_CALL( SCIPdelConsLocal(scip, cons) );

src/scip/cons_logicor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,6 @@ SCIP_RETCODE removeRedundantNonZeros(
26202620
assert(0 < nentries);
26212621

26222622
/* temporary exchange the variable for calculating a valid signature */
2623-
oldvar = vars[artpos];
26242623
vars[artpos] = artvar;
26252624
signature = calcSignature(vars, nvars);
26262625

src/scip/cons_pseudoboolean.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3866,7 +3866,7 @@ SCIP_RETCODE copyConsPseudoboolean(
38663866
assert(ntargetandconss <= ntargetlinvars);
38673867
}
38683868

3869-
if( *valid ) /* cppcheck-suppress duplicateCondition */
3869+
if( *valid )
38703870
{
38713871
SCIP_Real targetrhs;
38723872
SCIP_Real targetlhs;

src/scip/lpexact_bounding.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ SCIP_RETCODE projectShift(
14861486
#endif
14871487

14881488
/* rval = 0 -> fail */
1489-
if( rval ) /* cppcheck-suppress knownConditionTrueFalse */
1489+
if( rval )
14901490
{
14911491
lp->hasprovedbound = FALSE;
14921492
if( usefarkas )

src/scip/network.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,8 +2277,8 @@ int decompositionGetFundamentalCycleRows(
22772277

22782278
typedef struct
22792279
{
2280-
spqr_node node; /* cppcheck-suppress unusedStructMember */
2281-
spqr_arc nodeArc; /* cppcheck-suppress unusedStructMember */
2280+
spqr_node node;
2281+
spqr_arc nodeArc;
22822282
} DFSCallData;
22832283
DFSCallData* pathSearchCallStack;
22842284
if( BMSallocBlockMemoryArray(dec->env, &pathSearchCallStack, dec->numNodes) == NULL )

0 commit comments

Comments
 (0)