Don't enable -Wmissing-prototypes
and -Wmissing-declarations
.
These really don't make much sense any more given most calls are from Rust to C.
This commit is contained in:
parent
7362d29696
commit
0728827d2e
2
build.rs
2
build.rs
@ -164,7 +164,6 @@ fn c_flags(target: &Target) -> &'static [&'static str] {
|
||||
static NON_MSVC_FLAGS: &[&str] = &[
|
||||
"-std=c1x", // GCC 4.6 requires "c1x" instead of "c11"
|
||||
"-Wbad-function-cast",
|
||||
"-Wmissing-prototypes",
|
||||
"-Wnested-externs",
|
||||
"-Wstrict-prototypes",
|
||||
];
|
||||
@ -189,7 +188,6 @@ fn cpp_flags(target: &Target) -> &'static [&'static str] {
|
||||
"-Wformat=2",
|
||||
"-Winline",
|
||||
"-Winvalid-pch",
|
||||
"-Wmissing-declarations",
|
||||
"-Wmissing-field-initializers",
|
||||
"-Wmissing-include-dirs",
|
||||
"-Wredundant-decls",
|
||||
|
@ -15,9 +15,6 @@
|
||||
#include "internal.h"
|
||||
#include "block.h"
|
||||
|
||||
// Prevent missing prototypes warnings.
|
||||
void GFp_block128_xor_assign(Block *r, Block a);
|
||||
|
||||
void GFp_block128_xor_assign(Block *r, Block a) {
|
||||
r->subblocks[0] ^= a.subblocks[0];
|
||||
r->subblocks[1] ^= a.subblocks[1];
|
||||
|
@ -111,12 +111,6 @@
|
||||
|
||||
#include "../../limbs/limbs.inl"
|
||||
|
||||
// Avoid -Wmissing-prototypes warnings.
|
||||
int GFp_bn_from_montgomery_in_place(BN_ULONG r[], size_t num_r, BN_ULONG a[],
|
||||
size_t num_a, const BN_ULONG n[],
|
||||
size_t num_n,
|
||||
const BN_ULONG n0_[BN_MONT_CTX_N0_LIMBS]);
|
||||
|
||||
OPENSSL_STATIC_ASSERT(BN_MONT_CTX_N0_LIMBS == 1 || BN_MONT_CTX_N0_LIMBS == 2,
|
||||
"BN_MONT_CTX_N0_LIMBS value is invalid");
|
||||
OPENSSL_STATIC_ASSERT(
|
||||
|
@ -16,9 +16,6 @@
|
||||
#include "../../internal.h"
|
||||
|
||||
|
||||
// Avoid -Wmissing-prototypes warnings.
|
||||
uint64_t GFp_bn_neg_inv_mod_r_u64(uint64_t n);
|
||||
|
||||
OPENSSL_STATIC_ASSERT(BN_MONT_CTX_N0_LIMBS == 1 || BN_MONT_CTX_N0_LIMBS == 2,
|
||||
"BN_MONT_CTX_N0_LIMBS value is invalid");
|
||||
OPENSSL_STATIC_ASSERT(sizeof(BN_ULONG) * BN_MONT_CTX_N0_LIMBS == sizeof(uint64_t),
|
||||
|
@ -36,14 +36,6 @@
|
||||
typedef P256_POINT_AFFINE PRECOMP256_ROW[64];
|
||||
|
||||
|
||||
/* Prototypes to avoid -Wmissing-prototypes warnings. */
|
||||
void GFp_nistz256_point_mul_base(P256_POINT *r,
|
||||
const Limb g_scalar[P256_LIMBS]);
|
||||
void GFp_nistz256_point_mul(P256_POINT *r, const Limb p_scalar[P256_LIMBS],
|
||||
const Limb p_x[P256_LIMBS],
|
||||
const Limb p_y[P256_LIMBS]);
|
||||
|
||||
|
||||
/* Functions implemented in assembly */
|
||||
/* Modular neg: res = -a mod P */
|
||||
void GFp_nistz256_neg(Limb res[P256_LIMBS], const Limb a[P256_LIMBS]);
|
||||
|
@ -31,9 +31,4 @@ typedef struct {
|
||||
} P384_POINT_AFFINE;
|
||||
|
||||
|
||||
// Prototypes to avoid -Wmissing-prototypes warnings.
|
||||
void GFp_nistz384_point_double(P384_POINT *r, const P384_POINT *a);
|
||||
void GFp_nistz384_point_add(P384_POINT *r, const P384_POINT *a,
|
||||
const P384_POINT *b);
|
||||
|
||||
#endif // OPENSSL_HEADER_EC_ECP_NISTZ384_H
|
||||
|
@ -28,12 +28,6 @@
|
||||
#pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
#endif
|
||||
|
||||
/* Avoid -Wmissing-prototypes warnings. */
|
||||
void GFp_nistz384_point_mul(P384_POINT *r, const BN_ULONG p_scalar[P384_LIMBS],
|
||||
const BN_ULONG p_x[P384_LIMBS],
|
||||
const BN_ULONG p_y[P384_LIMBS]);
|
||||
|
||||
|
||||
static BN_ULONG is_zero(const BN_ULONG a[P384_LIMBS]) {
|
||||
BN_ULONG acc = 0;
|
||||
for (size_t i = 0; i < P384_LIMBS; ++i) {
|
||||
|
@ -23,14 +23,8 @@ typedef Limb Elem[P256_LIMBS];
|
||||
typedef Limb ScalarMont[P256_LIMBS];
|
||||
typedef Limb Scalar[P256_LIMBS];
|
||||
|
||||
|
||||
/* Prototypes to avoid -Wmissing-prototypes warnings. */
|
||||
void GFp_p256_scalar_mul_mont(ScalarMont r, const ScalarMont a,
|
||||
const ScalarMont b);
|
||||
void GFp_p256_scalar_sqr_mont(ScalarMont r, const ScalarMont a);
|
||||
void GFp_p256_scalar_sqr_rep_mont(ScalarMont r, const ScalarMont a, Limb rep);
|
||||
|
||||
|
||||
#if defined(OPENSSL_ARM) || defined(OPENSSL_X86)
|
||||
void GFp_nistz256_sqr_mont(Elem r, const Elem a) {
|
||||
/* XXX: Inefficient. TODO: optimize with dedicated squaring routine. */
|
||||
|
@ -32,17 +32,6 @@ typedef Limb ScalarMont[P384_LIMBS];
|
||||
typedef Limb Scalar[P384_LIMBS];
|
||||
|
||||
|
||||
/* Prototypes to avoid -Wmissing-prototypes warnings. */
|
||||
void GFp_p384_elem_add(Elem r, const Elem a, const Elem b);
|
||||
void GFp_p384_elem_sub(Elem r, const Elem a, const Elem b);
|
||||
void GFp_p384_elem_div_by_2(Elem r, const Elem a);
|
||||
void GFp_p384_elem_mul_mont(Elem r, const Elem a, const Elem b);
|
||||
void GFp_p384_elem_neg(Elem r, const Elem a);
|
||||
void GFp_p384_scalar_inv_to_mont(ScalarMont r, const Scalar a);
|
||||
void GFp_p384_scalar_mul_mont(ScalarMont r, const ScalarMont a,
|
||||
const ScalarMont b);
|
||||
|
||||
|
||||
static const BN_ULONG Q[P384_LIMBS] = {
|
||||
TOBN(0x00000000, 0xffffffff),
|
||||
TOBN(0xffffffff, 0x00000000),
|
||||
|
@ -23,16 +23,6 @@
|
||||
* but we haven't verified that assumption. TODO: Fix it so we don't need to
|
||||
* make that assumption. */
|
||||
|
||||
/* Prototypes to avoid -Wmissing-prototypes warnings. */
|
||||
Limb LIMBS_less_than(const Limb a[], const Limb b[], size_t num_limbs);
|
||||
Limb LIMBS_less_than_limb(const Limb a[], Limb b, size_t num_limbs);
|
||||
int LIMBS_select_512_32(Limb r[], const Limb table[], size_t num_limbs,
|
||||
crypto_word index);
|
||||
crypto_word LIMBS_window5_split_window(Limb lower_limb, Limb higher_limb, size_t index_within_word);
|
||||
crypto_word LIMBS_window5_unsplit_window(Limb limb, size_t index_within_word);
|
||||
|
||||
crypto_word LIMB_shr(crypto_word a, size_t shift);
|
||||
|
||||
/* Returns 0xfff..f if |a| is all zero limbs, and zero otherwise. |num_limbs|
|
||||
* may be zero. */
|
||||
Limb LIMBS_are_zero(const Limb a[], size_t num_limbs) {
|
||||
|
6
third_party/fiat/curve25519.c
vendored
6
third_party/fiat/curve25519.c
vendored
@ -68,6 +68,8 @@
|
||||
#endif // BORINGSSL_CURVE25519_64BIT
|
||||
|
||||
|
||||
void GFp_x25519_sc_mask(uint8_t a[32]);
|
||||
|
||||
// Low-level intrinsic operations
|
||||
|
||||
static uint64_t load_3(const uint8_t *in) {
|
||||
@ -1881,10 +1883,6 @@ void GFp_x25519_scalar_mult_generic(uint8_t out[32],
|
||||
fe_tobytes(out, &x2);
|
||||
}
|
||||
|
||||
// Prototypes to avoid -Wmissing-prototypes warnings.
|
||||
void GFp_x25519_public_from_private_generic(uint8_t out_public_value[32],
|
||||
const uint8_t private_key[32]);
|
||||
|
||||
void GFp_x25519_public_from_private_generic(uint8_t out_public_value[32],
|
||||
const uint8_t private_key[32]) {
|
||||
uint8_t e[32];
|
||||
|
19
third_party/fiat/internal.h
vendored
19
third_party/fiat/internal.h
vendored
@ -116,23 +116,4 @@ typedef struct {
|
||||
fe_loose T2d;
|
||||
} ge_cached;
|
||||
|
||||
// Prevent -Wmissing-prototypes warnings.
|
||||
void GFp_x25519_fe_invert(fe *out, const fe *z);
|
||||
uint8_t GFp_x25519_fe_isnegative(const fe *f);
|
||||
void GFp_x25519_fe_mul_ttt(fe *h, const fe *f, const fe *g);
|
||||
void GFp_x25519_fe_neg(/*in/out*/ fe *f);
|
||||
void GFp_x25519_fe_tobytes(uint8_t *s, const fe *h);
|
||||
void GFp_x25519_ge_double_scalarmult_vartime(ge_p2 *r, const uint8_t *a,
|
||||
const ge_p3 *A,
|
||||
const uint8_t *b);
|
||||
int GFp_x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t *s);
|
||||
void GFp_x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]);
|
||||
void GFp_x25519_sc_muladd(uint8_t *s, const uint8_t *a, const uint8_t *b,
|
||||
const uint8_t *c);
|
||||
void GFp_x25519_sc_mask(uint8_t a[32]);
|
||||
void GFp_x25519_sc_reduce(uint8_t s[64]);
|
||||
void GFp_x25519_scalar_mult_generic(uint8_t out[32],
|
||||
const uint8_t scalar[32],
|
||||
const uint8_t point[32]);
|
||||
|
||||
#endif // OPENSSL_HEADER_CURVE25519_INTERNAL_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user