]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
MSVC: No support for GCC's compound statement expressions
authorVitaly Chikunov <vt@altlinux.org>
Sat, 4 Dec 2021 06:55:55 +0000 (09:55 +0300)
committerDmitry Belyavskiy <beldmit@users.noreply.github.com>
Sat, 11 Dec 2021 16:45:14 +0000 (19:45 +0300)
Error messages:

  test_ciphers.c(329,5): error C2059: syntax error: '{'
  test_ciphers.c(329,5): error C2059: syntax error: '}'
  test_ciphers.c(329,5): error C2059: syntax error: ')'

Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
test_ciphers.c
test_context.c
test_curves.c
test_derive.c
test_digest.c
test_keyexpimp.c
test_params.c
test_sign.c
test_tls.c

index ddf572dbd30c9a455635d5a8031a659c82cc09dd..2e923a7853a9083a4eb7fdef9c86fbf2dff9c379 100644 (file)
 #endif
 #include <stdlib.h>
 
-#define T(e) ({ \
-    if (!(e)) {\
-       ERR_print_errors_fp(stderr);\
-       OpenSSLDie(__FILE__, __LINE__, #e);\
-    } \
-})
+#define T(e) \
+    if (!(e)) { \
+       ERR_print_errors_fp(stderr); \
+       OpenSSLDie(__FILE__, __LINE__, #e); \
+    }
 
 #define cRED   "\033[1;31m"
 #define cDRED  "\033[0;31m"
index fa0d2fab2b4f002768b3bf455b14f3f079a85ae2..293f921076b47745832ff473e1f43c1b0870415b 100644 (file)
 # include "gost_lcl.h"
 #endif
 
-#define T(e) if (!(e)) {\
-       ERR_print_errors_fp(stderr);\
-       OpenSSLDie(__FILE__, __LINE__, #e);\
+#define T(e) \
+    if (!(e)) { \
+        ERR_print_errors_fp(stderr); \
+        OpenSSLDie(__FILE__, __LINE__, #e); \
     }
 
 #define cRED   "\033[1;31m"
index 73c47d91e62d7b64a54f30f78d74633afdaf4755..344a50e04e8cbb700c564fd4afee813126cf0fed 100644 (file)
 #include <openssl/bn.h>
 #include <string.h>
 
-#define T(e) ({ if (!(e)) { \
-               ERR_print_errors_fp(stderr); \
-               OpenSSLDie(__FILE__, __LINE__, #e); \
-           } \
-        })
+#define T(e) \
+    if (!(e)) { \
+        ERR_print_errors_fp(stderr); \
+        OpenSSLDie(__FILE__, __LINE__, #e); \
+    }
 
 #define cRED   "\033[1;31m"
 #define cDRED  "\033[0;31m"
index c99ccef5acbbb0383349a213cbc55541ff4a18a2..09b01ac7c34d74ad1c913155507941fdd9815761 100644 (file)
 #include <string.h>
 #include "gost_lcl.h"
 
-#define T(e) ({ \
+#define T(e) \
     if (!(e)) { \
         ERR_print_errors_fp(stderr); \
         OpenSSLDie(__FILE__, __LINE__, #e); \
-    } \
-})
+    }
 
 #define cRED    "\033[1;31m"
 #define cDRED   "\033[0;31m"
index a931a3509d577dacb0917d06185ac25c4230b5bc..f3d4169555daecc61b420800df6fe35fb5a98960 100644 (file)
 #endif
 
 /* Helpers to test OpenSSL API calls. */
-#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"
index 7c40927cc9f03f91e36f009bc53a02e3263f4cbd..d7e0e09e241478e0b5d957c097ce49e74a020377 100644 (file)
 #include "e_gost_err.h"
 #include "gost_grasshopper_cipher.h"
 
-#define T(e) if (!(e)) {\
-        ERR_print_errors_fp(stderr);\
-        OpenSSLDie(__FILE__, __LINE__, #e);\
+#define T(e) \
+    if (!(e)) { \
+        ERR_print_errors_fp(stderr); \
+        OpenSSLDie(__FILE__, __LINE__, #e); \
     }
 
 static void hexdump(FILE *f, const char *title, const unsigned char *s, int l)
index 89bae3d43f1a966ee9aacc2781ad243b94f466aa..2808e263562b605d56b6ed4ee9f6d927a3a96cc0 100644 (file)
 #include <openssl/safestack.h>
 #include <string.h>
 
-#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"
index 0322ac024d25de634000fca746b0eaba1fc8d907..4dd5d9b222dcdfa067b7a081bef091749b30d894 100644 (file)
 #include <string.h>
 #include <stdlib.h>
 
-#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"
index b1d0865fd365433d3912d26c0ef04f79c024f0e0..d016e62ca920a7d8427b46302439a34603b89195 100644 (file)
 # pragma GCC diagnostic ignored "-Wpointer-sign"
 #endif
 
-#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"