svn commit: r458137 - branches/2018Q1/math/coinmp/files

Jan Beich jbeich at FreeBSD.org
Fri Jan 5 12:38:28 UTC 2018


Author: jbeich
Date: Fri Jan  5 12:38:26 2018
New Revision: 458137
URL: https://svnweb.freebsd.org/changeset/ports/458137

Log:
  MFH: r458136
  
  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)
  Approved by:	ports-secteam blanket

Added:
  branches/2018Q1/math/coinmp/files/patch-Cbc_src_CbcModel.cpp
     - copied unchanged from r458136, head/math/coinmp/files/patch-Cbc_src_CbcModel.cpp
  branches/2018Q1/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp
     - copied unchanged from r458136, head/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp
  branches/2018Q1/math/coinmp/files/patch-Clp_src_ClpModel.cpp
     - copied unchanged from r458136, head/math/coinmp/files/patch-Clp_src_ClpModel.cpp
  branches/2018Q1/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp
     - copied unchanged from r458136, head/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp
Modified:
Directory Properties:
  branches/2018Q1/   (props changed)

Copied: branches/2018Q1/math/coinmp/files/patch-Cbc_src_CbcModel.cpp (from r458136, head/math/coinmp/files/patch-Cbc_src_CbcModel.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q1/math/coinmp/files/patch-Cbc_src_CbcModel.cpp	Fri Jan  5 12:38:26 2018	(r458137, copy of r458136, head/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;

Copied: branches/2018Q1/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp (from r458136, head/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q1/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp	Fri Jan  5 12:38:26 2018	(r458137, copy of r458136, head/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.*/

Copied: branches/2018Q1/math/coinmp/files/patch-Clp_src_ClpModel.cpp (from r458136, head/math/coinmp/files/patch-Clp_src_ClpModel.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q1/math/coinmp/files/patch-Clp_src_ClpModel.cpp	Fri Jan  5 12:38:26 2018	(r458137, copy of r458136, head/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

Copied: branches/2018Q1/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp (from r458136, head/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q1/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp	Fri Jan  5 12:38:26 2018	(r458137, copy of r458136, head/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
+ }


More information about the svn-ports-branches mailing list