From 2028168e17524aa47eb49d2c3396856de04ad3c1 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 7 Oct 2021 13:36:39 +0200 Subject: crypto: Silence CodeChecker --- lib/crypto/c_src/api_ng.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/crypto/c_src/api_ng.c b/lib/crypto/c_src/api_ng.c index 35404ba1e0..077cdda92e 100644 --- a/lib/crypto/c_src/api_ng.c +++ b/lib/crypto/c_src/api_ng.c @@ -210,6 +210,11 @@ static int get_init_args(ErlNifEnv* env, ctx_res->padded_size = -1; ctx_res->size = 0; + /* Two initializations to make CodeChecker happy: it gets a bit desoriented + by the NIF Exception model */ + ctx_res->encflag = 0; + ctx_res->padding = atom_error; + /* Fetch the options */ if ((*return_term = get_opts(env, argv[opts_arg_num], opts_arg_num, &(ctx_res->encflag), &(ctx_res->padding)) -- cgit v1.2.1