diff --git a/build/unix/Makefile.am b/build/unix/Makefile.am index 17f39a4..b4b9cda 100644 --- a/build/unix/Makefile.am +++ b/build/unix/Makefile.am @@ -5,7 +5,6 @@ warningflags = \ -Wextra \ -Wshadow \ -Wunused \ - -Wmisleading-indentation \ -Wnull-dereference \ -Wvla \ -Wstrict-aliasing \ @@ -31,7 +30,6 @@ warningflags += \ -Wbool-conversion \ -Wextra-semi \ -Wnullable-to-nonnull-conversion \ - -Wno-implicit-int-float-conversion \ -Wno-unused-private-field \ -Wno-unused-command-line-argument # -Wzero-as-null-pointer-constant diff --git a/build/unix/configure.ac b/build/unix/configure.ac index 0f04a18..65676fb 100644 --- a/build/unix/configure.ac +++ b/build/unix/configure.ac @@ -111,6 +111,10 @@ AS_IF( ] ) +AX_CHECK_COMPILE_FLAG([-Wmisleading-indentation] , [COMPWARNFLAGS="$COMPWARNFLAGS -Wmisleading-indentation"] , , [-Werror]) +# Clang only +AX_CHECK_COMPILE_FLAG([-Wno-implicit-int-float-conversion], [COMPWARNFLAGS="$COMPWARNFLAGS -Wno-implicit-int-float-conversion"], , [-Werror]) + AC_SUBST([CXXSTD]) AC_SUBST([EXTRA_CXXFLAGS]) AC_SUBST([LDFLAGS]) diff --git a/src/ffft/FFTReal.hpp b/src/ffft/FFTReal.hpp index 1493ff9..37c0ef0 100644 --- a/src/ffft/FFTReal.hpp +++ b/src/ffft/FFTReal.hpp @@ -371,11 +371,11 @@ void FFTReal
::init_trigo_lut () const long level_len = 1L << (level - 1); DataType * const level_ptr = &_trigo_lut [get_trigo_level_index (level)]; - const double mul = PI / (level_len << 1); + const double mul = PI / double (level_len << 1); for (long i = 0; i < level_len; ++ i) { - level_ptr [i] = static_cast (cos (i * mul)); + level_ptr [i] = static_cast (cos (double (i) * mul)); } } } @@ -396,7 +396,7 @@ void FFTReal
::init_trigo_osc () OscType & osc = _trigo_osc [osc_cnt]; const long len = 1L << (TRIGO_BD_LIMIT + osc_cnt); - const double mul = (0.5 * PI) / len; + const double mul = (0.5 * PI) / double (len); osc.set_step (mul); } }