summaryrefslogtreecommitdiff
path: root/lib/crypto/c_src/api_ng.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/c_src/api_ng.c')
-rw-r--r--lib/crypto/c_src/api_ng.c5
1 files changed, 5 insertions, 0 deletions
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))