Skip to content

Commit

Permalink
Merge Pull Request #13746 from cgcgcg/Trilinos/warnings
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'Silence warnings'
PR Author: cgcgcg
  • Loading branch information
trilinos-autotester authored Jan 24, 2025
2 parents 643fc11 + b6a7b72 commit 4c14b7e
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 4 deletions.
5 changes: 4 additions & 1 deletion packages/amesos2/src/Amesos2_Factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

#include "Amesos2_config.h"

#include "Teuchos_CompilerCodeTweakMacros.hpp"

#include "Amesos2_Solver.hpp"
#include "Amesos2_SolverTraits.hpp"

Expand Down Expand Up @@ -640,7 +642,7 @@ struct throw_no_matrix_support_exception {
return handle_solver_matrix_and_type_support<MUMPS,Matrix,Vector>::apply(A,X,B);
}
#endif

#ifdef HAVE_AMESOS2_STRUMPACK
if((solverName == "STRUMPACK") || (solverName == "strumpack") ||
(solverName == "amesos2_STRUMPACK") || (solverName == "amesos2_strumpack"))
Expand All @@ -666,6 +668,7 @@ struct throw_no_matrix_support_exception {
std::string err_msg = solver_name + " is not enabled or is not supported";
TEUCHOS_TEST_FOR_EXCEPTION(true, std::invalid_argument, err_msg);
//return( Teuchos::null ); // unreachable
TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
}

} // end namespace Amesos2
Expand Down
4 changes: 3 additions & 1 deletion packages/muelu/src/MueCentral/MueLu_VerbosityLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ MsgType toVerbLevel(const std::string& verbLevelStr) {
std::string lcVerb = lowerCase(verbLevelStr);
if (verbMap.find(lcVerb) != verbMap.end())
return verbMap[lcVerb];
else
else {
TEUCHOS_TEST_FOR_EXCEPTION(true, Exceptions::RuntimeError, "MueLu::ParameterListInterpreter():: invalid verbosity level: " << verbLevelStr);
TEUCHOS_UNREACHABLE_RETURN(Errors);
}
}

} // namespace MueLu
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// *****************************************************************************
// @HEADER

#include "Teuchos_CompilerCodeTweakMacros.hpp"

#include <Panzer_SetupPartitionedWorksetUtilities.hpp>
#include "Panzer_STK_WorksetFactory.hpp"

Expand Down Expand Up @@ -119,6 +121,7 @@ getWorksets(const panzer::WorksetDescriptor & worksetDesc,
}
else {
TEUCHOS_ASSERT(false);
TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
}
}

Expand Down
5 changes: 4 additions & 1 deletion packages/panzer/mini-em/src/solvers/MiniEM_Interpolation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// *****************************************************************************
// @HEADER

#include "Teuchos_CompilerCodeTweakMacros.hpp"
#include "MiniEM_Interpolation.hpp"
#include "Panzer_Interpolation.hpp"

Expand Down Expand Up @@ -87,8 +88,10 @@ request(const Teko::RequestMesg & rm) {
build();
}
return interp_;
} else
} else {
TEUCHOS_ASSERT(false);
TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
}
}

void
Expand Down
5 changes: 4 additions & 1 deletion packages/panzer/mini-em/src/solvers/MiniEM_Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#ifndef _MiniEM_Utils_cpp_
#define _MiniEM_Utils_cpp_

#include "Teuchos_CompilerCodeTweakMacros.hpp"
#include "MiniEM_Utils.hpp"
#include "Thyra_DiagonalLinearOpBase.hpp"
#include "Thyra_DefaultDiagonalLinearOp.hpp"
Expand Down Expand Up @@ -206,8 +207,10 @@ namespace mini_em {
// return Teuchos::rcp_const_cast<Thyra::LinearOpBase<double> >(thyConst);
return thyConst;
#endif
} else
} else {
TEUCHOS_ASSERT(false);
TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
}
}

bool isMatrixFreeOperator(const Teko::LinearOp& op) {
Expand Down
2 changes: 2 additions & 0 deletions packages/teko/src/Teko_GaussSeidelPreconditionerFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "Teko_BlockUpperTriInverseOp.hpp"
#include "Teko_BlockLowerTriInverseOp.hpp"
#include "Teuchos_CompilerCodeTweakMacros.hpp"

using Teuchos::rcp;
using Teuchos::RCP;
Expand Down Expand Up @@ -54,6 +55,7 @@ LinearOp GaussSeidelPreconditionerFactory::buildPreconditionerOperator(
}

TEUCHOS_ASSERT(false); // we should never make it here!
TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
}

//! Initialize from a parameter list
Expand Down
1 change: 1 addition & 0 deletions packages/teko/src/Teko_InverseLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ Teuchos::RCP<InverseFactory> InverseLibrary::getInverseFactory(const std::string
}

TEUCHOS_ASSERT(false);
TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
}

//! Print the inverses and parameter lists available for use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ MultiVectorFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>::

XPETRA_FACTORY_ERROR_IF_EPETRA(map->lib());
XPETRA_FACTORY_END;
TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
}

template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
Expand Down

0 comments on commit 4c14b7e

Please sign in to comment.