Commit 0fdcb127 authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

Updated to avoid warnings from gcc-7.1.1

parent d7fd550e
......@@ -23,7 +23,6 @@ License
\*---------------------------------------------------------------------------*/
//#include "IFstream.H"
#include "openFoamTableReader.H"
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
......@@ -155,6 +154,7 @@ Type Foam::interpolation2DTable<Type>::interpolateValue
<< "bound (" << minLimit << ")" << nl
<< " Continuing with the first entry"
<< endl;
// Behaviour as per CLAMP
return data.first().second();
break;
......@@ -185,6 +185,7 @@ Type Foam::interpolation2DTable<Type>::interpolateValue
<< "bound (" << maxLimit << ")" << nl
<< " Continuing with the last entry"
<< endl;
// Behaviour as per CLAMP
return data.last().second();
break;
......@@ -263,6 +264,7 @@ Foam::label Foam::interpolation2DTable<Type>::Xi
WarningInFunction
<< "value (" << valueX << ") out of bounds"
<< endl;
// Behaviour as per CLAMP
return limitI;
break;
......
......@@ -195,6 +195,7 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
<< "value (" << lookupValue << ") underflow" << nl
<< " Zero rate of change."
<< endl;
// Behaviour as per CLAMP
return 0;
break;
......@@ -230,6 +231,7 @@ Type Foam::interpolationTable<Type>::rateOfChange(const scalar value) const
<< "value (" << lookupValue << ") overflow" << nl
<< " Zero rate of change."
<< endl;
// Behaviour as per CLAMP
return 0;
break;
......@@ -341,6 +343,7 @@ Foam::interpolationTable<Type>::operator[](const label i) const
<< "index (" << ii << ") underflow" << nl
<< " Continuing with the first entry"
<< endl;
// Behaviour as per 'CLAMP'
ii = 0;
break;
......@@ -377,6 +380,7 @@ Foam::interpolationTable<Type>::operator[](const label i) const
<< "index (" << ii << ") overflow" << nl
<< " Continuing with the last entry"
<< endl;
// Behaviour as per 'CLAMP'
ii = n - 1;
break;
......@@ -432,6 +436,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
<< "value (" << lookupValue << ") underflow" << nl
<< " Continuing with the first entry"
<< endl;
// Behaviour as per CLAMP
return this->first().second();
break;
......@@ -467,6 +472,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
<< "value (" << lookupValue << ") overflow" << nl
<< " Continuing with the last entry"
<< endl;
// Behaviour as per 'CLAMP'
return this->last().second();
break;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -221,16 +221,16 @@ static unsigned jenkins_hashlittle
switch (length)
{
case 12: c += k[2]; b += k[1]; a += k[0]; break;
case 11: c += static_cast<uint32_t>(k8[10]) << 16; // fall through
case 10: c += static_cast<uint32_t>(k8[9]) << 8; // fall through
case 9 : c += k8[8]; // fall through
case 11: c += static_cast<uint32_t>(k8[10]) << 16; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k8[9]) << 8; [[fallthrough]];
case 9 : c += k8[8]; [[fallthrough]];
case 8 : b += k[1]; a += k[0]; break;
case 7 : b += static_cast<uint32_t>(k8[6]) << 16; // fall through
case 6 : b += static_cast<uint32_t>(k8[5]) << 8; // fall through
case 5 : b += k8[4]; // fall through
case 7 : b += static_cast<uint32_t>(k8[6]) << 16; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k8[5]) << 8; [[fallthrough]];
case 5 : b += k8[4]; [[fallthrough]];
case 4 : a += k[0]; break;
case 3 : a += static_cast<uint32_t>(k8[2]) << 16; // fall through
case 2 : a += static_cast<uint32_t>(k8[1]) << 8; // fall through
case 3 : a += static_cast<uint32_t>(k8[2]) << 16; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k8[1]) << 8; [[fallthrough]];
case 1 : a += k8[0]; break;
case 0 : return c; // zero-length requires no mixing
}
......@@ -262,7 +262,7 @@ static unsigned jenkins_hashlittle
break;
case 11:
c += static_cast<uint32_t>(k8[10]) << 16;
// fall through
[[fallthrough]];
case 10:
c += k[4];
b += k[2] + (static_cast<uint32_t>(k[3]) << 16);
......@@ -270,27 +270,27 @@ static unsigned jenkins_hashlittle
break;
case 9 :
c += k8[8];
// fall through
[[fallthrough]];
case 8 :
b += k[2] + (static_cast<uint32_t>(k[3]) << 16);
a += k[0] + (static_cast<uint32_t>(k[1]) << 16);
break;
case 7 :
b += static_cast<uint32_t>(k8[6]) << 16;
// fall through
[[fallthrough]];
case 6 :
b += k[2];
a += k[0] + (static_cast<uint32_t>(k[1]) << 16);
break;
case 5 :
b += k8[4];
// fall through
[[fallthrough]];
case 4 :
a += k[0] + (static_cast<uint32_t>(k[1]) << 16);
break;
case 3 :
a += static_cast<uint32_t>(k8[2]) << 16;
// fall through
[[fallthrough]];
case 2 :
a += k[0];
break;
......@@ -328,19 +328,19 @@ static unsigned jenkins_hashlittle
// last block: affect all 32 bits of (c)
switch (length) // most case statements fall through
{
case 12: c += static_cast<uint32_t>(k[11]) << 24;
case 11: c += static_cast<uint32_t>(k[10]) << 16;
case 10: c += static_cast<uint32_t>(k[9]) << 8;
case 9 : c += k[8];
case 8 : b += static_cast<uint32_t>(k[7]) << 24;
case 7 : b += static_cast<uint32_t>(k[6]) << 16;
case 6 : b += static_cast<uint32_t>(k[5]) << 8;
case 5 : b += k[4];
case 4 : a += static_cast<uint32_t>(k[3]) << 24;
case 3 : a += static_cast<uint32_t>(k[2]) << 16;
case 2 : a += static_cast<uint32_t>(k[1]) << 8;
case 12: c += static_cast<uint32_t>(k[11]) << 24; [[fallthrough]];
case 11: c += static_cast<uint32_t>(k[10]) << 16; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k[9]) << 8; [[fallthrough]];
case 9 : c += k[8]; [[fallthrough]];
case 8 : b += static_cast<uint32_t>(k[7]) << 24; [[fallthrough]];
case 7 : b += static_cast<uint32_t>(k[6]) << 16; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k[5]) << 8; [[fallthrough]];
case 5 : b += k[4]; [[fallthrough]];
case 4 : a += static_cast<uint32_t>(k[3]) << 24; [[fallthrough]];
case 3 : a += static_cast<uint32_t>(k[2]) << 16; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k[1]) << 8; [[fallthrough]];
case 1 : a += k[0];
break;
......@@ -398,16 +398,16 @@ static unsigned jenkins_hashbig
switch (length) // most the case statements fall through
{
case 12: c += k[2]; b += k[1]; a += k[0]; break;
case 11: c += static_cast<uint32_t>(k8[10]) << 8; // fall through
case 10: c += static_cast<uint32_t>(k8[9]) << 16; // fall through
case 9 : c += static_cast<uint32_t>(k8[8]) << 24; // fall through
case 11: c += static_cast<uint32_t>(k8[10]) << 8; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k8[9]) << 16; [[fallthrough]];
case 9 : c += static_cast<uint32_t>(k8[8]) << 24; [[fallthrough]];
case 8 : b += k[1]; a += k[0]; break;
case 7 : b += static_cast<uint32_t>(k8[6]) << 8; // fall through
case 6 : b += static_cast<uint32_t>(k8[5]) << 16; // fall through
case 5 : b += static_cast<uint32_t>(k8[4]) << 24; // fall through
case 7 : b += static_cast<uint32_t>(k8[6]) << 8; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k8[5]) << 16; [[fallthrough]];
case 5 : b += static_cast<uint32_t>(k8[4]) << 24; [[fallthrough]];
case 4 : a += k[0]; break;
case 3 : a += static_cast<uint32_t>(k8[2]) << 8; // fall through
case 2 : a += static_cast<uint32_t>(k8[1]) << 16; // fall through
case 3 : a += static_cast<uint32_t>(k8[2]) << 8; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k8[1]) << 16; [[fallthrough]];
case 1 : a += static_cast<uint32_t>(k8[0]) << 24; break;
case 0 : return c;
}
......@@ -441,18 +441,18 @@ static unsigned jenkins_hashbig
// last block: affect all 32 bits of (c)
switch (length) // the case statements fall through
{
case 12: c += k[11];
case 11: c += static_cast<uint32_t>(k[10]) << 8;
case 10: c += static_cast<uint32_t>(k[9]) << 16;
case 9 : c += static_cast<uint32_t>(k[8]) << 24;
case 8 : b += k[7];
case 7 : b += static_cast<uint32_t>(k[6]) << 8;
case 6 : b += static_cast<uint32_t>(k[5]) << 16;
case 5 : b += static_cast<uint32_t>(k[4]) << 24;
case 4 : a += k[3];
case 3 : a += static_cast<uint32_t>(k[2]) << 8;
case 2 : a += static_cast<uint32_t>(k[1]) << 16;
case 1 : a += static_cast<uint32_t>(k[0]) << 24;
case 12: c += k[11]; [[fallthrough]];
case 11: c += static_cast<uint32_t>(k[10]) << 8; [[fallthrough]];
case 10: c += static_cast<uint32_t>(k[9]) << 16; [[fallthrough]];
case 9 : c += static_cast<uint32_t>(k[8]) << 24; [[fallthrough]];
case 8 : b += k[7]; [[fallthrough]];
case 7 : b += static_cast<uint32_t>(k[6]) << 8; [[fallthrough]];
case 6 : b += static_cast<uint32_t>(k[5]) << 16; [[fallthrough]];
case 5 : b += static_cast<uint32_t>(k[4]) << 24; [[fallthrough]];
case 4 : a += k[3]; [[fallthrough]];
case 3 : a += static_cast<uint32_t>(k[2]) << 8; [[fallthrough]];
case 2 : a += static_cast<uint32_t>(k[1]) << 16; [[fallthrough]];
case 1 : a += static_cast<uint32_t>(k[0]) << 24; [[fallthrough]];
break;
case 0 : return c;
}
......@@ -521,10 +521,11 @@ unsigned Foam::HasherInt
// handle the last 3 uint32_t's
switch (length) // all case statements fall through
{
case 3 : c += k[2];
case 2 : b += k[1];
case 3 : c += k[2]; [[fallthrough]];
case 2 : b += k[1]; [[fallthrough]];
case 1 : a += k[0];
bitMixerFinal(a,b,c);
[[fallthrough]];
case 0 : // case 0: nothing left to add
break;
}
......@@ -567,10 +568,11 @@ unsigned Foam::HasherDual
// handle the last 3 uint32_t's
switch (length) // all case statements fall through
{
case 3 : c += k[2];
case 2 : b += k[1];
case 3 : c += k[2]; [[fallthrough]];
case 2 : b += k[1]; [[fallthrough]];
case 1 : a += k[0];
bitMixerFinal(a,b,c);
[[fallthrough]];
case 0 : // case 0: nothing left to add
break;
}
......
......@@ -146,6 +146,4 @@ bool Foam::UOPstream::write
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-diag-disable 327,654,1125,2289,2304,11062,11074,11076
-diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-diag-disable 654,1125,2304
-diag-disable 654,1125,1292,2304
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-diag-disable 2304
-diag-disable 2304,1292
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof \
-diag-disable 327,654,1125,2289,2304,11062,11074,11076
-diag-disable 327,654,1125,1292,2289,2304,11062,11074,11076
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN =
......
SUFFIXES += .C
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof
c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter \
-Wno-invalid-offsetof -Wno-attributes
# Suppress some warnings for flex++ and CGAL
c++LESSWARN =
......
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