Commit 31a80694 authored by FdaSilvaYY's avatar FdaSilvaYY Committed by Rich Salz
Browse files

[Win] Fix some test method signatures ...



to halves MSVC warnings.

Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4172)
parent 30bb0259
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
#include <openssl/asn1.h>
#include "testutil.h"

static int test_string_tbl()
static int test_string_tbl(void)
{
    const ASN1_STRING_TABLE *tmp = NULL;
    int nid = 12345678, nid2 = 87654321, rv = 0, ret = 0;
+24 −24
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ static int rand_neg(void)
}


static int test_sub()
static int test_sub(void)
{
    BIGNUM *a = NULL, *b = NULL, *c = NULL;
    int i, st = 0;
@@ -187,7 +187,7 @@ err:
}


static int test_div_recip()
static int test_div_recip(void)
{
    BIGNUM *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL;
    BN_RECP_CTX *recp = NULL;
@@ -231,7 +231,7 @@ err:
}


static int test_mod()
static int test_mod(void)
{
    BIGNUM *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL;
    int st = 0, i;
@@ -323,7 +323,7 @@ static char *glue(const char *list[])
 * Test constant-time modular exponentiation with 1024-bit inputs, which on
 * x86_64 cause a different code branch to be taken.
 */
static int test_modexp_mont5()
static int test_modexp_mont5(void)
{
    BIGNUM *a = NULL, *p = NULL, *m = NULL, *d = NULL, *e = NULL;
    BIGNUM *b = NULL, *n = NULL, *c = NULL;
@@ -431,7 +431,7 @@ err:
}

#ifndef OPENSSL_NO_EC2M
static int test_gf2m_add()
static int test_gf2m_add(void)
{
    BIGNUM *a = NULL, *b = NULL, *c = NULL;
    int i, st = 0;
@@ -464,7 +464,7 @@ static int test_gf2m_add()
    return st;
}

static int test_gf2m_mod()
static int test_gf2m_mod(void)
{
    BIGNUM *a = NULL, *b[2] = {NULL,NULL}, *c = NULL, *d = NULL, *e = NULL;
    int i, j, st = 0;
@@ -502,7 +502,7 @@ static int test_gf2m_mod()
    return st;
}

static int test_gf2m_mul()
static int test_gf2m_mul(void)
{
    BIGNUM *a, *b[2] = {NULL, NULL}, *c = NULL, *d = NULL;
    BIGNUM *e = NULL, *f = NULL, *g = NULL, *h = NULL;
@@ -553,7 +553,7 @@ static int test_gf2m_mul()
    return st;
}

static int test_gf2m_sqr()
static int test_gf2m_sqr(void)
{
    BIGNUM *a = NULL, *b[2] = {NULL,NULL}, *c = NULL, *d = NULL;
    int i, j, st = 0;
@@ -590,7 +590,7 @@ static int test_gf2m_sqr()
    return st;
}

static int test_gf2m_modinv()
static int test_gf2m_modinv(void)
{
    BIGNUM *a = NULL, *b[2] = {NULL,NULL}, *c = NULL, *d = NULL;
    int i, j, st = 0;
@@ -625,7 +625,7 @@ static int test_gf2m_modinv()
    return st;
}

static int test_gf2m_moddiv()
static int test_gf2m_moddiv(void)
{
    BIGNUM *a = NULL, *b[2] = {NULL,NULL}, *c = NULL, *d = NULL;
    BIGNUM *e = NULL, *f = NULL;
@@ -667,7 +667,7 @@ static int test_gf2m_moddiv()
    return st;
}

static int test_gf2m_modexp()
static int test_gf2m_modexp(void)
{
    BIGNUM *a = NULL, *b[2] = {NULL,NULL}, *c = NULL, *d = NULL;
    BIGNUM *e = NULL, *f = NULL;
@@ -713,7 +713,7 @@ static int test_gf2m_modexp()
    return st;
}

static int test_gf2m_modsqrt()
static int test_gf2m_modsqrt(void)
{
    BIGNUM *a = NULL, *b[2] = {NULL,NULL}, *c = NULL, *d = NULL;
    BIGNUM *e = NULL, *f = NULL;
@@ -755,7 +755,7 @@ static int test_gf2m_modsqrt()
    return st;
}

static int test_gf2m_modsolvequad()
static int test_gf2m_modsolvequad(void)
{
    BIGNUM *a = NULL, *b[2] = {NULL,NULL}, *c = NULL, *d = NULL;
    BIGNUM *e = NULL;
@@ -806,7 +806,7 @@ static int test_gf2m_modsolvequad()
}
#endif

static int test_kronecker()
static int test_kronecker(void)
{
    BIGNUM *a = NULL, *b = NULL, *r = NULL, *t = NULL;
    int i, legendre, kronecker, st = 0;
@@ -1442,7 +1442,7 @@ err:
    return st;
}

static int test_bn2padded()
static int test_bn2padded(void)
{
#if HAVE_BN_PADDED
    uint8_t zeros[256], out[256], reference[128];
@@ -1503,7 +1503,7 @@ err:
#endif
}

static int test_dec2bn()
static int test_dec2bn(void)
{
    BIGNUM *bn = NULL;
    int st = 0;
@@ -1572,7 +1572,7 @@ err:
    return st;
}

static int test_hex2bn()
static int test_hex2bn(void)
{
    BIGNUM *bn = NULL;
    int st = 0;
@@ -1638,7 +1638,7 @@ err:
    return st;
}

static int test_asc2bn()
static int test_asc2bn(void)
{
    BIGNUM *bn = NULL;
    int st = 0;
@@ -1736,7 +1736,7 @@ err:
    return st;
}

static int test_rand()
static int test_rand(void)
{
    BIGNUM *bn = NULL;
    int st = 0;
@@ -1762,7 +1762,7 @@ err:
    return st;
}

static int test_negzero()
static int test_negzero(void)
{
    BIGNUM *a = NULL, *b = NULL, *c = NULL, *d = NULL;
    BIGNUM *numerator = NULL, *denominator = NULL;
@@ -1831,7 +1831,7 @@ err:
    return st;
}

static int test_badmod()
static int test_badmod(void)
{
    BIGNUM *a = NULL, *b = NULL, *zero = NULL;
    BN_MONT_CTX *mont = NULL;
@@ -1897,7 +1897,7 @@ err:
    return st;
}

static int test_expmodzero()
static int test_expmodzero(void)
{
    BIGNUM *a = NULL, *r = NULL, *zero = NULL;
    int st = 0;
@@ -1930,7 +1930,7 @@ err:
    return st;
}

static int test_smallprime()
static int test_smallprime(void)
{
    static const int kBits = 10;
    BIGNUM *r;
@@ -1948,7 +1948,7 @@ err:
    return st;
}

static int test_3_is_prime()
static int test_3_is_prime(void)
{
    int ret = 0;
    BIGNUM *r = NULL;
+2 −2
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ static int execute_test(CIPHERLIST_TEST_FIXTURE *fixture)
#define EXECUTE_CIPHERLIST_TEST() \
    EXECUTE_TEST(execute_test, tear_down)

static int test_default_cipherlist_implicit()
static int test_default_cipherlist_implicit(void)
{
    SETUP_CIPHERLIST_TEST_FIXTURE();
    if (fixture == NULL)
@@ -195,7 +195,7 @@ static int test_default_cipherlist_implicit()
    return result;
}

static int test_default_cipherlist_explicit()
static int test_default_cipherlist_explicit(void)
{
    SETUP_CIPHERLIST_TEST_FIXTURE();
    if (fixture == NULL)
+1 −1
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ static const char *get_std_name_by_id(int id)
    return NULL;
}

static int test_cipher_name()
static int test_cipher_name(void)
{
    SSL_CTX *ctx = NULL;
    SSL *ssl = NULL;
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ typedef struct {

static expected_error_t expected_error = ASN1_UNKNOWN;

static int test_bad_asn1()
static int test_bad_asn1(void)
{
    BIO *bio = NULL;
    ASN1_VALUE *value = NULL;
Loading