1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-12-23 04:44:03 +01:00

Clean cppcheck

This commit is contained in:
Anthony Scemama 2021-06-03 01:48:26 +02:00
parent 36293d892e
commit d88ade486b
2 changed files with 10 additions and 11 deletions

View File

@ -166,7 +166,9 @@ cppcheck: cppcheck.out
cppcheck.out: $(qmckl_h) cppcheck.out: $(qmckl_h)
cd src/ && \ cd src/ && \
cppcheck --addon=cert -q --error-exitcode=0 \ cppcheck --addon=cert -q --error-exitcode=0 \
--enable=all \ --enable=all --suppress="unusedStructMember"\
--suppress="unusedFunction" \
--suppress="missingIncludeSystem" \
--language=c --std=c99 -rp --platform=unix64 \ --language=c --std=c99 -rp --platform=unix64 \
-I../include *.c *.h 2>../$@ -I../include *.c *.h 2>../$@

View File

@ -392,18 +392,15 @@ qmckl_set_nucleus_kappa(qmckl_context context, const double rescale_factor_kappa
<<pre2>> <<pre2>>
//TODO: Check for small values of kappa //TODO: Check for small values of kappa
//if (rescale_factor_kappa == 0) { if (rescale_factor_kappa <= 0.0) {
// return qmckl_failwith( context, return qmckl_failwith( context,
// QMCKL_INVALID_ARG_2, QMCKL_INVALID_ARG_2,
// "qmckl_set_nucleus_kappa", "qmckl_set_nucleus_kappa",
// "rescale_factor_kappa cannot be 0"); "rescale_factor_kappa cannot be 0");
//} }
int32_t mask = 1 << 2; int32_t mask = 1 << 2;
int64_t num;
qmckl_exit_code rc;
ctx->nucleus.rescale_factor_kappa = rescale_factor_kappa; ctx->nucleus.rescale_factor_kappa = rescale_factor_kappa;
<<post2>> <<post2>>
@ -836,7 +833,7 @@ end function qmckl_compute_nn_distance_rescaled_f
#+begin_src c :tangle (eval h_private_func) :comments org :exports none #+begin_src c :tangle (eval h_private_func) :comments org :exports none
qmckl_exit_code qmckl_compute_nn_distance_rescaled ( qmckl_exit_code qmckl_compute_nn_distance_rescaled (
const qmckl_context context, const qmckl_context context,
const int64_t nucl_num, const int64_t nucl_num,
const double rescale_factor_kappa, const double rescale_factor_kappa,
const double* coord, const double* coord,