[paraview] 01/03: Fix compilation with gcc-4.9. (Closes: #746896)

Anton Gladky gladk at moszumanska.debian.org
Fri May 30 23:08:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository paraview.

commit 65f37ce84d5b6be7eb9c2b04cae5cc4216fb520f
Author: Anton Gladky <gladk at debian.org>
Date:   Fri May 30 23:29:33 2014 +0200

    Fix compilation with gcc-4.9. (Closes: #746896)
---
 debian/patches/fix_ftbfs_gcc49.patch | 128 +++++++++++++++++++++++++++++++++++
 debian/patches/series                |   1 +
 2 files changed, 129 insertions(+)

diff --git a/debian/patches/fix_ftbfs_gcc49.patch b/debian/patches/fix_ftbfs_gcc49.patch
new file mode 100644
index 0000000..ba33389
--- /dev/null
+++ b/debian/patches/fix_ftbfs_gcc49.patch
@@ -0,0 +1,128 @@
+Description: fix compilation with gcc-4.9
+Author: Anton Gladky <gladk at debian.org>
+Bug-Debian: http://bugs.debian.org/#746896
+Forwarded: https://github.com/Kitware/VTK/pull/7
+Last-Update: 2014-05-30
+
+--- vtk6-6.1.0+dfsg.orig/VTK/Filters/ParallelMPI/vtkDistributedDataFilter.cxx
++++ vtk6-6.1.0+dfsg/VTK/Filters/ParallelMPI/vtkDistributedDataFilter.cxx
+@@ -1094,7 +1094,10 @@ vtkDataSet *vtkDistributedDataFilter::Te
+   vtkIdType cellsPerNode = numTotalCells / nprocs;
+ 
+   vtkIdList **sendCells = new vtkIdList * [ nprocs ];
+-  memset(sendCells, 0, sizeof(vtkIdList *) * nprocs);
++  
++  if (sizeof(vtkIdList *) * nprocs > 0) {
++    memset(sendCells, 0, sizeof(vtkIdList *) * nprocs);
++  }
+ 
+   if (numConsumers == nprocs - 1)
+     {
+@@ -1585,7 +1588,9 @@ vtkFloatArray **
+   // Exchange int arrays
+ 
+   float **recvArrays = new float * [nprocs];
+-  memset(recvArrays, 0, sizeof(float *) * nprocs);
++  if (sizeof(float *) * nprocs > 0) {
++    memset(recvArrays, 0, sizeof(float *) * nprocs);
++  }
+ 
+   if (sendSize[me] > 0)  // sent myself an array
+     {
+@@ -1706,7 +1711,9 @@ vtkIdTypeArray **
+   // Exchange int arrays
+ 
+   vtkIdType **recvArrays = new vtkIdType * [nprocs];
+-  memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs);
++  if (sizeof(vtkIdType *) * nprocs > 0) {
++    memset(recvArrays, 0, sizeof(vtkIdType *) * nprocs);
++  }
+ 
+   if (sendSize[me] > 0)  // sent myself an array
+     {
+@@ -2810,7 +2817,9 @@ void vtkDistributedDataFilter::AddConsta
+ 
+   unsigned char *vals = new unsigned char [npoints];
+ 
+-  memset(vals, val, npoints);
++  if (npoints > 0) {
++    memset(vals, val, npoints);
++  }
+ 
+   vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New();
+   Array->SetName(arrayName);
+@@ -2830,7 +2839,9 @@ void vtkDistributedDataFilter::AddConsta
+ 
+   unsigned char *vals = new unsigned char [ncells];
+ 
+-  memset(vals, val, ncells);
++  if (ncells > 0) {
++    memset(vals, val, ncells);
++  }
+ 
+   vtkUnsignedCharArray *Array = vtkUnsignedCharArray::New();
+   Array->SetName(arrayName);
+@@ -3027,7 +3038,9 @@ int vtkDistributedDataFilter::AssignGlob
+   vtkIdType nGridPoints = grid->GetNumberOfPoints();
+ 
+   vtkIdType *numPointsOutside = new vtkIdType [nprocs];
+-  memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs);
++  if (sizeof(vtkIdType) * nprocs > 0) {
++    memset(numPointsOutside, 0, sizeof(vtkIdType) * nprocs);
++  }
+ 
+   vtkIdTypeArray *globalIds = vtkIdTypeArray::New();
+   globalIds->SetNumberOfValues(nGridPoints);
+@@ -3109,10 +3122,16 @@ int vtkDistributedDataFilter::AssignGlob
+   // global ID back?
+ 
+   vtkFloatArray **ptarrayOut = new vtkFloatArray * [nprocs];
+-  memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs);
++  
++  if (sizeof(vtkFloatArray *) * nprocs > 0) {
++    memset(ptarrayOut, 0, sizeof(vtkFloatArray *) * nprocs);
++  }
+ 
+   vtkIdTypeArray **localIds     = new vtkIdTypeArray * [nprocs];
+-  memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++  
++  if (sizeof(vtkIdTypeArray *) * nprocs > 0) {
++    memset(localIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++  }
+ 
+   vtkIdType *next = new vtkIdType [nprocs];
+   vtkIdType *next3 = new vtkIdType [nprocs];
+@@ -3287,7 +3306,9 @@ vtkIdTypeArray **vtkDistributedDataFilte
+     {
+     // There are no cells in my assigned region
+ 
+-    memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs);
++    if (sizeof(vtkIdTypeArray *) * nprocs > 0) {
++      memset(gids, 0, sizeof(vtkIdTypeArray *) * nprocs);
++    }
+ 
+     return gids;
+     }
+@@ -3492,7 +3513,10 @@ vtkIdTypeArray **vtkDistributedDataFilte
+   std::multimap<int, int>::iterator mapIt;
+ 
+   vtkIdTypeArray **processList = new vtkIdTypeArray * [nprocs];
+-  memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs);
++
++  if (sizeof (vtkIdTypeArray *) * nprocs > 0) {
++    memset(processList, 0, sizeof (vtkIdTypeArray *) * nprocs);
++  }
+ 
+   for (int i=0; i<nprocs; i++)
+     {
+@@ -3582,7 +3606,9 @@ vtkIdTypeArray **vtkDistributedDataFilte
+   vtkIdType numPoints = grid->GetNumberOfPoints();
+ 
+   vtkIdTypeArray **ghostPtIds = new vtkIdTypeArray * [nprocs];
+-  memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++  if (sizeof(vtkIdTypeArray *) * nprocs) {
++    memset(ghostPtIds, 0, sizeof(vtkIdTypeArray *) * nprocs);
++  }
+ 
+   if (numPoints < 1)
+     {
diff --git a/debian/patches/series b/debian/patches/series
index bcad074..7df6a0e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ fix_manpages_errors.patch
 fix_libav10.patch
 fix_path_paraview.patch
 fix_FTBFS_KWSys.patch
+fix_ftbfs_gcc49.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/paraview.git



More information about the debian-science-commits mailing list