]> www.wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
MSVC: Ifdef GCC pragmas
authorVitaly Chikunov <vt@altlinux.org>
Sat, 4 Dec 2021 06:00:47 +0000 (09:00 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Sat, 11 Dec 2021 16:45:14 +0000 (19:45 +0300)
Error message:

  test_ciphers.c(37,9): warning C4068: unknown pragma 'GCC'

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
test_ciphers.c
test_digest.c
test_tls.c

index 86f336e72f61cca5cbe7fe7abbe679f8db462094..8497652a275836f78876af0132aca59e9624396a 100644 (file)
             else \
                 printf(cGREEN "Test passed" cNORM "\n");}
 
+#ifdef __GNUC__
 /* Pragma to allow commenting out some tests. */
-#pragma GCC diagnostic ignored "-Wunused-const-variable"
+# pragma GCC diagnostic ignored "-Wunused-const-variable"
+#endif
 
 /*
  * Test keys from both GOST R 34.12-2015 and GOST R 34.13-2015,
index b9c48810abe8b1357bd6210aa24d00c77485ef20..a931a3509d577dacb0917d06185ac25c4230b5bc 100644 (file)
             else \
                 printf(cGREEN "  Test passed" cNORM "\n");}
 
+#ifdef __GNUC__
 /* To test older APIs. */
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
 
 /*
  * Test keys from both GOST R 34.12-2015 and GOST R 34.13-2015,
index a6ac41eb264946069bdf2f8d91053b639b76d19e..b1d0865fd365433d3912d26c0ef04f79c024f0e0 100644 (file)
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#ifdef __GNUC__
 /* For X509_NAME_add_entry_by_txt */
-#pragma GCC diagnostic ignored "-Wpointer-sign"
+# pragma GCC diagnostic ignored "-Wpointer-sign"
+#endif
 
 #define T(e) ({ if (!(e)) { \
                ERR_print_errors_fp(stderr); \