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