Skip to content

Commit 655c6b1

Browse files
committed
Merge remote-tracking branch 'origin/v10-minor'
2 parents 02248f6 + 9f9dee8 commit 655c6b1

22 files changed

+95
-76
lines changed

src/lpi/lpi_msk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,7 @@ SCIP_RETCODE SCIPlpiCreate(
903903
/* disable warnings for large bounds */
904904
MOSEK_CALL( MSK_putdouparam((*lpi)->task, MSK_DPAR_DATA_TOL_BOUND_WRN, MSK_INFINITY));
905905

906+
(*lpi)->optimizecount = 0;
906907
(*lpi)->termcode = MSK_RES_OK;
907908
(*lpi)->itercount = 0;
908909
(*lpi)->pricing = SCIP_PRICING_LPIDEFAULT;

src/scip/certificate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ SCIP_RETCODE SCIPcertificateInit(
460460
certificate->transfile = SCIPfopen(set->certificate_filename, "wT");
461461
certificate->maxfilesize = set->certificate_maxfilesize;
462462

463-
bufferlen = (int) strlen(name);
463+
bufferlen = (int) strlen(name); /*lint !e668*/
464464
SCIP_ALLOC( BMSallocMemoryArray(&certificate->derivationfilename, filenamelen+5) );
465465
SCIP_ALLOC( BMSallocMemoryArray(&certificate->origfilename, filenamelen+5) );
466466
BMScopyMemoryArray(certificate->derivationfilename, name, bufferlen);

src/scip/conflict_resolution.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,7 @@ SCIP_RETCODE computeSlack(
13291329
{
13301330
if( fixsides != NULL && fixsides[v] == 1 ) /* if the variable is fixed */
13311331
{
1332+
assert(fixbounds != NULL);
13321333
bound = fixbounds[v];
13331334
}
13341335
else
@@ -1341,6 +1342,7 @@ SCIP_RETCODE computeSlack(
13411342
{
13421343
if( fixsides != NULL && fixsides[v] == -1 ) /* if the variable is fixed */
13431344
{
1345+
assert(fixbounds != NULL);
13441346
bound = fixbounds[v];
13451347
}
13461348
else
@@ -2367,7 +2369,7 @@ SCIP_RETCODE reasonRowFromLpRow(
23672369
}
23682370
else
23692371
{
2370-
assert(FALSE);
2372+
SCIPABORT();
23712373
}
23722374
isincon = TRUE;
23732375
}
@@ -2449,7 +2451,7 @@ SCIP_RETCODE conflictRowFromLpRow(
24492451
}
24502452
else
24512453
{
2452-
assert(FALSE);
2454+
SCIPABORT();
24532455
}
24542456
isincon = TRUE;
24552457
}

src/scip/cons_varbound.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5533,7 +5533,7 @@ SCIP_DECL_CONSPARSE(consParseVarbound)
55335533
/* ignore whitespace */
55345534
SCIP_CALL( SCIPskipSpace((char**)&str) );
55355535

5536-
if( isdigit(str[0]) || ((str[0] == '-' || str[0] == '+') && isdigit(str[1])) )
5536+
if( isdigit((unsigned char)str[0]) || ((str[0] == '-' || str[0] == '+') && isdigit((unsigned char)str[1])) )
55375537
{
55385538
if( !SCIPparseReal(scip, str, &lhs, &endstr) )
55395539
{

src/scip/cuts.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7991,7 +7991,7 @@ SCIP_RETCODE SCIPcalcMIR(
79917991
SCIP_CALL( SCIPallocBufferArray(scip, &data->secindices[l], nnz) );
79927992
data->secnnz[l] = 0;
79937993
/* Cont. | cont impl. | int impl. | bin impl. | int | bin */
7994-
assert(NSECTIONS == 6); /* If the section definition is changed, the below lines should also be adjusted to match */
7994+
assert(NSECTIONS == 6); /*lint !e506*/ /* If the section definition is changed, the below lines should also be adjusted to match */
79957995
data->isenfint[l] = l >= 2 ? TRUE : FALSE;
79967996
data->isimplint[l] = l >= 1 && l <= 3 ? TRUE : FALSE;
79977997
/* Use variable bounds for the sections specified by the user */
@@ -8435,7 +8435,7 @@ SCIP_RETCODE SCIPcutGenerationHeuristicCMIR(
84358435
SCIP_CALL( SCIPallocBufferArray(scip, &data->secindices[l], nnz) );
84368436
data->secnnz[l] = 0;
84378437
/* Cont. | cont impl. | int impl. | bin impl. | int | bin */
8438-
assert(NSECTIONS == 6); /* If the section definition is changed, the below lines should also be adjusted to match */
8438+
assert(NSECTIONS == 6); /*lint !e506*/ /* If the section definition is changed, the below lines should also be adjusted to match */
84398439
data->isenfint[l] = l >= 2 ? TRUE : FALSE;
84408440
data->isimplint[l] = l >= 1 && l <= 3 ? TRUE : FALSE;
84418441
/* Use variable bounds for the sections specified by the user */
@@ -13361,7 +13361,7 @@ SCIP_RETCODE SCIPcalcStrongCG(
1336113361
SCIP_CALL( SCIPallocBufferArray(scip, &data->secindices[l], nnz) );
1336213362
data->secnnz[l] = 0;
1336313363
/* Cont. | cont impl. | int impl. | bin impl. | int | bin */
13364-
assert(NSECTIONS == 6); /* If the section definition is changed, the below lines should also be adjusted to match */
13364+
assert(NSECTIONS == 6); /*lint !e506*/ /* If the section definition is changed, the below lines should also be adjusted to match */
1336513365
data->isenfint[l] = l >= 2 ? TRUE : FALSE;
1336613366
data->isimplint[l] = l >= 1 && l <= 3 ? TRUE : FALSE;
1336713367
/* Use variable bounds for the sections specified by the user */

src/scip/expr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ SCIP_RETCODE SCIPexprPrintDot(
24052405
/* make up some color from the expression type (it's name) */
24062406
color = 0.0;
24072407
for( c = 0; expr->exprhdlr->name[c] != '\0'; ++c )
2408-
color += (tolower(expr->exprhdlr->name[c]) - 'a') / 26.0;
2408+
color += (tolower((unsigned char)expr->exprhdlr->name[c]) - 'a') / 26.0;
24092409
color = SCIPsetFrac(set, color);
24102410
fprintf(printdata->file, "n%p [fillcolor=\"%g,%g,%g\", label=\"", (void*)expr, color, color, color);
24112411

src/scip/heur_dks.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,15 @@ SCIP_RETCODE fillKernels(
440440
if( !SCIPisEQ(scip, lpval, 0.0) )
441441
{
442442
n = bw_kernelcount[block_index];
443+
assert(bw_nnonkernelvars != NULL);
443444
assert(n < bw_nkernelvars[block_index] + bw_nnonkernelvars[block_index]);
444445
bw_kernelvars[block_index][n] = vars[i];
445446
bw_kernelcount[block_index]++;
446447
}
447448
else
448449
{
449450
n = bw_nonkernelcount[block_index];
451+
assert(bw_nnonkernelvars != NULL);
450452
assert(n < bw_nkernelvars[block_index] + bw_nnonkernelvars[block_index]);
451453
bw_nonkernelvars[block_index][n] = vars[i];
452454
bw_nonkernelcount[block_index]++;
@@ -467,6 +469,8 @@ SCIP_RETCODE fillKernels(
467469
if( bw_intkernelcount != NULL )
468470
{
469471
m = bw_intkernelcount[block_index];
472+
assert(bw_nintnonkernelvars != NULL);
473+
assert(bw_nintkernelvars != NULL);
470474
assert(m < bw_nintkernelvars[block_index] + bw_nintnonkernelvars[block_index]);
471475
if( bw_intkernelvars != NULL )
472476
bw_intkernelvars[block_index][m] = vars[i];
@@ -476,6 +480,7 @@ SCIP_RETCODE fillKernels(
476480
else
477481
{
478482
m = bw_kernelcount[block_index];
483+
assert(bw_nnonkernelvars != NULL);
479484
assert(m < bw_nkernelvars[block_index] + bw_nnonkernelvars[block_index]);
480485
bw_kernelvars[block_index][m] = vars[i];
481486
bw_kernelcount[block_index]++;
@@ -488,6 +493,8 @@ SCIP_RETCODE fillKernels(
488493
if( bw_intnonkernelcount != NULL )
489494
{
490495
m = bw_intnonkernelcount[block_index];
496+
assert(bw_nintnonkernelvars != NULL);
497+
assert(bw_nintkernelvars != NULL);
491498
assert(m < bw_nintkernelvars[block_index] + bw_nintnonkernelvars[block_index]);
492499
if( bw_intnonkernelvars != NULL )
493500
bw_intnonkernelvars[block_index][m] = vars[i];
@@ -497,6 +504,7 @@ SCIP_RETCODE fillKernels(
497504
else
498505
{
499506
m = bw_nonkernelcount[block_index];
507+
assert(bw_nnonkernelvars != NULL);
500508
assert(m < bw_nkernelvars[block_index] + bw_nnonkernelvars[block_index]);
501509
bw_nonkernelvars[block_index][m] = vars[i];
502510
bw_nonkernelcount[block_index]++;
@@ -511,13 +519,15 @@ SCIP_RETCODE fillKernels(
511519
|| (usetranslb && SCIPisGT(scip, lb, lborig)) )
512520
{
513521
l = bw_contkernelcount[block_index];
522+
assert(bw_ncontnonkernelvars != NULL);
514523
assert(l < bw_ncontkernelvars[block_index] + bw_ncontnonkernelvars[block_index]);
515524
bw_contkernelvars[block_index][l] = vars[i];
516525
bw_contkernelcount[block_index]++;
517526
}
518527
else
519528
{
520529
l = bw_contnonkernelcount[block_index];
530+
assert(bw_ncontnonkernelvars != NULL);
521531
assert(l < bw_ncontkernelvars[block_index] + bw_ncontnonkernelvars[block_index]);
522532
bw_contnonkernelvars[block_index][l] = vars[i];
523533
bw_contnonkernelcount[block_index]++;

src/scip/misc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9950,7 +9950,7 @@ SCIP_RETCODE SCIPcalcIntegralScalarExact(
99509950
break;
99519951
}
99529952

9953-
scalable = ((SCIP_Real)scm/(SCIP_Real)gcd <= maxscale);
9953+
scalable = ((SCIP_Real)scm/(SCIP_Real)gcd <= maxscale); /*lint !e838*/
99549954
}
99559955

99569956
if( scalable )
@@ -10798,13 +10798,13 @@ void SCIPescapeString(
1079810798
if( s[i] == '\\' )
1079910799
{
1080010800
t[p] = s[i];
10801-
++p;
10802-
++i;
10801+
++p; /*lint !e850*/
10802+
++i; /*lint !e850*/
1080310803
}
1080410804
else if( s[i] == ' ' || s[i] == '\"' || s[i] == '\'' )
1080510805
{
1080610806
t[p] = '\\';
10807-
++p;
10807+
++p; /*lint !e850*/
1080810808
}
1080910809
if( i <= len && p < bufsize )
1081010810
t[p] = s[i];
@@ -10817,7 +10817,7 @@ SCIP_RETCODE SCIPskipSpace(
1081710817
char** s /**< pointer to string pointer */
1081810818
)
1081910819
{
10820-
while( isspace(**s) || ( **s == '\\' && *(*s+1) != '\0' && strchr(SCIP_SPACECONTROL, *(*s+1)) ) )
10820+
while( isspace((unsigned char)**s) || ( **s == '\\' && *(*s+1) != '\0' && strchr(SCIP_SPACECONTROL, *(*s+1)) ) )
1082110821
*s += **s == '\\' ? 2 : 1;
1082210822

1082310823
return SCIP_OKAY;

src/scip/multiprecision.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ namespace scip
8181
inline int sign() const { return 0; }
8282
inline bool is_zero() const { return this->val == 0; }
8383
inline std::string str() const { return ""; }
84+
Rational& operator=(const double& r){val = r; return *this;};
8485
Rational& operator=(const int& i){val = i; return *this;};
8586
Rational& operator+(const Rational& r){return *this;};
8687
Rational& operator+(const double& r){return *this;};

src/scip/nlhdlr_convex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ SCIP_RETCODE exprstackPush(
300300
SCIP_CALL( SCIPreallocBufferArray(scip, &exprstack->stack, exprstack->stacksize) );
301301
}
302302

303-
memcpy(exprstack->stack + (exprstack->stackpos+1), exprs, nexprs * sizeof(SCIP_EXPR*)); /*lint !e679*/ /*lint !e737*/
303+
memcpy(exprstack->stack + (exprstack->stackpos+1), exprs, nexprs * sizeof(SCIP_EXPR*)); /*lint !e679*/ /*lint !e737*/ /*lint !e420*/
304304
exprstack->stackpos += nexprs;
305305

306306
return SCIP_OKAY;

0 commit comments

Comments
 (0)