diff --git a/arch/arm/src/cxd56xx/cxd56_gauge.c b/arch/arm/src/cxd56xx/cxd56_gauge.c index 8ca302feb02..1decda4d865 100644 --- a/arch/arm/src/cxd56xx/cxd56_gauge.c +++ b/arch/arm/src/cxd56xx/cxd56_gauge.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm/src/stm32/stm32_dac.c b/arch/arm/src/stm32/stm32_dac.c index 5b50b710bd8..7964a06c5d5 100644 --- a/arch/arm/src/stm32/stm32_dac.c +++ b/arch/arm/src/stm32/stm32_dac.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include diff --git a/arch/renesas/src/rx65n/rx65n_rspi.c b/arch/renesas/src/rx65n/rx65n_rspi.c index 95a12f41d20..e91c77f0363 100644 --- a/arch/renesas/src/rx65n/rx65n_rspi.c +++ b/arch/renesas/src/rx65n/rx65n_rspi.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -1740,7 +1739,7 @@ static uint32_t rspi_setfrequency(FAR struct spi_dev_s *dev, if (frequency != priv->frequency) { /* Below formula used to calculate bit rate - * Bit rate f(PCLK)/(2 × (n + 1) × 2^N) . + * Bit rate f(PCLK)/(2 * (n + 1) * 2^N) . * n denotes SPBR setting (0,1,2..255) . * N denotes a BRDV[1:0] bit setting (0, 1, 2, 3) . */ diff --git a/arch/renesas/src/rx65n/rx65n_rspi_sw.c b/arch/renesas/src/rx65n/rx65n_rspi_sw.c index 074bc163805..b530043dd6e 100644 --- a/arch/renesas/src/rx65n/rx65n_rspi_sw.c +++ b/arch/renesas/src/rx65n/rx65n_rspi_sw.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -1375,7 +1374,7 @@ static uint32_t rspi_setfrequency(FAR struct spi_dev_s *dev, if (frequency != priv->frequency) { /* Below formula used to calculate bit rate - * Bit rate f(PCLK)/(2 × (n + 1) × 2^N) . + * Bit rate f(PCLK)/(2 * (n + 1) * 2^N) . * n denotes SPBR setting (0,1,2..255) . * N denotes a BRDV[1:0] bit setting (0, 1, 2, 3) . */ diff --git a/drivers/audio/cs4344.c b/drivers/audio/cs4344.c index a44466a49ed..520ab672bd6 100644 --- a/drivers/audio/cs4344.c +++ b/drivers/audio/cs4344.c @@ -46,7 +46,6 @@ #include #include #include -#include #include "cs4344.h" diff --git a/drivers/audio/cs43l22.c b/drivers/audio/cs43l22.c index 4a99bcb480b..56eb160b09a 100644 --- a/drivers/audio/cs43l22.c +++ b/drivers/audio/cs43l22.c @@ -43,7 +43,6 @@ #include #include -#include #include #include #include diff --git a/drivers/audio/cxd56_src.c b/drivers/audio/cxd56_src.c index 8f1e8d560fb..f21e177326a 100644 --- a/drivers/audio/cxd56_src.c +++ b/drivers/audio/cxd56_src.c @@ -24,7 +24,6 @@ #include #include -#include #include #include #include diff --git a/drivers/audio/vs1053.c b/drivers/audio/vs1053.c index 5e1144190c2..d40ad86c85e 100644 --- a/drivers/audio/vs1053.c +++ b/drivers/audio/vs1053.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/drivers/audio/wm8904.c b/drivers/audio/wm8904.c index 207b3131eb8..a0bab6404af 100644 --- a/drivers/audio/wm8904.c +++ b/drivers/audio/wm8904.c @@ -32,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/drivers/audio/wm8994.c b/drivers/audio/wm8994.c index cf2d62cf5dc..839d639d597 100644 --- a/drivers/audio/wm8994.c +++ b/drivers/audio/wm8994.c @@ -48,7 +48,6 @@ #include #include #include -#include #include "wm8994.h" diff --git a/drivers/wireless/spirit/include/spirit_radio.h b/drivers/wireless/spirit/include/spirit_radio.h index 20475b62889..f973cb0715f 100644 --- a/drivers/wireless/spirit/include/spirit_radio.h +++ b/drivers/wireless/spirit/include/spirit_radio.h @@ -68,7 +68,6 @@ ******************************************************************************/ #include -#include #include "spirit_types.h" diff --git a/libs/libc/stdio/lib_dtoa_engine.c b/libs/libc/stdio/lib_dtoa_engine.c index 9a4edeb7187..ab6495d19e2 100644 --- a/libs/libc/stdio/lib_dtoa_engine.c +++ b/libs/libc/stdio/lib_dtoa_engine.c @@ -37,6 +37,8 @@ * Included Files ****************************************************************************/ +#include + #include "lib_dtoa_engine.h" /**************************************************************************** diff --git a/libs/libc/stdio/lib_dtoa_engine.h b/libs/libc/stdio/lib_dtoa_engine.h index 5444c709ddc..a60e9398759 100644 --- a/libs/libc/stdio/lib_dtoa_engine.h +++ b/libs/libc/stdio/lib_dtoa_engine.h @@ -40,7 +40,6 @@ * Included Files ****************************************************************************/ -#include #include #include diff --git a/libs/libc/stdio/lib_libvscanf.c b/libs/libc/stdio/lib_libvscanf.c index 12283705d16..7f6652fd3c7 100644 --- a/libs/libc/stdio/lib_libvscanf.c +++ b/libs/libc/stdio/lib_libvscanf.c @@ -24,7 +24,6 @@ #include -#include #include #include #include diff --git a/libs/libc/stdlib/lib_srand.c b/libs/libc/stdlib/lib_srand.c index e81de14d679..03f181a7197 100644 --- a/libs/libc/stdlib/lib_srand.c +++ b/libs/libc/stdlib/lib_srand.c @@ -24,7 +24,6 @@ #include -#include #include #include @@ -44,6 +43,12 @@ # define CONFIG_LIB_RAND_ORDER 3 #endif +#ifndef CONFIG_HAVE_DOUBLE +typedef float float_t; +#else +typedef double float_t; +#endif + /* Values needed by the random number generator */ #define RND1_CONSTK 470001 @@ -64,7 +69,7 @@ static inline unsigned long fgenerate1(void); #if (CONFIG_LIB_RAND_ORDER == 1) -static double_t frand1(void); +static float_t frand1(void); #endif /* Second order congruential generators */ @@ -72,14 +77,14 @@ static double_t frand1(void); #if (CONFIG_LIB_RAND_ORDER > 1) static inline unsigned long fgenerate2(void); #if (CONFIG_LIB_RAND_ORDER == 2) -static double_t frand2(void); +static float_t frand2(void); #endif /* Third order congruential generators */ #if (CONFIG_LIB_RAND_ORDER > 2) static inline unsigned long fgenerate3(void); -static double_t frand3(void); +static float_t frand3(void); #endif #endif @@ -116,7 +121,7 @@ static inline unsigned long fgenerate1(void) } #if (CONFIG_LIB_RAND_ORDER == 1) -static double_t frand1(void) +static float_t frand1(void) { /* First order congruential generator. */ @@ -124,7 +129,7 @@ static double_t frand1(void) /* Construct an floating point value in the range from 0.0 up to 1.0 */ - return ((double_t)randint) / ((double_t)RND1_CONSTP); + return ((float_t)randint) / ((float_t)RND1_CONSTP); } #endif @@ -156,7 +161,7 @@ static inline unsigned long fgenerate2(void) } #if (CONFIG_LIB_RAND_ORDER == 2) -static double_t frand2(void) +static float_t frand2(void) { /* Second order congruential generator */ @@ -164,7 +169,7 @@ static double_t frand2(void) /* Construct an floating point value in the range from 0.0 up to 1.0 */ - return ((double_t)randint) / ((double_t)RND2_CONSTP); + return ((float_t)randint) / ((float_t)RND2_CONSTP); } #endif @@ -197,7 +202,7 @@ static inline unsigned long fgenerate3(void) return randint; } -static double_t frand3(void) +static float_t frand3(void) { /* Third order congruential generator */ @@ -205,7 +210,7 @@ static double_t frand3(void) /* Construct an floating point value in the range from 0.0 up to 1.0 */ - return ((double_t)randint) / ((double_t)RND3_CONSTP); + return ((float_t)randint) / ((float_t)RND3_CONSTP); } #endif #endif @@ -246,7 +251,7 @@ void srand(unsigned int seed) unsigned long nrand(unsigned long limit) { unsigned long result; - double_t ratio; + float_t ratio; /* Loop to be sure a legal random number is generated */ @@ -264,7 +269,7 @@ unsigned long nrand(unsigned long limit) /* Then, produce the return-able value in the requested range */ - result = (unsigned long)(((double_t)limit) * ratio); + result = (unsigned long)(((float_t)limit) * ratio); /* Loop because there is an (unlikely) possibility that rounding * could increase the result at the limit value about the limit.