diff options
author | cjihrig <cjihrig@gmail.com> | 2019-11-20 22:26:38 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-11-30 05:49:30 +0300 |
commit | 44f28ea155cbeee653067623ee78d88d54f53a95 (patch) | |
tree | 9483ef9f50d46d19cd0b86b42f75cd2fd673bf6b /src/node_crypto.cc | |
parent | 8256d38349992422d3a8c194f4727f26f6b5b889 (diff) |
src: fix -Wsign-compare warnings
This commit addresses the following compilation warnings:
../src/node_crypto.cc:5053:3: warning: comparison of integers
of different signs: 'unsigned int' and 'int' [-Wsign-compare]
CHECK_EQ(n, BN_bn2binpad(r, data, n));
../src/node_crypto.cc:5054:3: warning: comparison of integers
of different signs: 'unsigned int' and 'int' [-Wsign-compare]
CHECK_EQ(n, BN_bn2binpad(s, data + n, n));
PR-URL: https://github.com/nodejs/node/pull/30565
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/node_crypto.cc')
-rw-r--r-- | src/node_crypto.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_crypto.cc b/src/node_crypto.cc index fa85f785537..c4fa6e90200 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5050,8 +5050,8 @@ static AllocatedBuffer ConvertSignatureToP1363(Environment* env, const BIGNUM* r = ECDSA_SIG_get0_r(asn1_sig); const BIGNUM* s = ECDSA_SIG_get0_s(asn1_sig); - CHECK_EQ(n, BN_bn2binpad(r, data, n)); - CHECK_EQ(n, BN_bn2binpad(s, data + n, n)); + CHECK_EQ(n, static_cast<unsigned int>(BN_bn2binpad(r, data, n))); + CHECK_EQ(n, static_cast<unsigned int>(BN_bn2binpad(s, data + n, n))); ECDSA_SIG_free(asn1_sig); |