From 0f6f3e3c90441a243c9fa007ea466475186e58ad Mon Sep 17 00:00:00 2001 From: Andrew Heather <a.heather@opencfd.co.uk> Date: Tue, 28 Jun 2016 16:53:21 +0100 Subject: [PATCH] COMP: TensorI.H - provide default case to suppress compiler warning --- src/OpenFOAM/primitives/Tensor/TensorI.H | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/OpenFOAM/primitives/Tensor/TensorI.H b/src/OpenFOAM/primitives/Tensor/TensorI.H index a20ba8773e4..c8ecbc7ce66 100644 --- a/src/OpenFOAM/primitives/Tensor/TensorI.H +++ b/src/OpenFOAM/primitives/Tensor/TensorI.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -314,6 +314,11 @@ inline Foam::Vector<Cmpt> Foam::Tensor<Cmpt>::vectorComponent return z(); break; } + + FatalErrorInFunction + << "Unhandled component " << cmpt << abort(FatalError); + + return x(); } -- GitLab