diff options
Diffstat (limited to 'visit_fix_gcc7.patch')
-rw-r--r-- | visit_fix_gcc7.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/visit_fix_gcc7.patch b/visit_fix_gcc7.patch new file mode 100644 index 000000000000..f9c3a518ffe7 --- /dev/null +++ b/visit_fix_gcc7.patch @@ -0,0 +1,43 @@ +------------------------------------------------------------------------ +r31082 | whitlocb | 2017-06-16 00:19:15 +0200 (Fri, 16 Jun 2017) | 1 line + +Fix for GCC 7 + +Index: databases/Vs/VsStaggeredField.C +=================================================================== +--- databases/Vs/VsStaggeredField.C (revision 31081) ++++ databases/Vs/VsStaggeredField.C (revision 31082) +@@ -26,10 +26,13 @@ + this->indexOrder = VsSchema::compMajorCKey; + this->centering = VsSchema::nodalCenteringKey; + ++#if 0 ++ // There is no clear method under GCC 7. What good would it do here anyway? + this->oriCellDims.clear(); + this->oriCellDimProd.clear(); + this->newCellDims.clear(); + this->newCellDimProd.clear(); ++#endif + } + + template<class TYPE> +@@ -136,7 +139,7 @@ + // iterate over subgrid + for (size_t subBigIndx = 0; subBigIndx < this->numNeighbors; ++subBigIndx) { + std::valarray<int> subCellInds = this->getSubCellIndexSet(subBigIndx); +- std::valarray<int> newCellInds = oriCellInds*this->numNeighbors + subCellInds; ++ std::valarray<int> newCellInds = oriCellInds*static_cast<TYPE>(this->numNeighbors) + subCellInds; + size_t newBigIndx = this->getNewBigIndex(newCellInds); + std::valarray<TYPE> xi = std::valarray<TYPE>(subCellInds) / this->twoPowSubRes; + this->setNewFieldVals(newBigIndx, xi, sigmaVals, neighVals, dataPtr); +@@ -147,7 +150,7 @@ + template <class TYPE> + std::valarray<int> + VsStaggeredField<TYPE>::getOriCellIndexSet(size_t bigIndex) const { +- return (bigIndex / this->oriCellDimProd) % this->oriCellDims; ++ return (bigIndex / static_cast<TYPE>(this->oriCellDimProd)) % this->oriCellDims; + } + + template <class TYPE> + +------------------------------------------------------------------------ |