Commit 4a1d587e authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic 'random_warning_fix'

1e6d44fa Expend protobuf warning exclude regexp
90ddb4c4 Fix SpyPlot bug noticed by a warning
4520ecda Fix cast issue / static method / ignore warning
642ccd3d Fix various warnings
a6a77da8 Tmp warning fix due to modularization unfinished work
cc5e5c86 Fix pqCheckableHeaderView.cxx warnings
6322ddd6 Fix SessionProxyManager Warning
parents d7f87ba1 1e6d44fa
......@@ -9,8 +9,9 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
#ignore protobuf related warnings.
"ThirdParty.protobuf/"
"google.protobuf"
"vtkPVMessage.pb.h"
"protobuf"
"vtkPVMessage"
"vtkSMMessage"
"google::protobuf::Message"
#ignore warnings coming from QT headers.
......
......@@ -188,14 +188,12 @@ int vtkPythonProgrammableFilter::RequestInformation(
// Setup ExtentTranslator so that all downstream piece requests are
// converted to whole extent update requests, as need by the histogram filter.
vtkStreamingDemandDrivenPipeline* sddp =
vtkStreamingDemandDrivenPipeline::SafeDownCast(this->GetExecutive());
if (strcmp(
sddp->GetExtentTranslator(outInfo)->GetClassName(),
vtkStreamingDemandDrivenPipeline::GetExtentTranslator(outInfo)->GetClassName(),
"vtkOnePieceExtentTranslator") != 0)
{
vtkExtentTranslator* et = vtkOnePieceExtentTranslator::New();
sddp->SetExtentTranslator(outInfo, et);
vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, et);
et->Delete();
}
......
......@@ -1488,8 +1488,7 @@ bool vtkPVSynchronizedRenderWindows::BroadcastToDataServer(vtkSelection* selecti
return true;
}
vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
if (pm->GetProcessType() == vtkProcessModule::PROCESS_RENDER_SERVER)
if (vtkProcessModule::GetProcessType() == vtkProcessModule::PROCESS_RENDER_SERVER)
{
return false;
}
......
......@@ -687,7 +687,7 @@ void vtkPVXMLElement::CopyTo(vtkPVXMLElement* other)
other->Internal->AttributeNames = this->Internal->AttributeNames;
other->Internal->AttributeValues = this->Internal->AttributeValues;
other->AddCharacterData(this->Internal->CharacterData.c_str(),
this->Internal->CharacterData.size());
static_cast<int>(this->Internal->CharacterData.size()));
// Copy recursivly
vtkPVXMLElementInternals::VectorOfElements::iterator iter;
......@@ -709,7 +709,7 @@ void vtkPVXMLElement::CopyAttributesTo(vtkPVXMLElement* other)
other->Internal->AttributeNames = this->Internal->AttributeNames;
other->Internal->AttributeValues = this->Internal->AttributeValues;
other->AddCharacterData(this->Internal->CharacterData.c_str(),
this->Internal->CharacterData.size());
static_cast<int>(this->Internal->CharacterData.size()));
}
//----------------------------------------------------------------------------
......
......@@ -2101,7 +2101,7 @@ void vtkSMProxy::LoadState( const vtkSMMessage* message,
// Make sure all dependent domains are updated. UpdateInformation()
// might have produced new information that invalidates the domains.
for (int i=0, nb=touchedProperties.size(); i < nb; i++)
for (int i=0, nb=static_cast<int>(touchedProperties.size()); i < nb; i++)
{
touchedProperties[i]->UpdateDependentDomains();
}
......
......@@ -254,6 +254,7 @@ vtkIdType vtkSMSession::ConnectToRemote(const char* hostname, int port,
bool allowRemoteRendering)
{
// FIXME:MODULARIZATION
(void) allowRemoteRendering;
// vtkPVRenderView::AllowRemoteRendering(allowRemoteRendering);
vtksys_ios::ostringstream sname;
sname << "cs://" << hostname << ":" << port;
......
......@@ -1196,9 +1196,9 @@ vtkPVXMLElement* vtkSMSessionProxyManager::AddInternalState(vtkPVXMLElement *par
// Set version number on the state element.
vtksys_ios::ostringstream version_string;
vtkSMProxyManager* px = vtkSMProxyManager::GetProxyManager();
version_string << px->GetVersionMajor() << "."
<< px->GetVersionMinor() << "." << px->GetVersionPatch();
version_string << vtkSMProxyManager::GetVersionMajor() << "."
<< vtkSMProxyManager::GetVersionMinor() << "."
<< vtkSMProxyManager::GetVersionPatch();
rootElement->AddAttribute("version", version_string.str().c_str());
......
......@@ -136,7 +136,7 @@ vtkTypeUInt32 vtkSMSourceProxy::GetGlobalID()
//---------------------------------------------------------------------------
unsigned int vtkSMSourceProxy::GetNumberOfOutputPorts()
{
return this->PInternals->OutputPorts.size();
return static_cast<int>(this->PInternals->OutputPorts.size());
}
//---------------------------------------------------------------------------
......@@ -549,9 +549,9 @@ void vtkSMSourceProxy::CreateSelectionProxies()
// This happen in collaboration mode when the SelectionProxy
// became alive because of the SelectionRepresentation before the
// CreateSelectionProxies() get called on the original source proxy...
if( esProxy =
vtkSMSourceProxy::SafeDownCast(
this->Session->GetRemoteObject(this->GetGlobalID()+j+1)))
if( (esProxy =
vtkSMSourceProxy::SafeDownCast(
this->Session->GetRemoteObject(this->GetGlobalID()+j+1))) != NULL)
{
esProxy->DisableSelectionProxies = true;
this->PInternals->SelectionProxies[j] = esProxy;
......
......@@ -716,7 +716,6 @@ bool vtkSMStateVersionController::ConvertExodusIIReader(vtkPVXMLElement* root)
for (unsigned int cc=0; cc < numElements; cc++)
{
vtkPVXMLElement* prop = root->GetNestedElement(cc);
const char* propName = prop->GetAttribute("name");
for (unsigned int dd=0; dd < prop->GetNumberOfNestedElements(); dd++)
{
vtkPVXMLElement* blockProp = prop->GetNestedElement(dd);
......@@ -756,7 +755,6 @@ bool vtkSMStateVersionController::ConvertExodusIIReader(vtkPVXMLElement* root)
}
}
return true;
}
namespace
......
......@@ -777,7 +777,7 @@ vtkSMViewProxy* vtkSMViewLayoutProxy::GetView(int location)
if (!this->Internals->IsCellValid(location))
{
vtkErrorMacro("Invalid location '" << location << "' specified.");
return false;
return NULL;
}
return this->Internals->KDTree[location].ViewProxy;
......
......@@ -102,7 +102,7 @@ struct Controller
bool RemoveRMICallback(unsigned long observerTagId)
{
int size = this->RMICallbackIdMapping[observerTagId].size();
int size = static_cast<int>(this->RMICallbackIdMapping[observerTagId].size());
bool result = false;
for(int i=0;i<size;i++)
{
......@@ -307,7 +307,7 @@ public:
//-----------------------------------------------------------------
int GetNumberOfRegisteredControllers()
{
return this->Controllers.size();
return static_cast<int>(this->Controllers.size());
}
//-----------------------------------------------------------------
vtkCommunicator* GetActiveCommunicator()
......@@ -390,7 +390,7 @@ public:
//-----------------------------------------------------------------
int GetNumberOfControllers()
{
return this->Controllers.size();
return static_cast<int>(this->Controllers.size());
}
//-----------------------------------------------------------------
int GetControllerId(int idx)
......
......@@ -84,7 +84,7 @@ void vtkPVKeyFrame::SetNumberOfKeyValues(unsigned int num)
//----------------------------------------------------------------------------
unsigned int vtkPVKeyFrame::GetNumberOfKeyValues()
{
return this->Internals->KeyValues.size();
return static_cast<unsigned int>(this->Internals->KeyValues.size());
}
//----------------------------------------------------------------------------
......
......@@ -140,7 +140,7 @@ void vtkPVKeyFrameCueManipulator::RemoveAllKeyFrames()
//----------------------------------------------------------------------------
unsigned int vtkPVKeyFrameCueManipulator::GetNumberOfKeyFrames()
{
return this->Internals->KeyFrames.size();
return static_cast<unsigned int>(this->Internals->KeyFrames.size());
}
//----------------------------------------------------------------------------
......
......@@ -695,18 +695,18 @@ int vtkSpyPlotReader::RequestData(
{
block=blockIterator->GetBlock();
int level = 0;
int hasBadGhostCells;
int realExtents[6];
int realDims[3];
int extents[6];
double spacing[3];
double origin[3];
hasBadGhostCells = block->GetAMRInformation(*this->Bounds,
&level, spacing,
origin, extents,
realExtents,
realDims);
for(int i=blocksPerLevel.size(); i<=level; i++)
// int hasBadGhostCells =
block->GetAMRInformation(*this->Bounds,
&level, spacing,
origin, extents,
realExtents,
realDims);
for(int i=static_cast<int>(blocksPerLevel.size()); i<=level; i++)
{
blocksPerLevel.push_back(0);
}
......@@ -2280,7 +2280,7 @@ void vtkSpyPlotReader::SetGlobalLevels(vtkCompositeDataSet *composite)
for(unsigned int level = 0; level<numberOfLevels; level++)
{
int globalIndex = globalIndices[level];
int numberOfDataSets = datasets[level].size();
int numberOfDataSets = static_cast<int>(datasets[level].size());
// put the datasets back starting at globalIndex.
// All other indices are in their initialized state.
for (int kk=0; kk < numberOfDataSets; kk++)
......
......@@ -1316,6 +1316,11 @@ int vtkSpyPlotUniReader::ReadInformation()
//now that the group header has been read create the data dumps
this->DataDumps = new vtkSpyPlotUniReader::DataDump[this->NumberOfDataDumps];
// clear the memory, instead of using constructors
const std::size_t length = sizeof(vtkSpyPlotUniReader::DataDump) *
static_cast<std::size_t>(this->NumberOfDataDumps);
memset(this->DataDumps, 0, length);
//Setup time information
this->TimeStepRange[1] = this->NumberOfDataDumps-1;
this->TimeRange[0] = this->DumpTime[0];
......@@ -1437,7 +1442,7 @@ int vtkSpyPlotUniReader::ReadDataDumps(vtkSpyPlotIStream *spis)
}
spis->Seek(offset);
vtkSpyPlotUniReader::DataDump *dh = &this->DataDumps[dump];
memset(dh, 0, sizeof(dh));
if ( !spis->ReadInt32s(&(dh->NumVars), 1) )
{
vtkErrorMacro( "Cannot read number of variables" );
......
......@@ -41,7 +41,7 @@ pqObjectPanel* PrismObjectPanelsImplementation::createPanel(pqProxy* proxy, QWid
{
if(!proxy)
{
return false;
return NULL;
}
......
......@@ -60,11 +60,11 @@ documentation and/or software.
// F, G, H and I are basic MD5 functions.
inline MD5::uint4 MD5::F(uint4 x, uint4 y, uint4 z) {
return x&y | ~x&z;
return (x&y) | (~x&z);
}
inline MD5::uint4 MD5::G(uint4 x, uint4 y, uint4 z) {
return x&z | y&~z;
return (x&z) | (y&~z);
}
inline MD5::uint4 MD5::H(uint4 x, uint4 y, uint4 z) {
......@@ -112,7 +112,7 @@ MD5::MD5()
MD5::MD5(const std::string &text)
{
init();
update(text.c_str(), text.length());
update(text.c_str(), static_cast<size_type>(text.length()));
finalize();
}
......
......@@ -389,7 +389,7 @@ void pqXYChartDisplayPanel::setCurrentSeriesThickness(int thickness)
}
//-----------------------------------------------------------------------------
void pqXYChartDisplayPanel::setCurrentSeriesStyle(int style)
void pqXYChartDisplayPanel::setCurrentSeriesStyle(int newStyle)
{
QItemSelectionModel *model = this->Internal->SeriesList->selectionModel();
if (model)
......@@ -399,14 +399,14 @@ void pqXYChartDisplayPanel::setCurrentSeriesStyle(int style)
QModelIndexList::Iterator iter = indexes.begin();
for( ; iter != indexes.end(); ++iter)
{
this->Internal->SettingsModel->setSeriesStyle(iter->row(), style);
this->Internal->SettingsModel->setSeriesStyle(iter->row(), newStyle);
}
this->Internal->InChange = false;
}
}
//-----------------------------------------------------------------------------
void pqXYChartDisplayPanel::setCurrentSeriesMarkerStyle(int style)
void pqXYChartDisplayPanel::setCurrentSeriesMarkerStyle(int newStyle)
{
QItemSelectionModel *model = this->Internal->SeriesList->selectionModel();
if (model)
......@@ -416,7 +416,7 @@ void pqXYChartDisplayPanel::setCurrentSeriesMarkerStyle(int style)
QModelIndexList::Iterator iter = indexes.begin();
for( ; iter != indexes.end(); ++iter)
{
this->Internal->SettingsModel->setSeriesMarkerStyle(iter->row(), style);
this->Internal->SettingsModel->setSeriesMarkerStyle(iter->row(), newStyle);
}
this->Internal->InChange = false;
}
......
......@@ -42,8 +42,8 @@ pqParallelCoordinatesChartView::pqParallelCoordinatesChartView(const QString& gr
const QString& name,
vtkSMContextViewProxy* viewModule,
pqServer* server,
QObject* parent/*=NULL*/):
Superclass(chartViewType(), group, name, viewModule, server, parent)
QObject* p/*=NULL*/):
Superclass(chartViewType(), group, name, viewModule, server, p)
{
QObject::connect(this, SIGNAL(representationAdded(pqRepresentation*)),
this, SLOT(onAddRepresentation(pqRepresentation*)));
......
......@@ -156,7 +156,7 @@ bool pqCheckableHeaderView::eventFilter(QObject *, QEvent *e)
return false;
}
void pqCheckableHeaderView::mousePressEvent(QMouseEvent *event)
void pqCheckableHeaderView::mousePressEvent(QMouseEvent *e)
{
QAbstractItemModel *current = this->model();
......@@ -179,17 +179,17 @@ void pqCheckableHeaderView::mousePressEvent(QMouseEvent *event)
// Capture mouse clicks on the checkbox icon and emit checkStateChanged signals.
// Assuming left/bottom aligned checkbox
if(event->x() <= (icon.width() + buttonMargin - 1) &&
event->x() >= (buttonMargin - 1) &&
event->y() <= (icon.height() + buttonMargin - 1) &&
event->y() >= (buttonMargin - 1))
if(e->x() <= (icon.width() + buttonMargin - 1) &&
e->x() >= (buttonMargin - 1) &&
e->y() <= (icon.height() + buttonMargin - 1) &&
e->y() >= (buttonMargin - 1))
{
emit checkStateChanged();
return;
}
}
this->update();
QHeaderView::mousePressEvent(event);
QHeaderView::mousePressEvent(e);
}
void pqCheckableHeaderView::setModel(QAbstractItemModel *newModel)
......
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