Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2018 12:37:46 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458136 - head/math/coinmp/files
Message-ID:  <201801051237.w05Cbkpi069597@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Jan  5 12:37:45 2018
New Revision: 458136
URL: https://svnweb.freebsd.org/changeset/ports/458136

Log:
  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)

Added:
  head/math/coinmp/files/patch-Cbc_src_CbcModel.cpp   (contents, props changed)
  head/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp   (contents, props changed)
  head/math/coinmp/files/patch-Clp_src_ClpModel.cpp   (contents, props changed)
  head/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp   (contents, props changed)

Added: head/math/coinmp/files/patch-Cbc_src_CbcModel.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/coinmp/files/patch-Cbc_src_CbcModel.cpp	Fri Jan  5 12:37:45 2018	(r458136)
@@ -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;

Added: head/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/coinmp/files/patch-Cgl_src_CglLandP_CglLandPUtils.hpp	Fri Jan  5 12:37:45 2018	(r458136)
@@ -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.*/

Added: head/math/coinmp/files/patch-Clp_src_ClpModel.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/coinmp/files/patch-Clp_src_ClpModel.cpp	Fri Jan  5 12:37:45 2018	(r458136)
@@ -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

Added: head/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/math/coinmp/files/patch-Clp_src_OsiClp_OsiClpSolverInterface.cpp	Fri Jan  5 12:37:45 2018	(r458136)
@@ -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
+ }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801051237.w05Cbkpi069597>