Commit 171efbea authored by Sean McBride's avatar Sean McBride
Browse files

Fixed cast/alignment warning by cppcheck

Everywhere I search, the last param of MPI_Alloc_mem
is void*, so I don’t see why this contortion was
even required.
parent 22ad855c
Pipeline #6490 passed with stage
...@@ -86,9 +86,7 @@ void vtkCompositer::ResizeFloatArray(vtkFloatArray* fa, int numComp, ...@@ -86,9 +86,7 @@ void vtkCompositer::ResizeFloatArray(vtkFloatArray* fa, int numComp,
{ {
MPI_Free_mem(ptr); MPI_Free_mem(ptr);
} }
char* tptr; MPI_Alloc_mem(size*numComp*sizeof(float), NULL, &ptr);
MPI_Alloc_mem(size*numComp*sizeof(float), NULL, &tptr);
ptr = (float*)tptr;
fa->SetArray(ptr, size*numComp, 1); fa->SetArray(ptr, size*numComp, 1);
} }
else else
...@@ -114,9 +112,7 @@ void vtkCompositer::ResizeUnsignedCharArray(vtkUnsignedCharArray* uca, ...@@ -114,9 +112,7 @@ void vtkCompositer::ResizeUnsignedCharArray(vtkUnsignedCharArray* uca,
{ {
MPI_Free_mem(ptr); MPI_Free_mem(ptr);
} }
char* tptr; MPI_Alloc_mem(size*numComp*sizeof(unsigned char), NULL, &ptr);
MPI_Alloc_mem(size*numComp*sizeof(unsigned char), NULL, &tptr);
ptr = (unsigned char*)tptr;
uca->SetArray(ptr, size*numComp, 1); uca->SetArray(ptr, size*numComp, 1);
} }
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment