Commit ffcd0f1c authored by Sean McBride's avatar Sean McBride
Browse files

COMP: fixed a whole bunch of clang dashboard warnings

parent fc1d676c
......@@ -43,21 +43,6 @@
//-----------------------------------------------------------------------------
namespace {
// See if the point is within tolerance on x and between base and extent on Y.
bool inRange(const vtkVector2f& point, const vtkVector2f& tol,
const vtkVector3f& current)
{
if (current.X() > point.X() - tol.X() && current.X() < point.X() + tol.X() &&
point.Y() > current.Y() && point.Y() < current.Z())
{
return true;
}
else
{
return false;
}
}
// Compare the two vectors, in X component only
bool compVector2fX(const vtkVector2f& v1, const vtkVector2f& v2)
{
......@@ -71,19 +56,6 @@ bool compVector2fX(const vtkVector2f& v1, const vtkVector2f& v2)
}
}
// Compare the two vectors, in X component only
bool compVector3fX(const vtkVector3f& v1, const vtkVector3f& v2)
{
if (v1.X() < v2.X())
{
return true;
}
else
{
return false;
}
}
// Copy the two arrays into the points array
template<class A, class B>
void CopyToPoints(vtkPoints2D *points, vtkPoints2D *previous_points, A *a, B *b,
......
......@@ -231,27 +231,27 @@ void vtkImageMultipleInputFilter::MultiThread(vtkImageData **inputs,
//----------------------------------------------------------------------------
// The execute method created by the subclass.
void vtkImageMultipleInputFilter::ThreadedExecute(vtkImageData
**vtkNotUsed(inData),
void vtkImageMultipleInputFilter::ThreadedExecute(vtkImageData
**vtkNotUsed(inData),
vtkImageData *vtkNotUsed(outData),
int extent[6], int threadId)
{
extent = extent;
(void)extent;
if (threadId == 0)
{
vtkErrorMacro("subclass must override ThreadedExecute!!!");
}
}
//----------------------------------------------------------------------------
// For streaming and threads. Splits output update extent into num pieces.
// This method needs to be called num times. Results must not overlap for
// consistent starting extent. Subclass can override this method.
// This method returns the number of peices resulting from a successful split.
// This can be from 1 to "total".
// This can be from 1 to "total".
// If 1 is returned, the extent cannot be split.
int vtkImageMultipleInputFilter::SplitExtent(int splitExt[6], int startExt[6],
int vtkImageMultipleInputFilter::SplitExtent(int splitExt[6], int startExt[6],
int num, int total)
{
int splitAxis;
......@@ -259,7 +259,7 @@ int vtkImageMultipleInputFilter::SplitExtent(int splitExt[6], int startExt[6],
vtkDebugMacro("SplitExtent: ( " << startExt[0] << ", " << startExt[1] << ", "
<< startExt[2] << ", " << startExt[3] << ", "
<< startExt[4] << ", " << startExt[5] << "), "
<< startExt[4] << ", " << startExt[5] << "), "
<< num << " of " << total);
// start with same extent
......
......@@ -206,21 +206,21 @@ void vtkImageMultipleInputOutputFilter::ExecuteData(vtkDataObject *out)
//----------------------------------------------------------------------------
// The execute method created by the subclass.
void vtkImageMultipleInputOutputFilter::
ThreadedExecute(vtkImageData **vtkNotUsed(inData),
ThreadedExecute(vtkImageData **vtkNotUsed(inData),
vtkImageData **vtkNotUsed(outData),
int extent[6], int vtkNotUsed(threadId))
{
extent = extent;
(void)extent;
vtkErrorMacro("Subclass should override this method!!!");
}
//----------------------------------------------------------------------------
// The execute method created by the subclass.
void vtkImageMultipleInputOutputFilter::
ThreadedExecute(vtkImageData **vtkNotUsed(inData),
ThreadedExecute(vtkImageData **vtkNotUsed(inData),
vtkImageData *vtkNotUsed(outData),
int extent[6], int vtkNotUsed(threadId))
{
extent = extent;
(void)extent;
vtkErrorMacro("This method should not be called!");
}
......@@ -429,11 +429,11 @@ void vtkImageToImageFilter::MultiThread(vtkImageData *inData,
//----------------------------------------------------------------------------
// The execute method created by the subclass.
void vtkImageToImageFilter::ThreadedExecute(vtkImageData *vtkNotUsed(inData),
void vtkImageToImageFilter::ThreadedExecute(vtkImageData *vtkNotUsed(inData),
vtkImageData *vtkNotUsed(outData),
int extent[6], int threadId)
{
extent = extent;
(void)extent;
if (threadId == 0)
{
vtkErrorMacro("subclass should override ThreadedExecute!!!");
......
......@@ -82,19 +82,6 @@ bool CompareData(vtkRectilinearGrid* Output, vtkRectilinearGrid* Input)
return true;
}
void InitializeData(vtkStructuredGrid* Data)
{
Data->SetDimensions(2, 3, 4);
}
bool CompareData(vtkStructuredGrid* Output, vtkStructuredGrid* Input)
{
if(memcmp(Input->GetDimensions(), Output->GetDimensions(), 3 * sizeof(int)))
return false;
return true;
}
void InitializeData(vtkUnstructuredGrid* Data)
{
vtkCubeSource* const source = vtkCubeSource::New();
......
......@@ -2269,7 +2269,7 @@ int vtkDataReader::ReadTensorData(vtkDataSetAttributes *a, int numPts)
// Read color scalar point attributes. Return 0 if error.
int vtkDataReader::ReadCoScalarData(vtkDataSetAttributes *a, int numPts)
{
int i, j, idx, numComp, skipScalar=0;
int i, j, idx, numComp=0, skipScalar=0;
char name[256];
char buffer[1024];
......@@ -2363,7 +2363,7 @@ int vtkDataReader::ReadCoScalarData(vtkDataSetAttributes *a, int numPts)
// Read texture coordinates point attributes. Return 0 if error.
int vtkDataReader::ReadTCoordsData(vtkDataSetAttributes *a, int numPts)
{
int dim;
int dim = 0;
int skipTCoord = 0;
char line[256], name[256];
vtkDataArray *data;
......@@ -2513,7 +2513,7 @@ int vtkDataReader::ReadPedigreeIds(vtkDataSetAttributes *a, int numPts)
int vtkDataReader::ReadLutData(vtkDataSetAttributes *a)
{
int i;
int size, skipTable=0;
int size=0, skipTable=0;
vtkLookupTable *lut;
unsigned char *ptr;
char line[256], name[256];
......@@ -2725,7 +2725,7 @@ int vtkDataReader::ReadCells(int size, int *data,
vtkFieldData *vtkDataReader::ReadFieldData()
{
int i, numArrays, skipField=0;
int i, numArrays=0, skipField=0;
vtkFieldData *f;
char name[256], type[256];
int numComp, numTuples;
......
......@@ -383,12 +383,14 @@ public:
int getlowbound(int iBoundNum = 0) const
{
(void)iBoundNum;
return m_iLow;
};
int gethighbound(int iBoundNum = 0) const
{
(void)iBoundNum;
return m_iHigh;
};
......
......@@ -172,7 +172,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
METHODDEF(void)
term_source (j_decompress_ptr cinfo)
{
cinfo=cinfo;
(void)cinfo;
/* no work necessary here */
}
......
......@@ -525,7 +525,7 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_error(png_ptr, "No image in file");
info_ptr = info_ptr; /* quiet compiler warnings about unused info_ptr */
(void)info_ptr; /* quiet compiler warnings about unused info_ptr */
}
png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND);
......
......@@ -984,8 +984,8 @@ void* vtkPythonUtil::SIPGetPointerFromObject(PyObject *obj, const char *classnam
}
return ptr;
#else
obj = obj;
classname = classname;
(void)obj;
(void)classname;
PyErr_SetString(PyExc_TypeError, "method requires VTK built with SIP support");
return NULL;
#endif
......@@ -1023,9 +1023,9 @@ PyObject* vtkPythonUtil::SIPGetObjectFromPointer(const void *ptr, const char* cl
return api->api_convert_from_type(const_cast<void*>(ptr), td, NULL);
#else
ptr = ptr;
classname = classname;
is_new = is_new;
(void)ptr;
(void)classname;
(void)is_new;
PyErr_SetString(PyExc_TypeError, "method requires VTK built with SIP support");
return NULL;
#endif
......
Supports Markdown
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