Commit 9e8428db authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic 'fix_plugins_warnings'

012459ac Couple more warning fix
b5067f93 Fix random warning showing up on the dashboard
parents 52ff1f3f 012459ac
......@@ -34,6 +34,10 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
# ignore warnings from documentation generation tools.
"Warning.*Skipping it."
# ignore warnings from old plugins
"H5Part"
"AnalyzeNIfTIReaderWriter"
)
#------------------------------------------------------------------------------
......
......@@ -113,6 +113,8 @@ unsigned int vtkPVDataRepresentation::Initialize(unsigned int minIdAvailable, un
}
assert("Invalid Representation Id. Not enough reserved ids." && (maxIdAvailable >= minIdAvailable));
(void) maxIdAvailable; // Prevent warning in Release build
this->UniqueIdentifier = minIdAvailable;
return (1 + this->UniqueIdentifier);
}
......
......@@ -2326,9 +2326,9 @@ int vtkMaterialInterfaceFilter::HasNeighbor(
// !!! We have to loop over all axes whose direction component is 0.
// Convert index to working level.
levelDifference = level - blockLevel;
int mins[3];
int maxs[3];
int ix, iy, iz;
int mins[3] = {0,0,0};
int maxs[3] = {0,0,0};
int ix = 0, iy = 0, iz = 0;
// Compupte the range of potential neighbor indexes.
for (int ii = 0; ii < 3; ++ii)
......
......@@ -3151,7 +3151,8 @@ int vtkPEnSightGoldReader::ReadOrSkipCoordinates(vtkPoints* points, long offset,
*lineRead = this->ReadNextDataLine(line);
sscanf(line, " %s", subLine);
char *endptr;
strtod(subLine, &endptr); // Testing if we can convert this string to double
double value = strtod(subLine, &endptr); // Testing if we can convert this string to double
(void) value; // Prevent Warning to show up
if ( subLine != endptr )
{ // necessary if node ids were listed
for (i = 0; i < numPts; i++)
......@@ -3175,7 +3176,8 @@ int vtkPEnSightGoldReader::ReadOrSkipCoordinates(vtkPoints* points, long offset,
*lineRead = this->ReadNextDataLine(line);
sscanf(line, " %s", subLine);
char *endptr;
strtod(subLine, &endptr); // Testing if we can convert this string to double
double value = strtod(subLine, &endptr); // Testing if we can convert this string to double
(void) value; // Prevent Warning to show up
if ( subLine != endptr )
{ // necessary if node ids were listed
for (i = 0; i < numPts; i++)
......@@ -3226,7 +3228,8 @@ int vtkPEnSightGoldReader::ReadOrSkipCoordinates(vtkPoints* points, long offset,
sscanf(line, " %s", subLine);
char *endptr;
strtod(subLine, &endptr); // Testing if we can convert this string to double
double value = strtod(subLine, &endptr); // Testing if we can convert this string to double
(void) value; // Prevent Warning to show up
if ( subLine != endptr )
{ // necessary if node ids were listed
for (i = 0; i < numPts; i++)
......
......@@ -952,6 +952,7 @@ void vtkEDLShading::Render(const vtkRenderState *s)
void vtkEDLShading::ReleaseGraphicsResources(vtkWindow *w)
{
assert("pre: w_exists" && w!=0);
(void)w;
// SHADERS
if (this->EDLShadeProgram != 0)
......
......@@ -45,6 +45,8 @@ vtkStandardNewMacro(vtkRawStridedReader2);
int vtkRawStridedReader2::Read(float* data, int* uExtents)
{
size_t freadResult = 0; // For warning complain
size_t ir = uExtents[1] - uExtents[0] + 1;
size_t jr = uExtents[3] - uExtents[2] + 1;
size_t kr = uExtents[5] - uExtents[4] + 1;
......@@ -80,7 +82,7 @@ int vtkRawStridedReader2::Read(float* data, int* uExtents)
else
{
fseek(this->fp, index * sizeof(float), SEEK_SET);
fread(&(data[di]), sizeof(float), 1, this->fp);
freadResult = fread(&(data[di]), sizeof(float), 1, this->fp);
}
}
}
......@@ -98,7 +100,7 @@ int vtkRawStridedReader2::Read(float* data, int* uExtents)
(uExtents[0] +
(j + uExtents[2]) * js + (k + uExtents[4]) * ks) *
sizeof(float), SEEK_SET);
fread(&(data[di]), sizeof(float), ir, this->fp);
freadResult = fread(&(data[di]), sizeof(float), ir, this->fp);
}
}
#ifndef _WIN32
......@@ -110,6 +112,8 @@ int vtkRawStridedReader2::Read(float* data, int* uExtents)
vtkByteSwap::SwapVoidRange(data, ir * jr * kr, sizeof(float));
}
(void)freadResult; // To avoid warning
return 1;
}
......
......@@ -689,7 +689,7 @@ static void processHints(QGridLayout* panelLayout,
vtkSMProxy* smProxy,
QStringList& propertiesToHide,
QStringList& propertiesToShow,
bool summaryOnly)
bool vtkNotUsed(summaryOnly))
{
// Obtain the list of input ports, we don't show any widgets for input ports.
QList<const char*> inputPortNames =
......
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