polar_chain_test: fix compilation issue when AVX2 isn't used

this fixes compilation on aarch64:

FAILED: lib/src/phy/fec/polar/test/CMakeFiles/polar_chain_test.dir/polar_chain_test.c.o
/usr/bin/gcc -DENABLE_TIMEPROF -DENABLE_TTCN3 -DHAVE_5GNR -DHAVE_MBEDTLS -I/usr/include/SoapySDR -Ilib/include -I../lib/include -Wno-unused-but-set-variable -Wall -Wno-comment -Wno-write-strings -Wno-unused-result -Wformat -Wmissing-field-initializers -Wtype-limits -std=c99 -fno-strict-aliasing -D_GNU_SOURCE -O3 -fno-trapping-math -fno-math-errno -DBUILD_TYPE_RELEASE -DIS_ARM -DHAVE_NEON -DHAVE_NEONv8 -fvisibility=hidden -fdiagnostics-color=always -Werror --param large-function-growth=1600 -O3 -DNDEBUG -fPIE -MD -MT lib/src/phy/fec/polar/test/CMakeFiles/polar_chain_test.dir/polar_chain_test.c.o -MF lib/src/phy/fec/polar/test/CMakeFiles/polar_chain_test.dir/polar_chain_test.c.o.d -o lib/src/phy/fec/polar/test/CMakeFiles/polar_chain_test.dir/polar_chain_test.c.o   -c ../lib/src/phy/fec/polar/test/polar_chain_test.c
../lib/src/phy/fec/polar/test/polar_chain_test.c: In function ‘main’:
../lib/src/phy/fec/polar/test/polar_chain_test.c:214:11: error: unused variable ‘gain_c_avx2’ [-Werror=unused-variable]
  214 |   float   gain_c_avx2 = NAN;
      |           ^~~~~~~~~~~
../lib/src/phy/fec/polar/test/polar_chain_test.c:191:7: error: unused variable ‘errors_symb_c_avx2’ [-Werror=unused-variable]
  191 |   int errors_symb_c_avx2 = 0;
      |       ^~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
master
Codebot 4 years ago committed by Andre Puschmann
parent 848496bb0f
commit f5d14d7649

@ -188,7 +188,9 @@ int main(int argc, char** argv)
int errors_symb = 0;
int errors_symb_s = 0;
int errors_symb_c = 0;
#ifdef LV_HAVE_AVX2
int errors_symb_c_avx2 = 0;
#endif
int n_error_words[SNR_POINTS + 1];
int n_error_words_s[SNR_POINTS + 1];
@ -211,7 +213,9 @@ int main(int argc, char** argv)
int8_t inf8 = (1U << 7U) - 1;
float gain_s = NAN;
float gain_c = NAN;
#ifdef LV_HAVE_AVX2
float gain_c_avx2 = NAN;
#endif
srslte_polar_code_t code;
srslte_polar_encoder_t enc;

Loading…
Cancel
Save