#3340 Fix some warnings

This commit is contained in:
Magne Sjaastad
2018-09-11 21:56:15 +02:00
parent 1a1fcfa6ea
commit b604d26e90
10 changed files with 5 additions and 15 deletions

View File

@@ -249,7 +249,6 @@ bool RiaQDateTimeTools::equalTo(const QDateTime& dt1, const QDateTime& dt2)
bool RiaQDateTimeTools::lessThan(const QDateTime& dt1, const QDateTime& dt2)
{
// dt1 < dt2
auto i = dt1.secsTo(dt2);
return dt1.secsTo(dt2) > 0;
}

View File

@@ -58,7 +58,7 @@ RicfExportProperty::RicfExportProperty()
void RicfExportProperty::execute()
{
RimEclipseCase* eclipseCase;
RimEclipseCase* eclipseCase = nullptr;
{
bool foundCase = false;
for (RimEclipseCase* c : RiaApplication::instance()->project()->activeOilField()->analysisModels()->cases)
@@ -87,7 +87,7 @@ void RicfExportProperty::execute()
}
// FIXME : Select correct view?
RimEclipseView* view;
RimEclipseView* view = nullptr;
for (Rim3dView* v : eclipseCase->views())
{
view = dynamic_cast<RimEclipseView*>(v);

View File

@@ -43,7 +43,7 @@ RicfSetTimeStep::RicfSetTimeStep()
//--------------------------------------------------------------------------------------------------
void RicfSetTimeStep::execute()
{
RimEclipseCase* eclipseCase;
RimEclipseCase* eclipseCase = nullptr;
{
bool foundCase = false;

View File

@@ -1405,8 +1405,6 @@ private:
{
if (gridCellIndex == cvf::UNDEFINED_SIZE_T) return;
size_t reservoirCellIdx = m_mainGrid->reservoirCellIndexByGridAndGridLocalCellIndex(gridIndex, gridCellIndex);
// Traverse parent gridcells, and add them to the map
while ( gridIndex > 0 ) // is lgr

View File

@@ -382,7 +382,6 @@ bool RifReaderEclipseSummary::values(const RifEclipseSummaryAddress& resultAddre
if ( variableIndex < 0 ) return false;
values->clear();
int tsCount = timeStepCount();
values->reserve(timeStepCount());
if (m_ecl_SmSpec)

View File

@@ -278,7 +278,7 @@ std::vector<std::vector<double>> RifStimPlanXmlReader::getAllDepthDataAtTimeSte
if (xmlStream.name() == "depth")
{
double depth = xmlStream.readElementText().toDouble();
xmlStream.readElementText().toDouble();
std::vector<double> propertyValuesAtDepth;
xmlStream.readNext(); //read end depth token

View File

@@ -1929,7 +1929,7 @@ void RigCaseCellResultsData::computeNncCombRiTrans()
cvf::StructGridInterface::FaceType faceId = nncConnections[connIdx].m_c1Face;
ResultIndexFunction permIdxFunc = nullptr;
std::vector<double> * permResults;
std::vector<double> * permResults = nullptr;
switch (faceId)
{

View File

@@ -414,8 +414,6 @@ RigWellPathFormations::FormationLevel RigWellPathFormations::detectLevel(QString
int dotCount = levelDescriptor.count('.');
size_t level = dotCount + 1;
switch (dotCount)
{
case 0: return RigWellPathFormations::LEVEL1;

View File

@@ -39,7 +39,6 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
const std::vector<double>& pathMds)
{
std::vector<WellPathCellIntersectionInfo> intersectionInfos;
const RigMainGrid* grid = caseData->mainGrid();
if (pathCoords.size() < 2) return intersectionInfos;

View File

@@ -1261,9 +1261,6 @@ public:
for (size_t timeStep : requestedTimesteps)
{
const std::vector<double>& scalarResults = rimCase->results(porosityModel)->cellScalarResults(scalarResultIndex, timeStep);
for (const std::pair<size_t, size_t> selectedCell : selectedCells)
{
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromUiResultName(rimCase->eclipseCaseData(), selectedCell.first, porosityModel, timeStep, propertyName);