diff --git a/src/OpenFOAM/coordinateSystems/coordinateRotation/axisCoordinateRotation.C b/src/OpenFOAM/coordinateSystems/coordinateRotation/axisCoordinateRotation.C index 01ed4bdcb..4e54a5e2b 100644 --- a/src/OpenFOAM/coordinateSystems/coordinateRotation/axisCoordinateRotation.C +++ b/src/OpenFOAM/coordinateSystems/coordinateRotation/axisCoordinateRotation.C @@ -112,12 +112,6 @@ Foam::axisCoordinateRotation::axisCoordinateRotation scalar theta = readScalar(dict.lookup("theta")); scalar psi = readScalar(dict.lookup("psi")); - bool inDegrees = true; - if (dict.found("degrees")) - { - inDegrees = Switch(dict.lookup("degrees")); - } - calcTransform ( phi, diff --git a/src/OpenFOAM/db/dictionary/equation/equationOperation/equationOperation.C b/src/OpenFOAM/db/dictionary/equation/equationOperation/equationOperation.C index e786ac4e5..74f642ca5 100644 --- a/src/OpenFOAM/db/dictionary/equation/equationOperation/equationOperation.C +++ b/src/OpenFOAM/db/dictionary/equation/equationOperation/equationOperation.C @@ -27,6 +27,7 @@ License #include "dimensionedScalar.H" #include "equationReader.H" #include "equationOperation.H" +#include "error.H" //#include "equationOperationList.H" class dimensionedScalar; @@ -396,6 +397,16 @@ Foam::word Foam::equationOperation::opName return "min"; case otstabilise: return "stabilise"; + default: + FatalErrorIn + ( + "Foam::word Foam::equationOperation::opName" + "(const Foam::equationOperation::operationType& op)" + ) + << "invalid operation" + << exit(FatalError); + + return "invalid"; } } @@ -423,6 +434,16 @@ Foam::word Foam::equationOperation::sourceName return "equation"; case slstorage: return "memory"; + default: + FatalErrorIn + ( + "Foam::word Foam::equationOperation::opName" + "(const Foam::equationOperation::operationType& op)" + ) + << "invalid source" + << exit(FatalError); + + return "invalid"; } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C index 1d6c67de8..d97d32994 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C @@ -81,7 +81,6 @@ Foam::tmp Foam::mixingPlaneGAMGInterface::agglomerateCoeffs // AMG agglomeration missing notImplemented("mixingPlaneGAMGInterface::agglomerateCoeffs"); tmp tcoarseCoeffs(new scalarField(size(), 0.0)); - scalarField& coarseCoeffs = tcoarseCoeffs(); return tcoarseCoeffs; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C index deac523b8..d67698b83 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C @@ -102,7 +102,6 @@ void Foam::polyMesh::initMesh() nCells++; label nUsedFaces = 0; - label nIntFaces = 0; // Use patch info if provided, use all faces otherwise if (boundary_.size()) @@ -110,13 +109,11 @@ void Foam::polyMesh::initMesh() nUsedFaces = boundary_[boundary_.size() - 1].start() + boundary_[boundary_.size() - 1].size(); - nIntFaces = boundary_[0].start(); } else { // No patch info. Assume all faces are used. nUsedFaces = owner_.size(); - nIntFaces = neighbour_.size(); } diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCheck.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCheck.C index 9d8ec2d24..bc426c27e 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCheck.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCheck.C @@ -57,7 +57,8 @@ bool dynamicTopoFvMesh::meshQuality label nCells = 0, minCell = -1; scalar maxQuality = -GREAT; scalar minQuality = GREAT; - scalar cQuality, meanQuality = 0.0; + scalar cQuality = 0.0; + scalar meanQuality = 0.0; // Track slivers bool sliversAbsent = true; @@ -1682,7 +1683,8 @@ bool dynamicTopoFvMesh::checkCollapse ) const { label faceIndex = -1; - scalar cQuality = 0.0, oldVolume = 0.0; + scalar cQuality = 0.0; + scalar oldVolume = 0.0; const cell& cellToCheck = cells_[cellIndex]; // Look for a face that doesn't contain 'pointIndex' diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C index 3bc135bc2..939239b4e 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/eMesh/eMeshDemandDrivenData.C @@ -180,7 +180,8 @@ void eMesh::calcEdgePoints() const // NOTE: Will work only on tetrahedral meshes! bool found; - label faceIndex = -1, cellIndex = -1; + label faceIndex = -1 + label cellIndex = -1; const labelList& owner = mesh_.faceOwner(); const labelList& neighbour = mesh_.faceNeighbour(); const cellList& cells = mesh_.cells(); diff --git a/src/engine/engineTopoChangerMesh/engineValveSliding/moveValvePointsEngineValveSliding.H b/src/engine/engineTopoChangerMesh/engineValveSliding/moveValvePointsEngineValveSliding.H index e6e461fdf..00e38afdb 100644 --- a/src/engine/engineTopoChangerMesh/engineValveSliding/moveValvePointsEngineValveSliding.H +++ b/src/engine/engineTopoChangerMesh/engineValveSliding/moveValvePointsEngineValveSliding.H @@ -14,13 +14,10 @@ if(valves_[valveI].curLift() >= valves_[valveI].deformationLift()) { - bool isMoving(false); - if(mag(valves_[valveI].curVelocity()) > 0) { Info<< "Valve n. " << valveI << " is moving with velocity = " << valves_[valveI].curVelocity() << endl; - isMoving = true; } Info<< "Valve displacement for valve " << valveI << " = " diff --git a/src/engine/engineTopoChangerMesh/layerAR/addLayerARMeshModifiers.C b/src/engine/engineTopoChangerMesh/layerAR/addLayerARMeshModifiers.C index 1f3352b2c..7374623ee 100644 --- a/src/engine/engineTopoChangerMesh/layerAR/addLayerARMeshModifiers.C +++ b/src/engine/engineTopoChangerMesh/layerAR/addLayerARMeshModifiers.C @@ -94,7 +94,6 @@ void Foam::layerAR::addZonesAndModifiers() bool foundAtLeastOne = false; scalar zHigher = GREAT; - scalar zLower = GREAT; scalar dh = GREAT; scalar dl = GREAT; @@ -108,7 +107,6 @@ void Foam::layerAR::addZonesAndModifiers() { if (zPistV - zc > 0 && zPistV - zc < dl) { - zLower = zc; dl = zPistV - zc; } diff --git a/src/engine/engineTopoChangerMesh/layerARGambit/addLayerARGambitMeshModifiers.C b/src/engine/engineTopoChangerMesh/layerARGambit/addLayerARGambitMeshModifiers.C index f2db1f771..b489c8a1d 100644 --- a/src/engine/engineTopoChangerMesh/layerARGambit/addLayerARGambitMeshModifiers.C +++ b/src/engine/engineTopoChangerMesh/layerARGambit/addLayerARGambitMeshModifiers.C @@ -95,7 +95,6 @@ void Foam::layerARGambit::addZonesAndModifiers() bool foundAtLeastOne = false; scalar zHigher = GREAT; - scalar zLower = GREAT; scalar dh = GREAT; scalar dl = GREAT; @@ -109,7 +108,6 @@ void Foam::layerARGambit::addZonesAndModifiers() { if (zPistV - zc > 0 && zPistV - zc < dl) { - zLower = zc; dl = zPistV - zc; } diff --git a/src/engine/engineTopoChangerMesh/simpleTwoStroke/addSimpleTwoStrokeModifiers.C b/src/engine/engineTopoChangerMesh/simpleTwoStroke/addSimpleTwoStrokeModifiers.C index 7dd2d9209..c0e161433 100644 --- a/src/engine/engineTopoChangerMesh/simpleTwoStroke/addSimpleTwoStrokeModifiers.C +++ b/src/engine/engineTopoChangerMesh/simpleTwoStroke/addSimpleTwoStrokeModifiers.C @@ -105,7 +105,6 @@ void Foam::simpleTwoStroke::addZonesAndModifiers() bool foundAtLeastOne = false; scalar zHigher = GREAT; - scalar zLower = GREAT; scalar dh = GREAT; scalar dl = GREAT; @@ -127,7 +126,6 @@ void Foam::simpleTwoStroke::addZonesAndModifiers() { if (zPistV - zc > 0 && zPistV - zc < dl) { - zLower = zc; dl = zPistV - zc; } diff --git a/src/engine/engineTopoChangerMesh/thoboisMesh/addPistonFacesPointZonesThoboisMesh.H b/src/engine/engineTopoChangerMesh/thoboisMesh/addPistonFacesPointZonesThoboisMesh.H index d2926af35..08012567b 100644 --- a/src/engine/engineTopoChangerMesh/thoboisMesh/addPistonFacesPointZonesThoboisMesh.H +++ b/src/engine/engineTopoChangerMesh/thoboisMesh/addPistonFacesPointZonesThoboisMesh.H @@ -21,7 +21,6 @@ bool foundAtLeastOne = false; scalar zHigher = GREAT; - scalar zLower = GREAT; scalar dh = GREAT; scalar dl = GREAT; @@ -35,7 +34,6 @@ { if (zPistV - zc > 0 && zPistV - zc < dl) { - zLower = zc; dl = zPistV - zc; } diff --git a/src/engine/engineTopoChangerMesh/verticalValves/addValvePistonCellZones.H b/src/engine/engineTopoChangerMesh/verticalValves/addValvePistonCellZones.H index 286690509..033db4cc6 100644 --- a/src/engine/engineTopoChangerMesh/verticalValves/addValvePistonCellZones.H +++ b/src/engine/engineTopoChangerMesh/verticalValves/addValvePistonCellZones.H @@ -14,7 +14,6 @@ label nMovingCells = 0; label valvePatchID = valves_[i-1].poppetPatchID().index(); - const polyPatch& valveTopPatch = boundaryMesh()[valvePatchID]; scalar minPopZ = min(boundary()[valvePatchID].patch().localPoints()).z(); forAll(cellCentres(),cellI) @@ -60,7 +59,6 @@ label nMovingCells = 0; label valvePatchID = valves_[i-1].bottomPatchID().index(); - const polyPatch& valveBottomPatch = boundaryMesh()[valvePatchID]; scalar maxPopZ = max(boundary()[valvePatchID].patch().localPoints()).z(); diff --git a/src/engine/ignition/ignitionSite.C b/src/engine/ignition/ignitionSite.C index 3e4323f32..66bbb6bf0 100644 --- a/src/engine/ignition/ignitionSite.C +++ b/src/engine/ignition/ignitionSite.C @@ -57,7 +57,6 @@ void ignitionSite::findIgnitionCells(const fvMesh& mesh) cellVolumes_[0] = vols[ignCell]; scalar minDist = GREAT; - label nearestCell = 0; label nIgnCells = 1; forAll(centres, celli) @@ -66,7 +65,6 @@ void ignitionSite::findIgnitionCells(const fvMesh& mesh) if (dist < minDist) { - nearestCell = celli; minDist = dist; } diff --git a/src/lagrangian/dieselSpray/parcel/parcel.C b/src/lagrangian/dieselSpray/parcel/parcel.C index a068b7393..d291b6650 100644 --- a/src/lagrangian/dieselSpray/parcel/parcel.C +++ b/src/lagrangian/dieselSpray/parcel/parcel.C @@ -467,7 +467,6 @@ void Foam::parcel::updateParcelProperties scalar oldhv = fuels.hl(pg, T(), X()); scalar Np = N(oldDensity); - scalar newDensity = oldDensity; scalar newMass = oldMass; scalar newhg = oldhg; scalar newhv = oldhv; @@ -496,7 +495,6 @@ void Foam::parcel::updateParcelProperties // the first time if (n > 1) { - newDensity = fuels.rho(pg, Tnew, X()); newMass = m(); newhg = 0.0; scalarField Ynew(fuels.Y(X())); diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C index 9c32547b3..54ed06e9b 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C +++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C @@ -119,11 +119,6 @@ void LISA::atomizeParcel scalar rhoFuel = fuels.rho(1.0e+5, p.T(), p.X()); scalar nuFuel = muFuel/rhoFuel; - vector uDir = p.U()/mag(p.U()); - - scalar uGas = mag(vel & uDir); - vector Ug = uGas*uDir; - /* TL It might be the relative velocity between Liquid and Gas, but I use the diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C index 8df654beb..38b2e4b9f 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/SHF/SHF.C @@ -124,9 +124,6 @@ void SHF::breakupParcel scalar reLiquid = p.Re(rhoLiquid, vel, muLiquid); scalar ohnesorge = sqrt(weLiquid)/(reLiquid + VSMALL); - vector acceleration = p.Urel(vel)/p.tMom(); - vector trajectory = p.U()/mag(p.U()); - vector vRel = p.Urel(vel); scalar weGasCorr = weGas/(1.0 + weCorrCoeff_ * ohnesorge); diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C index bb6230fff..4256f7d97 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C @@ -256,9 +256,6 @@ void blobsSwirlInjector::calculateHX ) ); - scalar hOLD = -100.0; - scalar xOLD = -100.0; - label i; for(i=0; i<20; i++) @@ -287,9 +284,6 @@ void blobsSwirlInjector::calculateHX x_ = sqr(1.0 - 2.0 * h_/injectorDiameter); - hOLD = h_; - xOLD = x_; - } x_ = sqr(1.0 - 2.0 * h_/injectorDiameter); diff --git a/src/meshTools/triSurface/triSurfaceTools/geompack/geompack.C b/src/meshTools/triSurface/triSurfaceTools/geompack/geompack.C index 790433d41..3f641fbb8 100644 --- a/src/meshTools/triSurface/triSurfaceTools/geompack/geompack.C +++ b/src/meshTools/triSurface/triSurfaceTools/geompack/geompack.C @@ -2955,7 +2955,6 @@ char *timestring ( void ) # define TIME_SIZE 29 const struct tm *tm; - size_t len; time_t now; char *s; @@ -2964,7 +2963,7 @@ char *timestring ( void ) s = new char[TIME_SIZE]; - len = strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm ); + strftime ( s, TIME_SIZE, "%d %B %Y %I:%M:%S %p", tm ); return s; # undef TIME_SIZE diff --git a/src/multiSolver/multiSolver/multiSolver.C b/src/multiSolver/multiSolver/multiSolver.C index 23817f720..16fbd38b8 100644 --- a/src/multiSolver/multiSolver/multiSolver.C +++ b/src/multiSolver/multiSolver/multiSolver.C @@ -179,10 +179,12 @@ void Foam::multiSolver::synchronizeParallel() const } else { - // Recieve go signal + // Receive go signal { IPstream fromMaster(Pstream::blocking, Pstream::masterNo()); - bool okayToGo(readBool(fromMaster)); + // Quenching compiler warning + // HR, 18/Jul/2013 + readBool(fromMaster); } } } diff --git a/src/multiSolver/multiSolver/multiSolverInit.H b/src/multiSolver/multiSolver/multiSolverInit.H index 3ca762cc1..3e1eabdf1 100644 --- a/src/multiSolver/multiSolver/multiSolverInit.H +++ b/src/multiSolver/multiSolver/multiSolverInit.H @@ -1,6 +1,8 @@ // Common elements in the constructor initialization list for multiSolver - multiDicts_(NULL), + // Quenching compiler warning + // HR, 18/Jul/2013 + multiDicts_(0), multiSolverControl_(multiControlDict_.subDict("multiSolverControl")), solverDomains_(multiControlDict_.subDict("solverDomains")),