diff options
author | Hans Nilsson <[email protected]> | 2019-03-20 12:46:09 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2019-03-21 14:46:31 +0100 |
commit | 64b00c83b01df1882224741a71f4ad706ef82d56 (patch) | |
tree | a38413aaa67e66c4c19a1724801b9bd5ba4e325c /lib/crypto/c_src | |
parent | 59cfe1d4902cbbdae76b12367ac80df8a96a9983 (diff) | |
download | otp-64b00c83b01df1882224741a71f4ad706ef82d56.tar.gz otp-64b00c83b01df1882224741a71f4ad706ef82d56.tar.bz2 otp-64b00c83b01df1882224741a71f4ad706ef82d56.zip |
crypto: Fixup 'break strict-aliasing rules' warning
Diffstat (limited to 'lib/crypto/c_src')
-rw-r--r-- | lib/crypto/c_src/api_ng.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypto/c_src/api_ng.c b/lib/crypto/c_src/api_ng.c index 781bdd5627..f4312114ed 100644 --- a/lib/crypto/c_src/api_ng.c +++ b/lib/crypto/c_src/api_ng.c @@ -347,7 +347,7 @@ ERL_NIF_TERM ng_crypto_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg ret = enif_make_resource(env, ctx_res); if(ctx_res) enif_release_resource(ctx_res); - } else if (enif_get_resource(env, argv[0], evp_cipher_ctx_rtype, (void**)&ctx_res)) { + } else if (enif_get_resource(env, argv[0], (ErlNifResourceType*)evp_cipher_ctx_rtype, (void**)&ctx_res)) { /* Fetch the flag telling if we are going to encrypt (=true) or decrypt (=false) */ if (argv[3] == atom_true) encflg = 1; @@ -427,7 +427,7 @@ ERL_NIF_TERM ng_crypto_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[ struct evp_cipher_ctx *ctx_res; ERL_NIF_TERM ret; - if (!enif_get_resource(env, argv[0], evp_cipher_ctx_rtype, (void**)&ctx_res)) + if (!enif_get_resource(env, argv[0], (ErlNifResourceType*)evp_cipher_ctx_rtype, (void**)&ctx_res)) return EXCP_BADARG(env, "Bad 1:st arg"); if (argc == 3) { |