arch/stm32: Fix compiler warning
chip/stm32_i2s.c:1949:12: error: conflicting types for built-in function 'roundf'; expected 'float(float)' [-Werror=builtin-declaration-mismatch] 1949 | static int roundf(float num) | ^~~~~~ Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
8fa26944f7
commit
29cb85ba17
@ -1946,7 +1946,7 @@ errout_with_buf:
|
||||
#endif
|
||||
}
|
||||
|
||||
static int roundf(float num)
|
||||
static int stm32_i2s_roundf(float num)
|
||||
{
|
||||
if (((int)(num + 0.5f)) > num)
|
||||
{
|
||||
@ -2209,7 +2209,7 @@ static uint32_t i2s_mckdivider(struct stm32_i2s_s *priv)
|
||||
{
|
||||
for (n = 2; n <= 256; ++n)
|
||||
{
|
||||
napprox = roundf(priv->samplerate / 1000000.0f *
|
||||
napprox = stm32_i2s_roundf(priv->samplerate / 1000000.0f *
|
||||
(8 * 32 * R * (2 * n + od)));
|
||||
if ((napprox > 432) || (napprox < 50))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user