Skip to content

Commit c8e30c1

Browse files
cjihrigtargos
authored andcommitted
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: #30565 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: David Carlier <[email protected]>
1 parent f24f352 commit c8e30c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_crypto.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -5047,8 +5047,8 @@ static AllocatedBuffer ConvertSignatureToP1363(Environment* env,
50475047

50485048
const BIGNUM* r = ECDSA_SIG_get0_r(asn1_sig);
50495049
const BIGNUM* s = ECDSA_SIG_get0_s(asn1_sig);
5050-
CHECK_EQ(n, BN_bn2binpad(r, data, n));
5051-
CHECK_EQ(n, BN_bn2binpad(s, data + n, n));
5050+
CHECK_EQ(n, static_cast<unsigned int>(BN_bn2binpad(r, data, n)));
5051+
CHECK_EQ(n, static_cast<unsigned int>(BN_bn2binpad(s, data + n, n)));
50525052

50535053
ECDSA_SIG_free(asn1_sig);
50545054

0 commit comments

Comments
 (0)