diff options
author | Adam Langley <agl@google.com> | 2015-10-30 23:43:49 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-10-31 00:11:48 +0300 |
commit | d9e817309a6860bca4addd5c0d034897d66d3913 (patch) | |
tree | e05754851c0aa42852a55ae73d3d3c70e3194947 | |
parent | bb85f3d655dd3a9446cedeff15531b227847cc5d (diff) |
Fix several warnings that arise in Android.
Android is now using Ninja so it doesn't spew so much to the terminal
and thus any warnings in BoringSSL (which builds really early in the
process) and much more obvious.
Thus this change fixes a few warnings that appear in the Android build.
Change-Id: Id255ace90fece772a1c3a718c877559ce920b960
Reviewed-on: https://boringssl-review.googlesource.com/6400
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | crypto/asn1/x_bignum.c | 3 | ||||
-rw-r--r-- | crypto/bio/socket_helper.c | 2 | ||||
-rw-r--r-- | crypto/evp/p_dsa_asn1.c | 3 | ||||
-rw-r--r-- | crypto/evp/p_ec_asn1.c | 5 | ||||
-rw-r--r-- | crypto/poly1305/poly1305_arm.c | 2 | ||||
-rw-r--r-- | crypto/x509v3/v3name_test.c | 2 |
7 files changed, 14 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b5c088d..54c71ebe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,8 @@ if (NOT GO_EXECUTABLE) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wsign-compare -ggdb -fvisibility=hidden") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wsign-compare -ggdb -std=c++0x -fvisibility=hidden") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wsign-compare -Wmissing-field-initializers -ggdb -fvisibility=hidden") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wsign-compare -Wmissing-field-initializers -ggdb -std=c++0x -fvisibility=hidden") elseif(MSVC) set(MSVC_DISABLED_WARNINGS_LIST "C4100" # 'exarg' : unreferenced formal parameter diff --git a/crypto/asn1/x_bignum.c b/crypto/asn1/x_bignum.c index f8c62fd8..5867c4ff 100644 --- a/crypto/asn1/x_bignum.c +++ b/crypto/asn1/x_bignum.c @@ -80,7 +80,8 @@ static const ASN1_PRIMITIVE_FUNCS bignum_pf = { bn_free, 0, bn_c2i, - bn_i2c + bn_i2c, + NULL /* prim_print */, }; ASN1_ITEM_start(BIGNUM) diff --git a/crypto/bio/socket_helper.c b/crypto/bio/socket_helper.c index 01f635eb..96d7c247 100644 --- a/crypto/bio/socket_helper.c +++ b/crypto/bio/socket_helper.c @@ -59,7 +59,7 @@ int bio_ip_and_port_to_socket_and_addr(int *out_sock, ret = 0; for (cur = result; cur; cur = cur->ai_next) { - if (cur->ai_addrlen > sizeof(struct sockaddr_storage)) { + if ((size_t) cur->ai_addrlen > sizeof(struct sockaddr_storage)) { continue; } memset(out_addr, 0, sizeof(struct sockaddr_storage)); diff --git a/crypto/evp/p_dsa_asn1.c b/crypto/evp/p_dsa_asn1.c index 4790cf62..c92068f8 100644 --- a/crypto/evp/p_dsa_asn1.c +++ b/crypto/evp/p_dsa_asn1.c @@ -582,4 +582,7 @@ const EVP_PKEY_ASN1_METHOD dsa_asn1_meth = { int_dsa_free, old_dsa_priv_decode, old_dsa_priv_encode, + + NULL /* digest_verify_init_from_algorithm */, + NULL /* digest_sign_algorithm */, }; diff --git a/crypto/evp/p_ec_asn1.c b/crypto/evp/p_ec_asn1.c index 98679479..c583e0f7 100644 --- a/crypto/evp/p_ec_asn1.c +++ b/crypto/evp/p_ec_asn1.c @@ -569,5 +569,8 @@ const EVP_PKEY_ASN1_METHOD ec_asn1_meth = { int_ec_free, old_ec_priv_decode, - old_ec_priv_encode + old_ec_priv_encode, + + NULL /* digest_verify_init_from_algorithm */, + NULL /* digest_sign_algorithm */, }; diff --git a/crypto/poly1305/poly1305_arm.c b/crypto/poly1305/poly1305_arm.c index c06ededd..5e78dc06 100644 --- a/crypto/poly1305/poly1305_arm.c +++ b/crypto/poly1305/poly1305_arm.c @@ -132,7 +132,7 @@ static uint32_t load32(uint8_t *t) { static void fe1305x2_frombytearray(fe1305x2 *r, const uint8_t *x, unsigned long long xlen) { - int i; + unsigned i; uint8_t t[17]; for (i = 0; (i < 16) && (i < xlen); i++) { diff --git a/crypto/x509v3/v3name_test.c b/crypto/x509v3/v3name_test.c index a3197e60..f9f70871 100644 --- a/crypto/x509v3/v3name_test.c +++ b/crypto/x509v3/v3name_test.c @@ -284,7 +284,7 @@ static const struct set_name_fn name_fns[] = {set_email_and_cn, "set emailAddress", 0, 1}, {set_altname_dns, "set dnsName", 1, 0}, {set_altname_email, "set rfc822Name", 0, 1}, - {NULL, NULL, 0} + {NULL, NULL, 0, 0}, }; static X509 *make_cert(void) |