aboutsummaryrefslogtreecommitdiff
path: root/math/coinmp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2018-01-05 12:37:45 +0000
committerJan Beich <jbeich@FreeBSD.org>2018-01-05 12:37:45 +0000
commitd45773d7ccea9403a52f327b3273615fe0a18754 (patch)
treef3035be9915858247fbad2f3b5d9a329779f3aac /math/coinmp
parent024187a4b3d2ee939d97a37194a15dbe04f212bc (diff)
downloadports-d45773d7ccea9403a52f327b3273615fe0a18754.tar.gz
ports-d45773d7ccea9403a52f327b3273615fe0a18754.zip
math/coinmp: unbreak build with Clang 6 (C++14 by default)
ClpModel.cpp:3848:24: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed reinterpret_cast<const char*> (NULL) /*integrality*/, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ OsiClpSolverInterface.cpp:1451:50: error: reinterpret_cast from 'nullptr_t' to 'int *' is not allowed messagesPointer->setDetailMessages(100,10000,reinterpret_cast<int *> (NULL)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from CglLandPSimplex.cpp:11: In file included from ./CglLandPSimplex.hpp:31: ./CglLandPUtils.hpp:88:25: error: reinterpret_cast from 'nullptr_t' to 'OsiRowCut *' is not allowed cuts_.resize(i, reinterpret_cast<OsiRowCut *> (NULL)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CbcModel.cpp:5322:41: error: reinterpret_cast from 'nullptr_t' to 'double *' is not allowed clpSolver->setFakeObjective(reinterpret_cast<double *> (NULL)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported by: antoine (via bug 224669)
Notes
Notes: svn path=/head/; revision=458136
Diffstat (limited to 'math/coinmp')
-rw-r--r--math/coinmp/files/patch-Cbc_src_CbcModel.cpp15
-rw-r--r--math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp17
-rw-r--r--math/coinmp/files/patch-Clp_src_ClpModel.cpp15
-rw-r--r--math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp15
4 files changed, 62 insertions, 0 deletions
diff --git a/math/coinmp/files/patch-Cbc_src_CbcModel.cpp b/math/coinmp/files/patch-Cbc_src_CbcModel.cpp
new file mode 100644
index 000000000000..c7294ad53743
--- /dev/null
+++ b/math/coinmp/files/patch-Cbc_src_CbcModel.cpp
@@ -0,0 +1,15 @@
+CbcModel.cpp:5322:41: error: reinterpret_cast from 'nullptr_t' to 'double *' is not allowed
+ clpSolver->setFakeObjective(reinterpret_cast<double *> (NULL));
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+--- Cbc/src/CbcModel.cpp.orig 2015-06-04 17:10:17 UTC
++++ Cbc/src/CbcModel.cpp
+@@ -5319,7 +5319,7 @@ void CbcModel::branchAndBound(int doStatistics)
+ OsiClpSolverInterface * clpSolver
+ = dynamic_cast<OsiClpSolverInterface *> (solver_);
+ if (clpSolver)
+- clpSolver->setFakeObjective(reinterpret_cast<double *> (NULL));
++ clpSolver->setFakeObjective(static_cast<double *> (NULL));
+ }
+ #endif
+ moreSpecialOptions_ = saveMoreSpecialOptions;
diff --git a/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp b/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp
new file mode 100644
index 000000000000..32b953439074
--- /dev/null
+++ b/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp
@@ -0,0 +1,17 @@
+In file included from CglLandPSimplex.cpp:11:
+In file included from ./CglLandPSimplex.hpp:31:
+./CglLandPUtils.hpp:88:25: error: reinterpret_cast from 'nullptr_t' to 'OsiRowCut *' is not allowed
+ cuts_.resize(i, reinterpret_cast<OsiRowCut *> (NULL));
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+--- Cgl/src/CglLandP/CglLandPUtils.hpp.orig 2013-04-06 20:39:53 UTC
++++ Cgl/src/CglLandP/CglLandPUtils.hpp
+@@ -85,7 +85,7 @@ struct Cuts
+ /** resize vector.*/
+ void resize(unsigned int i)
+ {
+- cuts_.resize(i, reinterpret_cast<OsiRowCut *> (NULL));
++ cuts_.resize(i, static_cast<OsiRowCut *> (NULL));
+ }
+ private:
+ /** Stores the number of cuts.*/
diff --git a/math/coinmp/files/patch-Clp_src_ClpModel.cpp b/math/coinmp/files/patch-Clp_src_ClpModel.cpp
new file mode 100644
index 000000000000..d6fd809c72ed
--- /dev/null
+++ b/math/coinmp/files/patch-Clp_src_ClpModel.cpp
@@ -0,0 +1,15 @@
+ClpModel.cpp:3848:24: error: reinterpret_cast from 'nullptr_t' to 'const char *' is not allowed
+ reinterpret_cast<const char*> (NULL) /*integrality*/,
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+--- Clp/src/ClpModel.cpp.orig 2015-03-19 08:09:18 UTC
++++ Clp/src/ClpModel.cpp
+@@ -3845,7 +3845,7 @@ ClpModel::writeMps(const char *filename,
+ writer.setMpsData(*(matrix_->getPackedMatrix()), COIN_DBL_MAX,
+ getColLower(), getColUpper(),
+ objective,
+- reinterpret_cast<const char*> (NULL) /*integrality*/,
++ static_cast<const char*> (NULL) /*integrality*/,
+ getRowLower(), getRowUpper(),
+ columnNames, rowNames);
+ // Pass in array saying if each variable integer
diff --git a/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp b/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp
new file mode 100644
index 000000000000..fc2f17d4f4bc
--- /dev/null
+++ b/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp
@@ -0,0 +1,15 @@
+OsiClpSolverInterface.cpp:1451:50: error: reinterpret_cast from 'nullptr_t' to 'int *' is not allowed
+ messagesPointer->setDetailMessages(100,10000,reinterpret_cast<int *> (NULL));
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+--- Clp/src/OsiClp/OsiClpSolverInterface.cpp.orig 2015-07-14 13:16:13 UTC
++++ Clp/src/OsiClp/OsiClpSolverInterface.cpp
+@@ -1448,7 +1448,7 @@ OsiClpSolverInterface::setupForRepeatedUse(int senseOf
+ if (stopPrinting) {
+ CoinMessages * messagesPointer = modelPtr_->messagesPointer();
+ // won't even build messages
+- messagesPointer->setDetailMessages(100,10000,reinterpret_cast<int *> (NULL));
++ messagesPointer->setDetailMessages(100,10000,static_cast<int *> (NULL));
+ }
+ #endif
+ }