From: Vitaly Chikunov Date: Mon, 10 Feb 2020 05:38:08 +0000 (+0300) Subject: elbrus: Workaround `-Werror=assign-where-compare-meant' X-Git-Tag: v3.0.0~199 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=7e6ed644cf97385a95544fcc889e2eb16bcc93ed;p=openssl-gost%2Fengine.git elbrus: Workaround `-Werror=assign-where-compare-meant' This is lcc bug. Curiously, it is not triggered in `test_context.c' and `test_grasshopper.c'. "lcc: "/usr/src/gost-engine/test_curves.c", строка 32: ошибка: вероятное использование "=" вместо "==" [-Werror=assign-where-compare-meant] #define TEST_ASSERT(e) {if ((test = (e))) \ ^ в раскрытие макроса "TEST_ASSERT" на строке 217 TEST_ASSERT(0);" --- diff --git a/test_curves.c b/test_curves.c index 973307b..2761767 100644 --- a/test_curves.c +++ b/test_curves.c @@ -29,10 +29,13 @@ #define cBLUE "\033[1;34m" #define cDBLUE "\033[0;34m" #define cNORM "\033[m" -#define TEST_ASSERT(e) {if ((test = (e))) \ - printf(cRED " Test FAILED\n" cNORM); \ - else \ - printf(cGREEN " Test passed\n" cNORM);} +#define TEST_ASSERT(e) { \ + test = e; \ + if (test) \ + printf(cRED " Test FAILED\n" cNORM); \ + else \ + printf(cGREEN " Test passed\n" cNORM); \ +} struct test_curve { int nid;