From f85d6cfe1553aaa8c2a2447ef6de65b951de432f Mon Sep 17 00:00:00 2001 From: Stefan Vigerske Date: Fri, 17 Mar 2023 10:23:21 +0100 Subject: [PATCH] use #if 0 instead of && 0 to disable some if's - avoids -Wconstant-logical-operand warning --- Clp/src/ClpCholeskyBase.cpp | 4 +++- Clp/src/ClpCholeskyMumps.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Clp/src/ClpCholeskyBase.cpp b/Clp/src/ClpCholeskyBase.cpp index 3922ee9c..c14bdfff 100644 --- a/Clp/src/ClpCholeskyBase.cpp +++ b/Clp/src/ClpCholeskyBase.cpp @@ -2957,13 +2957,15 @@ int ClpCholeskyBase::factorize(const CoinWorkDouble *diagonal, int *rowsDropped) } } numberRowsDropped_ += newDropped; - if (numberRowsDropped_ && 0) { +#if 0 + if (numberRowsDropped_) { std::cout << "Rank " << numberRows_ - numberRowsDropped_ << " ( " << numberRowsDropped_ << " dropped)"; if (newDropped) { std::cout << " ( " << newDropped << " dropped this time)"; } std::cout << std::endl; } +#endif } } else { //KKT diff --git a/Clp/src/ClpCholeskyMumps.cpp b/Clp/src/ClpCholeskyMumps.cpp index 4a0d7963..b4f885f9 100644 --- a/Clp/src/ClpCholeskyMumps.cpp +++ b/Clp/src/ClpCholeskyMumps.cpp @@ -437,13 +437,15 @@ int ClpCholeskyMumps::factorize(const double *diagonal, int *rowsDropped) } } numberRowsDropped_ += newDropped; - if (numberRowsDropped_ && 0) { +#if 0 + if (numberRowsDropped_) { std::cout << "Rank " << numberRows_ - numberRowsDropped_ << " ( " << numberRowsDropped_ << " dropped)"; if (newDropped) { std::cout << " ( " << newDropped << " dropped this time)"; } std::cout << std::endl; } +#endif } status_ = 0; return newDropped;