X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=openssl-gost%2Fengine.git;a=blobdiff_plain;f=test_params.c;h=114193346e63da2362a1b265ae74ac134e424b3b;hp=89bae3d43f1a966ee9aacc2781ad243b94f466aa;hb=HEAD;hpb=f3e84b52d2c5bf6774070b758714b90845d722d2 diff --git a/test_params.c b/test_params.c index 89bae3d..1141933 100644 --- a/test_params.c +++ b/test_params.c @@ -7,6 +7,11 @@ * See https://www.openssl.org/source/license.html for details */ +#ifdef _MSC_VER +# pragma warning(push, 3) +# include +# pragma warning(pop) +#endif #include "e_gost_err.h" #include "gost_lcl.h" #include @@ -19,17 +24,17 @@ #include #include -#define T(e) ({ if (!(e)) { \ - ERR_print_errors_fp(stderr); \ - OpenSSLDie(__FILE__, __LINE__, #e); \ - } \ - }) -#define TE(e) ({ if (!(e)) { \ - ERR_print_errors_fp(stderr); \ - fprintf(stderr, "Error at %s:%d %s\n", __FILE__, __LINE__, #e); \ - return -1; \ - } \ - }) +#define T(e) \ + if (!(e)) { \ + ERR_print_errors_fp(stderr); \ + OpenSSLDie(__FILE__, __LINE__, #e); \ + } +#define TE(e) \ + if (!(e)) { \ + ERR_print_errors_fp(stderr); \ + fprintf(stderr, "Error at %s:%d %s\n", __FILE__, __LINE__, #e); \ + return -1; \ + } #define cRED "\033[1;31m" #define cDRED "\033[0;31m" @@ -1127,7 +1132,7 @@ static int test_param(struct test_param *t) T(mdtype = EVP_get_digestbynid(hash_nid)); T(EVP_VerifyInit(md_ctx, mdtype)); /* Feed byte-by-byte. */ - int i; + size_t i; for (i = 0; i < t->data_len; i++) T(EVP_VerifyUpdate(md_ctx, &t->data[i], 1)); err = EVP_VerifyFinal(md_ctx, sig, siglen, pkey);