cppcheck-test: add suppression of some expected warnings
This commit is contained in:
parent
724165b101
commit
a5513e460b
|
@ -14,11 +14,19 @@ shift 2
|
|||
|
||||
tmpfil=`mktemp`
|
||||
$cppcheck_cmd $@ --force --enable=all --suppress=unusedFunction $source_file &> $tmpfil
|
||||
declare -a ignorere
|
||||
ignorere=(\\[/usr.*\\]
|
||||
\\[.*petsc.*.h:.*\\]:.*
|
||||
\\[\\*\\]
|
||||
\\[.*Vec3.h:.*\\]:.*Vec[34]..has.a.constructor.with.1.argument.that.is.not.explicit.
|
||||
\\[.*Tensor.h:.*\\]:.*SymmTensor..has.a.constructor.with.1.argument.that.is.not.explicit.)
|
||||
nmatch=`cat $tmpfil | grep "\[.*\]" | wc -l`
|
||||
nsys=`cat $tmpfil | grep "\[/usr.*\]" | wc -l`
|
||||
nnone=`cat $tmpfil | grep "\[\\*]" | wc -l`
|
||||
let "nval=$nmatch-$nsys-$nnone"
|
||||
if test $nval -gt 0
|
||||
for RE in ${ignorere[*]}
|
||||
do
|
||||
nign=`cat $tmpfil | grep "$RE" | wc -l`
|
||||
let "nmatch=$nmatch-$nign"
|
||||
done
|
||||
if test $nmatch -gt 0
|
||||
then
|
||||
cat $tmpfil
|
||||
$cppcheck_cmd $@ -q --xml --xml-version=2 --force --enable=all --suppress=unusedFunction $source_file &> $tmpfil
|
||||
|
|
|
@ -238,10 +238,10 @@ find_program(VTFLS_COMMAND vtfls)
|
|||
find_program(H5LS_COMMAND h5ls)
|
||||
|
||||
# Generate regtest script with correct paths
|
||||
configure_file(${IFEM_REGTEST_SCRIPT} regtest.sh)
|
||||
configure_file(${IFEM_CLANG_CHECK_TEST_SCRIPT} clang-check-test.sh)
|
||||
configure_file(${IFEM_CPPCHECK_TEST_SCRIPT} cppcheck-test.sh)
|
||||
configure_file(${IFEM_IOTEST_SCRIPT} iotest.sh)
|
||||
configure_file(${IFEM_REGTEST_SCRIPT} regtest.sh @ONLY)
|
||||
configure_file(${IFEM_CLANG_CHECK_TEST_SCRIPT} clang-check-test.sh @ONLY)
|
||||
configure_file(${IFEM_CPPCHECK_TEST_SCRIPT} cppcheck-test.sh @ONLY)
|
||||
configure_file(${IFEM_IOTEST_SCRIPT} iotest.sh @ONLY)
|
||||
|
||||
if(IFEM_BUILD_TESTING)
|
||||
set(EXCL_ALL)
|
||||
|
|
|
@ -232,7 +232,7 @@ private:
|
|||
int minNode = 0; //!< First node we own
|
||||
int maxNode = 0; //!< Last node we own
|
||||
|
||||
const SAMpatch* sam; //!< The assembly handler the DD is constructed for.
|
||||
const SAMpatch* sam = nullptr; //!< The assembly handler the DD is constructed for.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -104,7 +104,7 @@ class EvalFunction : public RealFunc
|
|||
|
||||
public:
|
||||
//! \brief The constructor parses the expression string.
|
||||
EvalFunction(const char* function);
|
||||
explicit EvalFunction(const char* function);
|
||||
//! \brief The destructor frees the dynamically allocated objects.
|
||||
virtual ~EvalFunction();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user