Commit 1725f180 authored by bonnell's avatar bonnell

Warning cleanup and adjustments for removing warnings on Windows with Visual Studio.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23693 18c085ea-50e0-402c-830e-de6fd14e8384
parent 0671f70d
......@@ -136,7 +136,6 @@ AnimationStopAction::Execute()
if (DDTManager::isDDTSim(window))
{
const EngineKey &key = window->GetPlotList()->GetEngineKey();
//const avtDatabaseMetaData *md = ViewerEngineManager::Instance()->GetSimulationMetaData(key);
ViewerEngineManager::Instance()->SendSimulationCommand(key, DDTSIM_CMD_STOP, "");
}
else
......
......@@ -240,7 +240,7 @@ AddOperatorAction::Execute(int)
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int) windowMgr->GetNumWindows(); ++i )
for( int i=0; i< windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
AddOperator(type, applyOperatorToAllPlots, fromDefault);
......@@ -389,7 +389,7 @@ PromoteOperatorAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int) windowMgr->GetNumWindows(); ++i )
for( int i=0; i< windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
PromoteOperator(args.GetOperatorType(), applyOperatorToAllPlots);
......@@ -465,7 +465,7 @@ DemoteOperatorAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int)windowMgr->GetNumWindows(); ++i )
for( int i=0; i< windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
DemoteOperator(args.GetOperatorType(), applyOperatorToAllPlots);
......@@ -541,7 +541,7 @@ RemoveOperatorAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int) windowMgr->GetNumWindows(); ++i )
for( int i=0; i< windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
RemoveOperator(args.GetOperatorType(), applyOperatorToAllPlots);
......@@ -619,7 +619,7 @@ RemoveLastOperatorAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int)windowMgr->GetNumWindows(); ++i )
for( int i=0; i<windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
RemoveLastOperator(applyOperatorToAllPlots);
......@@ -721,7 +721,7 @@ RemoveAllOperatorsAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int) windowMgr->GetNumWindows(); ++i )
for( int i=0; i<windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
RemoveAllOperators(applyOperatorToAllPlots);
......@@ -828,7 +828,7 @@ SetOperatorOptionsAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int) windowMgr->GetNumWindows(); ++i )
for( int i=0; i<windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
SetPlotOperatorAtts(oper, windowMgr->GetWindow(i)==window,
......@@ -1049,7 +1049,7 @@ AddPlotAction::Update()
// Update the variable menus for the actions.
//
bool menuEnabled = false;
for(size_t i = 0; i < pluginEntries.size(); ++i)
for(int i = 0; i < (int)pluginEntries.size(); ++i)
{
DeletePlotMenu(i);
CreatePlotMenu(i);
......@@ -1236,7 +1236,7 @@ AddPlotAction::ConstructMenu(QMenu *menu)
// Create a new menu and add all of the actions to it.
actionMenu = new QMenu("Add plot", menu);
for(size_t i = 0; i < pluginEntries.size(); ++i)
for(int i = 0; i < (int)pluginEntries.size(); ++i)
{
// Create the menu for the plot.
CreatePlotMenu(i);
......@@ -1464,7 +1464,7 @@ DrawPlotsAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int) windowMgr->GetNumWindows(); ++i )
for( int i=0; i<windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
RealizePlots(args.GetBoolFlag());
......@@ -1755,7 +1755,7 @@ SetActivePlotsAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i< (unsigned int)windowMgr->GetNumWindows(); ++i )
for( int i=0; i<windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
SetActivePlots(activePlots,
......@@ -1924,7 +1924,7 @@ SetPlotSILRestrictionAction::Execute()
if( applyToAllWindows )
{
for( unsigned int i=0; i < (unsigned int) windowMgr->GetNumWindows(); ++i )
for( int i=0; i<windowMgr->GetNumWindows(); ++i )
{
windowMgr->GetWindow(i)->GetPlotList()->
SetPlotSILRestriction(applySelectionToAllPlots);
......
......@@ -371,8 +371,8 @@ SaveViewAction::DeleteViewsFromInterface()
window->GetToolbar()->RemoveAction(this);
// Remove all of the choices after the second choice.
int s = children.size();
for(int i = 2; i < s; ++i)
size_t s = children.size();
for(size_t i = 2; i < s; ++i)
{
delete children[s - i + 1];
children.pop_back();
......
......@@ -759,7 +759,7 @@ ViewerActionManager::EnableActions(ViewerWindowManagerAttributes *wma)
// object and add the new action group to the manager.
ActionGroup newAction(ag.GetName());
newAction.enabled = ag.GetVisible();
for(size_t j = 0; j < ag.GetActions().size(); ++j)
for(int j = 0; j < (int)ag.GetActions().size(); ++j)
{
ActionIndex index = ag.GetAction(j);
if(index != ViewerRPC::MaxRPC)
......
......@@ -611,7 +611,7 @@ ViewerConfigManager::ImportEntireState(const std::string &filename,
}
else
{
int nSourceIds = sources.size();
int nSourceIds = (int)sources.size();
DataNode *vsNode = viewerNode->GetNode("ViewerSubject");
DataNode *sourceMapNode = 0;
if(vsNode != 0 &&
......
......@@ -1557,7 +1557,6 @@ ViewerEngineManager::ExternalRender(const ExternalRenderRequestInfo& reqInfo,
int windowID)
{
// break-out individual members of the request info
//const vector<string> &plotNames = reqInfo.plotNames;
const vector<const char*>& pluginIDsList = reqInfo.pluginIDsList;
const vector<EngineKey>& engineKeysList = reqInfo.engineKeysList;
const vector<int>& plotIdsList = reqInfo.plotIdsList;
......@@ -2718,7 +2717,6 @@ ViewerEngineManager::UpdateEngineList()
// Go through the list of engines and add each engine to the engine list
// that gets returned to the viewer's client.
int i;
for (EngineMap::iterator it = engines.begin() ; it != engines.end(); it++)
{
ids.push_back(it->first);
......@@ -2731,7 +2729,7 @@ ViewerEngineManager::UpdateEngineList()
EngineList newEL;
// Add the other information about the engine.
for(i = 0; i < (int)ids.size(); ++i)
for(size_t i = 0; i < ids.size(); ++i)
{
EngineKey ek = ids[i];
if (EngineExists(ek))
......
......@@ -2052,7 +2052,7 @@ ViewerFileServer::ConnectServer(const std::string &mdServerHost,
void
ViewerFileServer::TerminateConnectionRequest(const stringVector &args, int failCode)
{
int argc = args.size();
int argc = (int)args.size();
char **argv = new char *[args.size() + 1];
// Create an argv array out of the args string vector.
......@@ -2521,7 +2521,7 @@ ViewerFileServer::GetMostSuitableCorrelation(const stringVector &dbs) const
//
std::string correlationName;
int score = 0;
for(int desiredScore = dbs.size(); desiredScore > 1 && score == 0;
for(int desiredScore = (int)dbs.size(); desiredScore > 1 && score == 0;
--desiredScore)
{
for(StringIntMap::const_iterator pos = scores.begin();
......
......@@ -157,7 +157,7 @@ bool
ViewerMultipleAction::Enabled() const
{
bool someEnabled = false;
for(size_t i = 0; i < children.size() && !someEnabled; ++i)
for(int i = 0; i < (int)children.size() && !someEnabled; ++i)
someEnabled |= ChoiceEnabled(i);
return someEnabled;
......@@ -279,7 +279,7 @@ ViewerMultipleAction::Update()
// Update the child actions
bool foundTrue = false;
for(size_t i = 0; i < children.size(); ++i)
for(int i = 0; i < (int)children.size(); ++i)
{
bool choiceShouldBeEnabled = actionShouldBeEnabled ? ChoiceEnabled(i) : false;
if(choiceShouldBeEnabled)
......
......@@ -217,11 +217,6 @@ ViewerPlot::ViewerPlot(const int type_,ViewerPlotPluginInfo *viewerPluginInfo_,
engineKey(ek_), hostName(hostName_), databaseName(databaseName_),
variableName(variableName_)
{
//
// Make sure the state is not negative.
//
//int state = (plotState < 0) ? 0 : plotState;
//
// Initialize some values.
//
......@@ -1742,7 +1737,6 @@ ViewerPlot::SetVariableName(const std::string &name)
OperatorPluginManager *oPM = GetOperatorPluginManager();
for (int j = 0; j < oPM->GetNEnabledPlugins(); j++)
{
//const std::string &mesh = GetMeshName();
std::string id = oPM->GetEnabledID(j);
CommonOperatorPluginInfo *info = oPM->GetCommonPluginInfo(id);
const avtDatabaseMetaData *md = GetMetaData();
......
......@@ -1117,9 +1117,8 @@ ViewerPlotList::SetTimeSliderState(int state)
// sliders, after having set the time for the correlated time
// slider, they have the right states.
//
size_t i = 0;
const stringVector &correlationDBs = correlation->GetDatabaseNames();
for(i = 0; i < correlationDBs.size(); ++i)
for(size_t i = 0; i < correlationDBs.size(); ++i)
{
StringIntMap::iterator ts = timeSliders.find(correlationDBs[i]);
if(ts != timeSliders.end())
......@@ -1789,7 +1788,7 @@ ViewerPlotList::AllowAutomaticCorrelation(const stringVector &dbs) const
cL->GetWhenToCorrelate();
bool needPermission = GetViewerProperties()->GetNowin() ? false :
cL->GetNeedPermission();
bool allowCorrelation = false; //TODO: check initial condition
bool allowCorrelation = false;
if(when == DatabaseCorrelationList::CorrelateAlways)
{
......@@ -1946,7 +1945,7 @@ ViewerPlotList::GetMostSuitableCorrelation(const std::string &source,
// added to the selected correlation if they are not already in it.
std::string correlationName;
int score = 0;
for(int desiredScore = dbs.size(); desiredScore > 1 && score == 0;
for(int desiredScore = (int)dbs.size(); desiredScore > 1 && score == 0;
--desiredScore)
{
for(StringIntMap::const_iterator pos = scores.begin();
......@@ -5892,7 +5891,7 @@ ViewerPlotList::SetPlotSILRestriction(bool applyToAll)
//
int firstSelected = -1;
std::vector<int> activePlots;
for (size_t i = 0; i < (size_t)nPlots; ++i)
for (int i = 0; i < nPlots; ++i)
{
if (plots[i].active)
{
......@@ -8142,7 +8141,6 @@ ViewerPlotList::UpdateExpressionList(bool considerPlots, bool update)
continue;
ViewerPlot *plot = plots[i].plot;
//const string &mesh = plot->GetMeshName();
for (int j = 0 ; j < plot->GetNOperators() ; j++)
{
ViewerOperator *oper = plot->GetOperator(j);
......@@ -8626,8 +8624,7 @@ ViewerPlotList::GetMeshVarNameForActivePlots(const std::string &host,
ViewerPlot *activePlot = GetPlot(activePlotIDs[0]);
std::string activeVarName = activePlot->GetVariableName();
std::string tmpMeshName = md->MeshForVar(activeVarName);
size_t i;
for (i = 1; i < activePlotIDs.size(); i++)
for (size_t i = 1; i < activePlotIDs.size(); i++)
{
activePlot = GetPlot(activePlotIDs[i]);
activeVarName = activePlot->GetVariableName();
......@@ -9372,7 +9369,6 @@ ViewerPlotList::SetFromNode(DataNode *parentNode,
// Try and recreate the plots
//
bool sendUpdateFrame = false;
//bool createdPlots = false;
intVector plotSelected;
for(int i = 0; i < expectedPlots; ++i)
{
......@@ -9545,7 +9541,6 @@ ViewerPlotList::SetFromNode(DataNode *parentNode,
}
createdPlot = true;
//createdPlots = true;
}
}
}
......@@ -10048,9 +10043,9 @@ ViewerPlotList::ShouldRefineData(double smallestCellSize) const
return false;
}
int nDims = 0; //TODO: uninitialized data
int nDims = 0;
double ext[6];
double cellSize = 0; //TODO: uninitialized data
double cellSize = 0.;
for (int i = 0; i < nPlots; ++i)
{
ViewerPlot *plot = plots[i].plot;
......
......@@ -2458,10 +2458,8 @@ ViewerQueryManager::ComputePick(PICK_POINT_INFO *ppi, const int dom,
if (!GetPlotPluginManager()->PluginAvailable(
"Spreadsheet_1.0"))
{
//static bool issuedWarning = false;
Error(tr("Could not create a spreadsheet with the pick, "
"because the spreadsheet plugin is not available."));
//issuedWarning = true;
return retval;
}
......@@ -2633,7 +2631,6 @@ ViewerQueryManager::ComputePick(PICK_POINT_INFO *ppi, const int dom,
}
if (haveArray)
{
//int winId = win->GetWindowId();
ViewerWindow *resWin =
ViewerWindowManager::Instance()->GetTimeQueryWindow(-1);
if (resWin == NULL)
......@@ -2646,11 +2643,9 @@ ViewerQueryManager::ComputePick(PICK_POINT_INFO *ppi, const int dom,
if (!GetPlotPluginManager()->PluginAvailable(
"Histogram_1.0"))
{
//static bool issuedWarning = false;
Error(tr("Could not create a histogram of the array "
"variable, because the Histogram plugin is not "
"available."));
//issuedWarning = true;
return retval;
}
......@@ -3878,9 +3873,8 @@ GetUniqueVars(const stringVector &vars, const string &activeVar,
uniqueVars.push_back(activeVar);
return;
}
size_t i, j;
set<string> uniqueVarsSet;
for (i = 0; i < vars.size(); i++)
for (size_t i = 0; i < vars.size(); i++)
{
string v = vars[i];
if (v == "default")
......@@ -3892,7 +3886,7 @@ GetUniqueVars(const stringVector &vars, const string &activeVar,
stringVector dbVars = md->GetAllVariableNames(activeVar);
const ExpressionList *exprList = ParsingExprList::Instance()->GetList();
stringVector exprVars = exprList->GetAllVarNames(md->GetDatabaseName());
for (j = 0; j < dbVars.size(); j++)
for (size_t j = 0; j < dbVars.size(); j++)
{
if (uniqueVarsSet.count(dbVars[j]) == 0)
{
......@@ -3900,7 +3894,7 @@ GetUniqueVars(const stringVector &vars, const string &activeVar,
uniqueVarsSet.insert(dbVars[j]);
}
}
for (j = 0; j < exprVars.size(); j++)
for (size_t j = 0; j < exprVars.size(); j++)
{
if (uniqueVarsSet.count(exprVars[j]) == 0)
{
......
......@@ -2178,10 +2178,9 @@ ViewerSubject::InitializeWorkArea()
// If any of the options are missing then use the WindowMetrics
// class to fill in the blanks.
//
int wmBorder[4], wmShift[2], wmScreen[4];
///TODO: override uninitialized warnings
wmScreen[0] = wmScreen[1] = wmScreen[2] = wmScreen[3] = 0;
int wmBorder[4] = {0, 0, 0, 0};
int wmShift[2] = {0, 0};
int wmScreen[4] = {0, 0, 0, 0};
if(GetViewerProperties()->GetWindowBorders().size() == 0 ||
GetViewerProperties()->GetWindowShift().size() == 0 ||
......@@ -3663,7 +3662,7 @@ ViewerSubject::ExportWindow()
int resultId = -1;
/// Broadcast directly to client..
for(size_t i = 0; i < clients.size(); ++i) {
for(int i = 0; i < (int)clients.size(); ++i) {
ViewerClientAttributes& client = clients[i]->GetViewerClientAttributes();
if(client.GetId() == clientId) {
resultId = i;
......@@ -3686,7 +3685,7 @@ ViewerSubject::ExportWindow()
qatts->ClearVars();
for(size_t i = 0; i < windowIds.size(); ++i)
for(int i = 0; i < (int)windowIds.size(); ++i)
{
ViewerWindow* vwin = ViewerWindowManager::Instance()->GetWindow(i);
......@@ -9527,7 +9526,7 @@ ViewerSubject::HandleClientInformation()
debug3 << "client["<< i << "] = " << client.GetClientName().c_str()
<< endl;
debug3 << "methods:" << endl;
for(size_t j = 0; j < client.GetMethodNames().size(); ++j)
for(int j = 0; j < (int)client.GetMethodNames().size(); ++j)
{
debug3 << "\t" << client.GetMethod(j).c_str() << "("
<< client.GetMethodPrototype(j).c_str() << ")" << endl;
......@@ -10476,7 +10475,7 @@ ViewerSubject::HasInterpreter() const
++i)
{
const ClientInformation &client = GetViewerState()->GetClientInformationList()->GetClients(i);
for(size_t j = 0; j < client.GetMethodNames().size() && !hasInterpreter; ++j)
for(int j = 0; j < (int)client.GetMethodNames().size() && !hasInterpreter; ++j)
hasInterpreter = client.GetMethod(j) == "Interpret" &&
client.GetMethodPrototype(j) == "s";
}
......@@ -11946,8 +11945,6 @@ ViewerSubject::OpenWithEngine(const std::string &remoteHost,
void ViewerSubject::DDTConnect()
{
//const bool connect = (bool) GetViewerState()->GetViewerRPC()->GetIntArg1();
DDTManager* manager = DDTManager::getInstance();
DDTSession* ddt = manager->getSessionNC();
if (ddt!=NULL && ddt->connected())
......
......@@ -345,7 +345,7 @@ ViewerWindow::ViewerWindow(int windowIndex) : ViewerBase(0),
// Callback for render information.
//
visWindow->SetRenderInfoCallback(ViewerWindowManager::RenderInformationCallback,
(void *)((size_t)windowId)); ///TODO: check if cast to size_t to remove int-to-pointer-cast warning is proper
&windowId);
//
// Callback for pick.
......@@ -1021,8 +1021,7 @@ ViewerWindow::UpdateTools()
// same position. The call below is what makes this
// happen. This is the mechanism where the attributes are
// sent to (for example) the clip operator.
ViewerWindowManager *wM = ViewerWindowManager::Instance();
bool applyOps = wM->GetClientAtts()->GetApplyOperator();
bool applyOps = ViewerWindowManager::Instance()->GetClientAtts()->GetApplyOperator();
HandleTool(visWindow->GetToolInterface(toolId), applyOps);
}
if(ViewerQueryManager::Instance()->
......@@ -1131,6 +1130,7 @@ ViewerWindow::RecenterView()
GetExtents(2, limits);
RecenterViewAxisArray(limits);
break;
case WINMODE_NONE:
default:
break;
}
......@@ -1218,6 +1218,7 @@ ViewerWindow::ResetView()
case WINMODE_VERTPARALLELAXES:
ResetViewAxisArray();
break;
case WINMODE_NONE:
default:
break;
}
......@@ -2656,6 +2657,7 @@ ViewerWindow::UpdateView(const WINDOW_MODE mode, const double *limits)
case WINMODE_VERTPARALLELAXES:
UpdateViewAxisArray(limits);
break;
case WINMODE_NONE:
default:
break;
}
......@@ -5860,7 +5862,6 @@ ViewerWindow::UpdateViewAxisArray(const double *limits)
boundingBoxValidAxisArray = true;
centeringValidAxisArray = true;
//const avtViewAxisArray &viewAxisArray = GetViewAxisArray();
if (!viewSetInAxisArray)
{
......@@ -5917,7 +5918,6 @@ ViewerWindow::UpdateViewAxisArray(const double *limits)
//
else
{
//const avtViewAxisArray &viewAxisArray = GetViewAxisArray();
visWindow->UpdateView();
}
......@@ -9630,7 +9630,7 @@ ViewerWindow::CanSkipExternalRender(const ExternalRenderRequestInfo& thisRequest
if ((lastRequest.plotIdsList[j] == thisRequest.plotIdsList[i]) &&
(lastRequest.engineKeysList[j] == thisRequest.engineKeysList[i]))
{
indexOfPlotInLastList = j;
indexOfPlotInLastList = (int)j;
break;
}
}
......@@ -10096,7 +10096,6 @@ ViewerWindow::ExternalRenderCallback(void *data, avtDataObject_p& dob)
void
ViewerWindow::ViewChangedCallback(void *data)
{
//unsigned char* argsBuf = (unsigned char*) data;
ViewerWindow *win;
win = (ViewerWindow *)data;
......
......@@ -5157,7 +5157,7 @@ ViewerWindowManager::UpdateRenderingAtts(int windowIndex)
void
ViewerWindowManager::RenderInformationCallback(void *data)
{
int index = (int)((long)data);
int index = *((int*)data);
instance->UpdateWindowRenderingInformation(index);
}
......
......@@ -452,7 +452,6 @@ void QWsSocket::close( QString reason )
}
// Compose and send close frame
//quint64 messageSize = reason.size();
QByteArray BA;
QByteArray header = QWsSocket::composeHeader( true, OpClose, 0 );
......
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