From 7e6ed644cf97385a95544fcc889e2eb16bcc93ed Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Mon, 10 Feb 2020 08:38:08 +0300 Subject: [PATCH] elbrus: Workaround `-Werror=assign-where-compare-meant' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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);" --- test_curves.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; -- 2.39.5