Don't warn about functions not emitted
If a function is used by a template but this template is not instantiated, the function will still be defined in the header of a module but it won't be callable because it is in an anonymous namespace and thus we get a warning. This only happens in Clang; GCC consider functions referenced from templates as used. fixup! Don't warn about functions not emitted
This commit is contained in:
parent
a7f32b934b
commit
244c867505
@ -40,6 +40,8 @@ namespace Opm
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
|
||||||
// Find the cells that are below and above a depth.
|
// Find the cells that are below and above a depth.
|
||||||
// TODO: add 'anitialiasing', obtaining a more precise split
|
// TODO: add 'anitialiasing', obtaining a more precise split
|
||||||
// by f. ex. subdividing cells cut by the split depths.
|
// by f. ex. subdividing cells cut by the split depths.
|
||||||
@ -61,6 +63,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
enum WaterInit { WaterBelow, WaterAbove };
|
enum WaterInit { WaterBelow, WaterAbove };
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
|
||||||
// Compute flux corresponding to a velocity vector v = v0 + x*v1.
|
// Compute flux corresponding to a velocity vector v = v0 + x*v1.
|
||||||
void computeFluxLinear(const UnstructuredGrid& grid,
|
void computeFluxLinear(const UnstructuredGrid& grid,
|
||||||
const std::vector<double>& v0,
|
const std::vector<double>& v0,
|
||||||
@ -81,7 +82,7 @@ namespace
|
|||||||
flux[face] = std::inner_product(v.begin(), v.end(), grid.face_normals + face*dim, 0.0);
|
flux[face] = std::inner_product(v.begin(), v.end(), grid.face_normals + face*dim, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
double vectorDiff2(const std::vector<double>& v1, const std::vector<double>& v2)
|
double vectorDiff2(const std::vector<double>& v1, const std::vector<double>& v2)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user