Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
Fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
EleonoreMizo committed Jul 14, 2021
1 parent cc8f37e commit a7a5a4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 0 additions & 2 deletions build/unix/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ warningflags = \
-Wextra \
-Wshadow \
-Wunused \
-Wmisleading-indentation \
-Wnull-dereference \
-Wvla \
-Wstrict-aliasing \
Expand All @@ -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
Expand Down
4 changes: 4 additions & 0 deletions build/unix/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
6 changes: 3 additions & 3 deletions src/ffft/FFTReal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,11 @@ void FFTReal <DT>::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 <DataType> (cos (i * mul));
level_ptr [i] = static_cast <DataType> (cos (double (i) * mul));
}
}
}
Expand All @@ -396,7 +396,7 @@ void FFTReal <DT>::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);
}
}
Expand Down

0 comments on commit a7a5a4f

Please sign in to comment.